Documentation ¶
Index ¶
- func ExtractQueryParameters(urlQuery url.Values, validDimensions []string) (map[string]string, error)
- func GetDimensionOffsetInHeaderRow(headerRow []string) (int, error)
- func GetListOfValidDimensionNames(dimensions []dataset.VersionDimension) []string
- type API
- type IAuthHandler
- type IDatasetClient
- type IGraph
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractQueryParameters ¶ added in v0.3.0
func ExtractQueryParameters(urlQuery url.Values, validDimensions []string) (map[string]string, error)
ExtractQueryParameters creates a map of query parameters (options) by dimension from the provided urlQuery if they exist in the validDimensions list
func GetDimensionOffsetInHeaderRow ¶ added in v0.3.0
GetDimensionOffsetInHeaderRow splits the first item of the provided headers by '_', and returns the second item as integer
func GetListOfValidDimensionNames ¶ added in v0.3.0
func GetListOfValidDimensionNames(dimensions []dataset.VersionDimension) []string
GetListOfValidDimensionNames iterates the provided dimensions and returns an array with their names
Types ¶
type API ¶
API provides a struct to wrap the api around
type IAuthHandler ¶ added in v0.3.0
type IAuthHandler interface {
Require(required auth.Permissions, handler http.HandlerFunc) http.HandlerFunc
}
IAuthHandler represents the required methods from authorisation library by Observation API
type IDatasetClient ¶ added in v0.3.0
type IDatasetClient interface { GetVersion(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceAuthToken, collectionID, datasetID, edition, version string) (m dataset.Version, err error) Get(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, datasetID string) (m dataset.DatasetDetails, err error) Checker(ctx context.Context, check *healthcheck.CheckState) error }
IDatasetClient represents the required methods from the Dataset Client required by Observation API
type IGraph ¶ added in v0.3.0
type IGraph interface { driver.Driver StreamCSVRows(ctx context.Context, instanceID, filterID string, filters *observation.DimensionFilters, limit *int) (observation.StreamRowReader, error) }
IGraph defines the required methods from GraphDB required by Observation API