Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AreaDetails ¶
type AreaDetails struct {
Code string `json:"code,omitempty"`
Name string `json:"name,omitempty"`
DateStarted string `json:"date_start,omitempty"`
DateEnd string `json:"date_end,omitempty"`
WelshName string `json:"name_welsh,omitempty"`
GeometricData map[string]interface{} `json:"geometry"`
Visible bool `json:"visible,omitempty"`
AreaType string `json:"area_type",omitempty"`
}
AreaDetails represents a response area model from the areas api
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a areas api client which can be used to make requests to the server
func NewWithHealthClient ¶
func NewWithHealthClient(hcCli *healthcheck.Client) *Client
NewWithHealthClient creates a new instance of Client, reusing the URL and Clienter from the provided health check client.
type ErrInvalidAreaAPIResponse ¶
type ErrInvalidAreaAPIResponse struct {
// contains filtered or unexported fields
}
ErrInvalidAreaAPIResponse is returned when the area api does not respond with a valid status
func NewAreaAPIResponse ¶
func NewAreaAPIResponse(resp *http.Response, uri string) (e *ErrInvalidAreaAPIResponse)
NewAreaAPIResponse creates an error response, optionally adding body to e when status is 404
func (ErrInvalidAreaAPIResponse) Code ¶
func (e ErrInvalidAreaAPIResponse) Code() int
Code returns the status code received from Area api if an error is returned
func (ErrInvalidAreaAPIResponse) Error ¶
func (e ErrInvalidAreaAPIResponse) Error() string
Error should be called by the user to print out the stringified version of the error
Click to show internal directories.
Click to hide internal directories.