contract

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area added in v1.3.2

type Area struct {
	ID       string `json:"id"`
	Label    string `json:"label"`
	AreaType string `json:"area_type"`
}

Area is an area model with ID, Label, and area-type

type AreaType added in v1.2.0

type AreaType struct {
	ID         string `json:"id"`
	Label      string `json:"label"`
	TotalCount int    `json:"total_count"`
}

AreaType is an area-type model with ID and Label

type Category added in v1.9.0

type Category struct {
	Name  string `json:"name"`
	Label string `json:"label"`
}

type Dimension added in v1.8.0

type Dimension struct {
	ID         string `json:"id"`
	Label      string `json:"label"`
	TotalCount int    `json:"total_count"`
}

Dimension is an area-type model with ID and Label

type GetAreaResponse added in v1.7.0

type GetAreaResponse struct {
	Area Area `json:"area"`
}

GetAreaResponse is the response object for GET /areas

type GetAreaTypeParentsRequest added in v1.8.0

type GetAreaTypeParentsRequest struct {
	QueryParams
	PopulationType string
	AreaType       string
}

type GetAreaTypeParentsResponse added in v1.3.2

type GetAreaTypeParentsResponse struct {
	PaginationResponse
	AreaTypes []AreaType `json:"items"`
}

type GetAreaTypesRequest added in v1.8.0

type GetAreaTypesRequest struct {
	QueryParams
	PopulationType string
}

type GetAreaTypesResponse added in v1.2.0

type GetAreaTypesResponse struct {
	PaginationResponse
	AreaTypes []AreaType `json:"items"`
}

GetAreaTypesResponse is the response object for GET /area-types

type GetAreasRequest added in v1.2.0

type GetAreasRequest struct {
	QueryParams
	Category string `schema:"q"`
}

GetAreasRequest defines the schema for the GET /areas query parameter

func (*GetAreasRequest) Valid added in v1.7.0

func (r *GetAreasRequest) Valid() error

type GetAreasResponse added in v1.2.0

type GetAreasResponse struct {
	PaginationResponse
	Areas []Area `json:"items"`
}

GetAreasResponse is the response object for GET /areas

type GetBaseVariableRequest added in v1.13.0

type GetBaseVariableRequest struct {
	PopulationType string
	Variable       string
}

type GetBaseVariableResponse added in v1.13.0

type GetBaseVariableResponse struct {
	Name  string `json:"name"`
	Label string `json:"label"`
}

type GetCategorisationsRequest added in v1.9.0

type GetCategorisationsRequest struct {
	QueryParams
	PopulationType string
	Variable       string
}

type GetCategorisationsResponse added in v1.9.0

type GetCategorisationsResponse struct {
	PaginationResponse
	Items []Category `json:"items"`
}

type GetDimensionsRequest added in v1.8.0

type GetDimensionsRequest struct {
	QueryParams
	PopulationType string
	SearchText     string `schema:"q"`
}

type GetDimensionsResponse added in v1.8.0

type GetDimensionsResponse struct {
	PaginationResponse
	Dimensions []Dimension `json:"items"`
}

GetAreaTypesResponse is the response object for GET /dimensions

type GetPopulationTypesResponse added in v1.2.0

type GetPopulationTypesResponse struct {
	PaginationResponse
	PopulationTypes
}

type PaginationResponse added in v1.8.0

type PaginationResponse struct {
	Limit      int `json:"limit"`
	Offset     int `json:"offset"`
	Count      int `json:"count"`
	TotalCount int `json:"total_count"`
}

type PopulationType

type PopulationType struct {
	Name string `json:"name"`
}

type PopulationTypes

type PopulationTypes struct {
	Items []PopulationType `json:"items"`
}

func NewPopulationTypes

func NewPopulationTypes(names []string) PopulationTypes

type QueryParams added in v1.7.0

type QueryParams struct {
	Limit  int `schema:"limit"`
	Offset int `schema:"offset"`
}

func (*QueryParams) Valid added in v1.7.0

func (q *QueryParams) Valid() error

Jump to

Keyboard shortcuts

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