Documentation ¶
Index ¶
- type Area
- type AreaType
- type AuthTokens
- type Category
- type Client
- func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) error
- func (c *Client) GetArea(ctx context.Context, input GetAreaInput) (GetAreaResponse, error)
- func (c *Client) GetAreaTypeParents(ctx context.Context, input GetAreaTypeParentsInput) (GetAreaTypeParentsResponse, error)
- func (c *Client) GetAreaTypes(ctx context.Context, input GetAreaTypesInput) (GetAreaTypesResponse, error)
- func (c *Client) GetAreas(ctx context.Context, input GetAreasInput) (GetAreasResponse, error)
- func (c *Client) GetBaseVariable(ctx context.Context, input GetBaseVariableInput) (GetBaseVariableResponse, error)
- func (c *Client) GetBlockedAreaCount(ctx context.Context, input GetBlockedAreaCountInput) (*cantabular.GetBlockedAreaCountResult, error)
- func (c *Client) GetCategorisations(ctx context.Context, input GetCategorisationsInput) (GetCategorisationsResponse, error)
- func (c *Client) GetDimensionCategories(ctx context.Context, input GetDimensionCategoryInput) (GetDimensionCategoriesResponse, error)
- func (c *Client) GetDimensions(ctx context.Context, input GetDimensionsInput) (GetDimensionsResponse, error)
- func (c *Client) GetDimensionsDescription(ctx context.Context, input GetDimensionsDescriptionInput) (GetDimensionsResponse, error)
- func (c *Client) GetParentAreaCount(ctx context.Context, input GetParentAreaCountInput) (int, error)
- func (c *Client) GetPopulationType(ctx context.Context, input GetPopulationTypeInput) (GetPopulationTypeResponse, error)
- func (c *Client) GetPopulationTypeMetadata(ctx context.Context, input GetPopulationTypeMetadataInput) (GetPopulationTypeMetadataResponse, error)
- func (c *Client) GetPopulationTypes(ctx context.Context, input GetPopulationTypesInput) (GetPopulationTypesResponse, error)
- type Dimension
- type DimensionCategory
- type DimensionCategoryItem
- type ErrorResp
- type Filter
- type GetAreaInput
- type GetAreaResponse
- type GetAreaTypeParentsInput
- type GetAreaTypeParentsResponse
- type GetAreaTypesInput
- type GetAreaTypesResponse
- type GetAreasInput
- type GetAreasResponse
- type GetBaseVariableInput
- type GetBaseVariableResponse
- type GetBlockedAreaCountInput
- type GetCategorisationsInput
- type GetCategorisationsResponse
- type GetDimensionCategoriesResponse
- type GetDimensionCategoryInput
- type GetDimensionsDescriptionInput
- type GetDimensionsInput
- type GetDimensionsResponse
- type GetParentAreaCountInput
- type GetPopulationTypeInput
- type GetPopulationTypeMetadataInput
- type GetPopulationTypeMetadataResponse
- type GetPopulationTypeResponse
- type GetPopulationTypesInput
- type GetPopulationTypesResponse
- type PaginationParams
- type PaginationResponse
- type PopulationType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area struct { ID string `json:"id"` Label string `json:"label"` AreaType string `json:"area_type"` }
Area is an area model with ID and Label
type AreaType ¶
type AreaType struct { ID string `json:"id"` Label string `json:"label"` Description string `json:"description"` TotalCount int `json:"total_count"` Hierarchy_Order int `json:"hierarchy_order"` }
AreaType is an area type model with ID and Label
type AuthTokens ¶ added in v2.182.0
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Cantabular Population Types API client
func NewWithHealthClient ¶
NewWithHealthClient creates a new instance of Client, reusing the URL and Clienter from the provided health check client
func (*Client) Checker ¶
func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) error
Checker calls recipe api health endpoint and returns a check object to the caller
func (*Client) GetArea ¶ added in v2.162.0
func (c *Client) GetArea(ctx context.Context, input GetAreaInput) (GetAreaResponse, error)
func (*Client) GetAreaTypeParents ¶ added in v2.155.0
func (c *Client) GetAreaTypeParents(ctx context.Context, input GetAreaTypeParentsInput) (GetAreaTypeParentsResponse, error)
func (*Client) GetAreaTypes ¶ added in v2.182.0
func (c *Client) GetAreaTypes(ctx context.Context, input GetAreaTypesInput) (GetAreaTypesResponse, error)
GetPopulationAreaTypes retrieves the Cantabular area-types associated with a dataset
func (*Client) GetAreas ¶ added in v2.147.0
func (c *Client) GetAreas(ctx context.Context, input GetAreasInput) (GetAreasResponse, error)
func (*Client) GetBaseVariable ¶ added in v2.185.0
func (c *Client) GetBaseVariable(ctx context.Context, input GetBaseVariableInput) (GetBaseVariableResponse, error)
func (*Client) GetBlockedAreaCount ¶ added in v2.206.3
func (c *Client) GetBlockedAreaCount(ctx context.Context, input GetBlockedAreaCountInput) (*cantabular.GetBlockedAreaCountResult, error)
func (*Client) GetCategorisations ¶ added in v2.182.0
func (c *Client) GetCategorisations(ctx context.Context, input GetCategorisationsInput) (GetCategorisationsResponse, error)
func (*Client) GetDimensionCategories ¶ added in v2.206.3
func (c *Client) GetDimensionCategories(ctx context.Context, input GetDimensionCategoryInput) (GetDimensionCategoriesResponse, error)
func (*Client) GetDimensions ¶ added in v2.166.0
func (c *Client) GetDimensions(ctx context.Context, input GetDimensionsInput) (GetDimensionsResponse, error)
func (*Client) GetDimensionsDescription ¶ added in v2.206.3
func (c *Client) GetDimensionsDescription(ctx context.Context, input GetDimensionsDescriptionInput) (GetDimensionsResponse, error)
func (*Client) GetParentAreaCount ¶ added in v2.179.0
func (*Client) GetPopulationType ¶ added in v2.206.3
func (c *Client) GetPopulationType(ctx context.Context, input GetPopulationTypeInput) (GetPopulationTypeResponse, error)
func (*Client) GetPopulationTypeMetadata ¶ added in v2.206.3
func (c *Client) GetPopulationTypeMetadata(ctx context.Context, input GetPopulationTypeMetadataInput) (GetPopulationTypeMetadataResponse, error)
func (*Client) GetPopulationTypes ¶
func (c *Client) GetPopulationTypes(ctx context.Context, input GetPopulationTypesInput) (GetPopulationTypesResponse, error)
type Dimension ¶ added in v2.166.0
type Dimension struct { ID string `json:"id"` Label string `json:"label"` Description string `json:"description"` Categories []Category `json:"categories"` TotalCount int `json:"total_count"` QualityStatementText string `json:"quality_statement_text"` DefaultCategorisation bool `json:"default_categorisation"` }
Dimension is an area-type model with ID and Label
type DimensionCategory ¶ added in v2.206.3
type DimensionCategory struct { Id string `json:"id"` Label string `json:"label"` Categories []DimensionCategoryItem `json:"categories"` }
type DimensionCategoryItem ¶ added in v2.206.3
type ErrorResp ¶
type ErrorResp struct {
Errors []string `json:"errors"`
}
ErrorResp represents an error response containing a list of errors
type GetAreaInput ¶ added in v2.162.0
type GetAreaInput struct { AuthTokens PopulationType string AreaType string Area string }
type GetAreaResponse ¶ added in v2.162.0
type GetAreaResponse struct {
Area Area `json:"area"`
}
GetAreasResponse is the response object for GET /areas
type GetAreaTypeParentsInput ¶ added in v2.155.0
type GetAreaTypeParentsInput struct { AuthTokens PaginationParams PopulationType string AreaTypeID string }
type GetAreaTypeParentsResponse ¶ added in v2.155.0
type GetAreaTypeParentsResponse struct { PaginationResponse AreaTypes []AreaType `json:"items"` }
GetAreaTypeParentsResponse is the response object for GET /areas
type GetAreaTypesInput ¶ added in v2.182.0
type GetAreaTypesInput struct { AuthTokens PaginationParams PopulationType string }
type GetAreaTypesResponse ¶
type GetAreaTypesResponse struct { PaginationResponse AreaTypes []AreaType `json:"items"` }
GetAreaTypesResponse is the response object for GET /area-types
type GetAreasInput ¶
type GetAreasInput struct { AuthTokens PaginationParams PopulationType string AreaTypeID string Text string }
type GetAreasResponse ¶
type GetAreasResponse struct { PaginationResponse Areas []Area `json:"items"` }
GetAreasResponse is the response object for GET /areas
type GetBaseVariableInput ¶ added in v2.185.0
type GetBaseVariableInput struct { AuthTokens PopulationType string Variable string }
type GetBaseVariableResponse ¶ added in v2.185.0
type GetBlockedAreaCountInput ¶ added in v2.206.3
type GetBlockedAreaCountInput struct { AuthTokens PopulationType string Variables []string Filter Filter }
type GetCategorisationsInput ¶ added in v2.182.0
type GetCategorisationsInput struct { AuthTokens PaginationParams PopulationType string Dimension string }
type GetCategorisationsResponse ¶ added in v2.182.0
type GetCategorisationsResponse struct { PaginationResponse Items []Dimension `json:"items"` }
type GetDimensionCategoriesResponse ¶ added in v2.206.3
type GetDimensionCategoriesResponse struct { PaginationResponse Categories []DimensionCategory `json:"items"` }
type GetDimensionCategoryInput ¶ added in v2.206.3
type GetDimensionCategoryInput struct { AuthTokens PaginationParams PopulationType string Dimensions []string }
type GetDimensionsDescriptionInput ¶ added in v2.206.3
type GetDimensionsDescriptionInput struct { AuthTokens PopulationType string DimensionIDs []string }
type GetDimensionsInput ¶ added in v2.166.0
type GetDimensionsInput struct { AuthTokens PaginationParams PopulationType string SearchString string }
type GetDimensionsResponse ¶ added in v2.166.0
type GetDimensionsResponse struct { PaginationResponse Dimensions []Dimension `json:"items"` }
GetDimensionsResponse is the response object for GetDimensions
type GetParentAreaCountInput ¶ added in v2.179.0
type GetParentAreaCountInput struct { AuthTokens PopulationType string AreaTypeID string ParentAreaTypeID string SVarID string Areas []string }
GetParentAreaCountInput holds the required fields for GetParentAreaCount. SVarID stands for Supplentary Variable ID and is required when querying pre-build tables.
type GetPopulationTypeInput ¶ added in v2.206.3
type GetPopulationTypeInput struct { PopulationType string AuthTokens }
type GetPopulationTypeMetadataInput ¶ added in v2.206.3
type GetPopulationTypeMetadataInput struct { AuthTokens PopulationType string }
GetPopulationTypeMetadataInput is a model with auth token and population type
type GetPopulationTypeMetadataResponse ¶ added in v2.206.3
type GetPopulationTypeMetadataResponse struct { PopulationType string `json:"population_type"` DefaultDatasetID string `json:"default_dataset_id"` Edition string `json:"edition"` Version int `json:"version"` }
GetPopulationTypeMetadataResponse model with contain the metadata for poulation type
type GetPopulationTypeResponse ¶ added in v2.206.3
type GetPopulationTypeResponse struct {
PopulationType PopulationType `json:"population_type"`
}
type GetPopulationTypesInput ¶ added in v2.182.0
type GetPopulationTypesInput struct { PaginationParams DefaultDatasets bool AuthTokens }
type GetPopulationTypesResponse ¶ added in v2.182.0
type GetPopulationTypesResponse struct { PaginationResponse Items []PopulationType `json:"items"` }
type PaginationParams ¶ added in v2.182.0
type PaginationResponse ¶ added in v2.182.0
type PaginationResponse struct { PaginationParams Count int `json:"count"` TotalCount int `json:"total_count"` }