@@ -67,10 +67,14 @@ const (
67
67
68
68
// ExplorerQueryFilter represents a filter query parameter for the query endpoint.
69
69
type ExplorerQueryFilter struct {
70
- Index int
71
- Name string
70
+ // Unique, sequential index for each filter, starting at 0 and incrementing by 1.
71
+ Index int
72
+ // Field name to apply the filter, valid for the queried view type.
73
+ Name string
74
+ // The operator use when filtering, must be supported by the field type.
72
75
Operator ExplorerQueryFilterOperator
73
- Value string
76
+ // The filter value used by the filter during the query.
77
+ Value string
74
78
}
75
79
76
80
func (eqf * ExplorerQueryFilter ) toKeyValue () (string , string ) {
@@ -82,10 +86,16 @@ func (eqf *ExplorerQueryFilter) toKeyValue() (string, string) {
82
86
type ExplorerQueryOptions struct {
83
87
ListOptions
84
88
89
+ // Must be one of the following available views: WorkspacesViewType, ModulesViewType,
90
+ // ProvidersViewType or TerraformVersionsViewType. Each query function will
91
+ // set this value automatically, except ExportToCSV().
85
92
View ExplorerViewType `url:"type"`
86
- Sort string `url:"sort,omitempty"`
93
+ // Optional snake_case field to sort data, prefix with '-' for descending, must exist in view type.
94
+ Sort string `url:"sort,omitempty"`
87
95
88
- Fields []string `url:"-"`
96
+ // List of fields to limit the data returned by the query.
97
+ Fields []string `url:"-"`
98
+ // List of filters to limit the data returned by the query.
89
99
Filters []* ExplorerQueryFilter `url:"-"`
90
100
}
91
101
0 commit comments