Documentation ¶
Index ¶
- type Area
- type AreaType
- type Client
- func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) 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 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 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) 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 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
Click to show internal directories.
Click to hide internal directories.