Documentation ¶
Index ¶
- type Area
- type AreaType
- type AreaTypes
- 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) GetAreas(ctx context.Context, input GetAreasInput) (GetAreasResponse, error)
- func (c *Client) GetPopulationAreaTypes(ctx context.Context, userAuthToken, serviceAuthToken, datasetID string) (GetAreaTypesResponse, error)
- func (c *Client) GetPopulationTypes(ctx context.Context, input GetAreasInput) (GetAreasResponse, error)
- type ErrorResp
- type GetAreaInput
- type GetAreaResponse
- type GetAreaTypeParentsInput
- type GetAreaTypeParentsResponse
- type GetAreaTypesResponse
- type GetAreasInput
- type GetAreasResponse
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"` TotalCount int `json:"total_count"` }
AreaType is an area type model with ID and Label
type AreaTypes ¶ added in v2.155.0
type AreaTypes struct { ID string `json:"id"` Label string `json:"label"` TotalCount int `json:"total_count"` }
Area is an area model with ID and Label
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) GetAreas ¶ added in v2.147.0
func (c *Client) GetAreas(ctx context.Context, input GetAreasInput) (GetAreasResponse, error)
func (*Client) GetPopulationAreaTypes ¶
func (c *Client) GetPopulationAreaTypes(ctx context.Context, userAuthToken, serviceAuthToken, datasetID string) (GetAreaTypesResponse, error)
GetPopulationAreaTypes retrieves the Cantabular area-types associated with a dataset
func (*Client) GetPopulationTypes ¶
func (c *Client) GetPopulationTypes(ctx context.Context, input GetAreasInput) (GetAreasResponse, error)
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 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 GetAreaTypeParentsResponse ¶ added in v2.155.0
type GetAreaTypeParentsResponse struct {
AreaTypes []AreaTypes `json:"area_types"`
}
GetAreaTypeParentsResponse is the response object for GET /areas
type GetAreaTypesResponse ¶
type GetAreaTypesResponse struct {
AreaTypes []AreaType `json:"area_types"`
}
GetAreaTypesResponse is the response object for GET /area-types
type GetAreasInput ¶
type GetAreasResponse ¶
type GetAreasResponse struct {
Areas []Area `json:"areas"`
}
GetAreasResponse is the response object for GET /areas