Documentation ¶
Index ¶
- Constants
- func OverrideMetadataTable(dims []string, mt *cantabular.MetadataTableQuery) error
- type CantMetaAPI
- type CantabularMetadataExtractorAPI
- func (api *CantabularMetadataExtractorAPI) GetMetadata(ctx context.Context, datasetID, lang string) (*cantabular.MetadataQueryResult, error)
- func (api *CantabularMetadataExtractorAPI) GetMetadataTable(_ context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, []string, error)
Constants ¶
View Source
const (
CantabularMetadataDatasetReadPermission string = "cantabularmetadatadataset:read"
)
Variables ¶
This section is empty.
Functions ¶
func OverrideMetadataTable ¶
func OverrideMetadataTable(dims []string, mt *cantabular.MetadataTableQuery) error
OverrideMetadataTable modifies the dimensions and results of the MetadataTableQuery to always use "ltla". This is the geocode used in the recipe and we need to ensure the result from the metadata server matches the recipe. This ensures also the following GetMetadataDataset uses "ltla".
Types ¶
type CantMetaAPI ¶ added in v1.1.0
type CantMetaAPI interface { MetadataDatasetQuery(ctx context.Context, req cantabular.MetadataDatasetQueryRequest) (*cantabular.MetadataDatasetQuery, error) MetadataTableQuery(ctx context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, error) }
cantExtAPI
type CantabularMetadataExtractorAPI ¶
type CantabularMetadataExtractorAPI struct { Router *mux.Router CantMetaAPI CantMetaAPI Cfg *config.Config // contains filtered or unexported fields }
func Setup ¶
func Setup(_ context.Context, r *mux.Router, cfg *config.Config, c CantMetaAPI, auth authorisation.Middleware) *CantabularMetadataExtractorAPI
Setup function sets up the api and returns an api
func (*CantabularMetadataExtractorAPI) GetMetadata ¶ added in v1.2.0
func (api *CantabularMetadataExtractorAPI) GetMetadata(ctx context.Context, datasetID, lang string) (*cantabular.MetadataQueryResult, error)
func (*CantabularMetadataExtractorAPI) GetMetadataTable ¶
func (api *CantabularMetadataExtractorAPI) GetMetadataTable(_ context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, []string, error)
Click to show internal directories.
Click to hide internal directories.