Documentation ¶
Index ¶
- type Area
- type AreaType
- type AuthTokens
- 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) GetCategorisations(ctx context.Context, input GetCategorisationsInput) (GetCategorisationsResponse, error)
- func (c *Client) GetDimensions(ctx context.Context, input GetDimensionsInput) (GetDimensionsResponse, error)
- func (c *Client) GetParentAreaCount(ctx context.Context, input GetParentAreaCountInput) (int, error)
- func (c *Client) GetPopulationTypes(ctx context.Context, input GetPopulationTypesInput) (GetPopulationTypesResponse, error)
- type Dimension
- type ErrorResp
- type GetAreaInput
- type GetAreaResponse
- type GetAreaTypeParentsInput
- type GetAreaTypeParentsResponse
- type GetAreaTypesInput
- type GetAreaTypesResponse
- type GetAreasInput
- type GetAreasResponse
- type GetBaseVariableInput
- type GetBaseVariableResponse
- type GetCategorisationsInput
- type GetCategorisationsResponse
- type GetDimensionsInput
- type GetDimensionsResponse
- type GetParentAreaCountInput
- 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"` }
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) GetCategorisations ¶ added in v2.182.0
func (c *Client) GetCategorisations(ctx context.Context, input GetCategorisationsInput) (GetCategorisationsResponse, error)
func (*Client) GetDimensions ¶ added in v2.166.0
func (c *Client) GetDimensions(ctx context.Context, input GetDimensionsInput) (GetDimensionsResponse, error)
func (*Client) GetParentAreaCount ¶ added in v2.179.0
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"` TotalCount int `json:"total_count"` }
Dimension is an area-type model with ID and Label
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 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 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 Areas []string }
type GetPopulationTypesInput ¶ added in v2.182.0
type GetPopulationTypesInput struct {
AuthTokens
}
type GetPopulationTypesResponse ¶ added in v2.182.0
type GetPopulationTypesResponse struct {
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"` }
type PopulationType ¶ added in v2.182.0
type PopulationType struct {
Name string `json:"name"`
}