handler

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AreaTypes added in v1.3.2

type AreaTypes struct {
	// contains filtered or unexported fields
}

AreaTypes handles requests sent to the /population-types/{population-type}/area-types set of routes

func NewAreaTypes added in v1.3.2

func NewAreaTypes(cfg *config.Config, r responder, c cantabularClient, d datasetAPIClient) *AreaTypes

NewAreaTypes returns a new AreaTypes handler set

func (*AreaTypes) Get added in v1.3.2

func (h *AreaTypes) Get(w http.ResponseWriter, r *http.Request)

Get is the handler for GET /population-types/{population-type}/area-types

func (*AreaTypes) GetParents added in v1.3.2

func (h *AreaTypes) GetParents(w http.ResponseWriter, r *http.Request)

GetParents is the handler for /population-types/{population-type}/area-types/{area-type}/parents

type Areas added in v1.2.0

type Areas struct {
	// contains filtered or unexported fields
}

Areas handles requests to /area-types

func NewAreas added in v1.2.0

func NewAreas(cfg *config.Config, r responder, c cantabularClient, d datasetAPIClient) *Areas

NewAreas returns a new Areas handler

func (*Areas) Get added in v1.2.0

func (h *Areas) Get(w http.ResponseWriter, r *http.Request)

GetID returns the information for a particular area for GET /population-types/{population-type}/

func (*Areas) GetAll added in v1.7.0

func (h *Areas) GetAll(w http.ResponseWriter, r *http.Request)

Get is the handler for GET /population-types/{population-type}/area-types/{area-type}/areas

type Dimensions added in v1.8.0

type Dimensions struct {
	// contains filtered or unexported fields
}

func NewDimensions added in v1.8.0

func NewDimensions(cfg *config.Config, r responder, c cantabularClient, d datasetAPIClient) *Dimensions

NewDimensions returns a new AreaTypes handler set

func (*Dimensions) GetAll added in v1.8.0

func (h *Dimensions) GetAll(w http.ResponseWriter, r *http.Request)

GetAll is the handler for GET /population-types/{population-type}/dimensions

func (*Dimensions) GetCategorisations added in v1.9.0

func (h *Dimensions) GetCategorisations(w http.ResponseWriter, r *http.Request)

GetCategorisations is the handler for GET /population-types/{population-type}/dimensions/{dimension}/categoristations

type Error added in v1.2.0

type Error struct {
	// contains filtered or unexported fields
}

Error is the packages error type

func (Error) Error added in v1.2.0

func (e Error) Error() string

Error satisfies the standard library Go error interface

func (Error) LogData added in v1.2.0

func (e Error) LogData() map[string]interface{}

LogData satisfies the dataLogger interface which is used to recover log data from an error

func (Error) Message added in v1.2.0

func (e Error) Message() string

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

func (Error) Unwrap added in v1.2.0

func (e Error) Unwrap() error

Unwrap implements the standard library Go unwrapper interface

type PopulationTypes

type PopulationTypes struct {
	// contains filtered or unexported fields
}

func NewPopulationTypes

func NewPopulationTypes(cfg *config.Config, r responder, c cantabularClient, d datasetAPIClient) *PopulationTypes

func (*PopulationTypes) Get

Jump to

Keyboard shortcuts

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