api

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 CantExtAPI

type CantExtAPI 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
	CantExtAPI CantExtAPI
	Cfg        *config.Config
}

func Setup

Setup function sets up the api and returns an api

func (*CantabularMetadataExtractorAPI) GetMetadataDataset

func (api *CantabularMetadataExtractorAPI) GetMetadataDataset(ctx context.Context, cantDataset string, dimensions []string, lang string) (*cantabular.MetadataDatasetQuery, error)

func (*CantabularMetadataExtractorAPI) GetMetadataTable

func (api *CantabularMetadataExtractorAPI) GetMetadataTable(ctx context.Context, cantDataset string, lang string) (*cantabular.MetadataTableQuery, []string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL