population

package
v2.164.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 14 Imported by: 14

Documentation

Index

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 NewClient

func NewClient(apiURL string) (*Client, error)

NewClient creates a new instance of Client with a given Population Type API URL

func NewWithHealthClient

func NewWithHealthClient(hcCli *health.Client) (*Client, error)

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

func (ErrorResp) Error

func (e ErrorResp) Error() string

type GetAreaInput added in v2.162.0

type GetAreaInput struct {
	UserAuthToken    string
	ServiceAuthToken string
	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 {
	UserAuthToken    string
	ServiceAuthToken string
	DatasetID        string
	AreaTypeID       string
}

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 GetAreasInput struct {
	UserAuthToken    string
	ServiceAuthToken string
	DatasetID        string
	AreaTypeID       string
	Text             string
}

type GetAreasResponse

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

GetAreasResponse is the response object for GET /areas

Jump to

Keyboard shortcuts

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