Documentation
¶
Index ¶
- type Client
- func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) error
- func (c *Client) DoAuthenticatedGetRequest(ctx context.Context, headers Headers, uri *url.URL) (resp *http.Response, err error)
- func (c *Client) GetDataset(ctx context.Context, headers Headers, collectionID, datasetID string) (dataset models.Dataset, err error)
- func (c *Client) GetDatasetByPath(ctx context.Context, headers Headers, path string) (dataset models.Dataset, err error)
- func (c *Client) GetEdition(ctx context.Context, headers Headers, datasetID, editionID string) (edition models.Edition, err error)
- func (c *Client) GetEditions(ctx context.Context, headers Headers, datasetID string, ...) (editionList EditionsList, err error)
- func (c *Client) GetVersion(ctx context.Context, headers Headers, datasetID, editionID, versionID string) (version models.Version, err error)
- func (c *Client) GetVersionDimensionOptions(ctx context.Context, headers Headers, ...) (versionDimensionOptionsList VersionDimensionOptionsList, err error)
- func (c *Client) GetVersionDimensions(ctx context.Context, headers Headers, datasetID, editionID, versionID string) (versionDimensionsList VersionDimensionsList, err error)
- func (c *Client) GetVersionMetadata(ctx context.Context, headers Headers, datasetID, editionID, versionID string) (metadata models.Metadata, err error)
- func (c *Client) GetVersions(ctx context.Context, headers Headers, datasetID, editionID string, ...) (versionsList VersionsList, err error)
- func (c *Client) Health() *health.Client
- func (c *Client) URL() string
- type EditionsList
- type Headers
- type QueryParams
- type VersionDimensionOptionsList
- type VersionDimensionsList
- type VersionsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithHealthClient ¶
NewWithHealthClient creates a new instance of service API Client, reusing the URL and Clienter from the provided healthcheck client
func (*Client) Checker ¶
func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) error
Checker calls topic api health endpoint and returns a check object to the caller
func (*Client) DoAuthenticatedGetRequest ¶ added in v1.75.0
func (c *Client) DoAuthenticatedGetRequest(ctx context.Context, headers Headers, uri *url.URL) (resp *http.Response, err error)
Creates new request object, executes a get request using the input `headers` and `uri` and returns the response
func (*Client) GetDataset ¶ added in v1.76.0
func (c *Client) GetDataset(ctx context.Context, headers Headers, collectionID, datasetID string) (dataset models.Dataset, err error)
Get returns dataset level information for a given dataset id
func (*Client) GetDatasetByPath ¶ added in v1.76.0
func (c *Client) GetDatasetByPath(ctx context.Context, headers Headers, path string) (dataset models.Dataset, err error)
GetDatasetByPath returns dataset level information for a given dataset path
func (*Client) GetEdition ¶ added in v1.76.0
func (c *Client) GetEdition(ctx context.Context, headers Headers, datasetID, editionID string) (edition models.Edition, err error)
GetEdition retrieves a single edition document from a given datasetID and edition label
func (*Client) GetEditions ¶ added in v1.76.0
func (c *Client) GetEditions(ctx context.Context, headers Headers, datasetID string, queryParams *QueryParams) (editionList EditionsList, err error)
GetEditions returns all editions for a dataset
func (*Client) GetVersion ¶
func (c *Client) GetVersion(ctx context.Context, headers Headers, datasetID, editionID, versionID string) (version models.Version, err error)
GetVersion gets a specific version for an edition from the dataset api
func (*Client) GetVersionDimensionOptions ¶ added in v1.75.0
func (c *Client) GetVersionDimensionOptions(ctx context.Context, headers Headers, datasetID, editionID, versionID, dimensionID string, queryParams *QueryParams) (versionDimensionOptionsList VersionDimensionOptionsList, err error)
Returns the options for a dimension
func (*Client) GetVersionDimensions ¶ added in v1.75.0
func (c *Client) GetVersionDimensions(ctx context.Context, headers Headers, datasetID, editionID, versionID string) (versionDimensionsList VersionDimensionsList, err error)
GetVersionDimensions will return a list of dimensions for a given version of a dataset
func (*Client) GetVersionMetadata ¶ added in v1.75.0
func (c *Client) GetVersionMetadata(ctx context.Context, headers Headers, datasetID, editionID, versionID string) (metadata models.Metadata, err error)
GetVersionMetadata returns the metadata for a given dataset id, edition and version
func (*Client) GetVersions ¶ added in v1.75.0
func (c *Client) GetVersions(ctx context.Context, headers Headers, datasetID, editionID string, queryParams *QueryParams) (versionsList VersionsList, err error)
GetVersions gets all versions for an edition from the dataset api
type EditionsList ¶ added in v1.76.0
type EditionsList struct {
Items []models.Edition `json:"items"`
Count int `json:"count"`
Offset int `json:"offset"`
Limit int `json:"limit"`
TotalCount int `json:"total_count"`
}
EditionList represents an object containing a list of paginated versions. This struct is based on the `pagination.page` struct which is returned when we call the `api.getEditions` endpoint
type Headers ¶ added in v1.75.0
type Headers struct {
CollectionID string
DownloadServiceToken string
ServiceToken string
UserAccessToken string
}
Contains the headers to be added to any request
type QueryParams ¶ added in v1.75.0
QueryParams represents the possible query parameters that a caller can provide
func (*QueryParams) Validate ¶ added in v1.75.0
func (q *QueryParams) Validate() error
Validate validates tht no negative values are provided for limit or offset, and that the length of IDs is lower than the maximum
type VersionDimensionOptionsList ¶ added in v1.75.0
type VersionDimensionOptionsList struct {
Items []models.PublicDimensionOption
}
VersionDimensionOptionsList represent a list of PublicDimensionOption
func (VersionDimensionOptionsList) ToString ¶ added in v1.79.0
func (m VersionDimensionOptionsList) ToString() string
type VersionDimensionsList ¶ added in v1.75.0
VersionDimensionsList represent a list of Dimension
type VersionsList ¶ added in v1.75.0
type VersionsList struct {
Items []models.Version `json:"items"`
Count int `json:"count"`
Offset int `json:"offset"`
Limit int `json:"limit"`
TotalCount int `json:"total_count"`
}
VersionsList represents an object containing a list of paginated versions. This struct is based on the `pagination.page` struct which is returned when we call the `api.getVersions` endpoint