Skip to content

Commit 4b9462d

Browse files
committed
Add missing godoc information
1 parent bebf568 commit 4b9462d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

explorer.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ const (
6767

6868
// ExplorerQueryFilter represents a filter query parameter for the query endpoint.
6969
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.
7275
Operator ExplorerQueryFilterOperator
73-
Value string
76+
// The filter value used by the filter during the query.
77+
Value string
7478
}
7579

7680
func (eqf *ExplorerQueryFilter) toKeyValue() (string, string) {
@@ -82,10 +86,16 @@ func (eqf *ExplorerQueryFilter) toKeyValue() (string, string) {
8286
type ExplorerQueryOptions struct {
8387
ListOptions
8488

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().
8592
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"`
8795

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.
8999
Filters []*ExplorerQueryFilter `url:"-"`
90100
}
91101

0 commit comments

Comments
 (0)