Documentation
¶
Index ¶
Constants ¶
const ( DefaultLimit = 20 DefaultOffset = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
API provides a struct to wrap the api around
func New ¶
func New(_ context.Context, cfg *config.Config, r chi.Router, idc *identity.Client, rsp responder, g generator, d datastore, ds datasetAPIClient, c cantabularClient, p kafka.IProducer) *API
New creates and initialises a new API
func (*API) ParseRequest ¶
NOTE: for multivariate tables, it is going to use the name field for the id when making the call to cantabular.
func (*API) ValidateAndReturnDimensions ¶ added in v1.6.0
func (api *API) ValidateAndReturnDimensions(v dataset.Version, dimensions []model.Dimension, populationType string) (finalDims []model.Dimension, filterType string, err error)
ValidateAndReturnDimensions encapsulates the dimension validation paths for filters based on flexible and multivariate tables.
type DatasetJSONDimension ¶ added in v1.2.0
type DatasetJSONLinks ¶ added in v1.2.0
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is the packages error type
func (Error) BadRequest ¶ added in v1.2.0
BadRequest satisfies the errBadRequest interface
func (Error) LogData ¶
LogData satisfies the dataLogger interface which is used to recover log data from an error
func (Error) Message ¶
Message satisfies the messager interface which is used to specify a response to be sent to the caller in place of the error text for a given error. This is useful when you don't want sensitive information or implementation details being exposed to the caller which could be used to find exploits in our API
type GetFilterDimensionOptionsItem ¶ added in v1.2.0
type GetFilterDimensionOptionsResponse ¶ added in v1.2.0
type GetFilterDimensionOptionsResponse struct {
Items []GetFilterDimensionOptionsItem `json:"items"`
// contains filtered or unexported fields
}
getDimensionOptionsResponse is the response body for GET /filters/{id}/dimensions/{name}/options