Documentation
¶
Index ¶
Constants ¶
View Source
const ( AcceptLanguageHeaderError = "ErrorAcceptLanguageHeader" AreaDataIdGetError = "ErrorRetrievingAreaCode" MarshallingAreaDataError = "ErrorMarshallingAreaData" MarshallingAreaRelationshipsError = "ErrorMarshallingAreaRelationshipData" )
API error codes
View Source
const ( AcceptLanguageHeaderNotFoundDescription = "accept language header not found" AcceptLanguageHeaderInvalidDescription = "accept language header invalid" AreaDataGetErrorDescription = "area code not found" )
API error descriptions
Variables ¶
View Source
var ( AcceptLanguageHeaderName = "Accept-Language" AcceptLanguageMapping = map[string]string{ "en": "English", "cy": "Cymraeg", } )
Functions ¶
func BuildDescibeDBInstancesRequest ¶ added in v0.8.0
func BuildDescibeDBInstancesRequest(instanceName *string) *rds.DescribeDBInstancesInput
BuildDescibeDBInstancesRequest builds a correctly populated DescribeDBInstancesInput object using the required db instance name
Types ¶
type Area ¶
type Area struct {
ID string `bson:"id,omitempty" json:"id,omitempty"`
Version int `bson:"version,omitempty" json:"version,omitempty"`
Name string `bson:"name,omitempty" json:"name,omitempty"`
ReleaseDate string `bson:"release_date,omitempty" json:"release_date,omitempty"`
LastUpdated time.Time `bson:"last_updated,omitempty" json:"last_updated,omitempty"`
Type string `bson:"type,omitempty" json:"type,omitempty"`
ParentAreas []LinkedAreas `bson:"parent_areas,omitempty" json:"parent_areas,omitempty"`
ChildAreas []LinkedAreas `bson:"child_areas,omitempty" json:"child_areas,omitempty"`
NeighbouringAreas []LinkedAreas `bson:"neighbouring_areas,omitempty" json:"neighbouring_areas,omitempty"`
}
Area represents the structure for an area
type AreaDataRDS ¶ added in v0.8.0
type AreaDataRDS struct {
Id int64 `json:"id"`
Code string `json:"code"`
Active bool `json:"active"`
}
basic area data
type AreaRelationShips ¶ added in v0.7.0
type AreasDataResults ¶ added in v0.6.0
type AreasDataResults struct {
Code string `json:"code"`
Name string `json:"name"`
ValidFrom string `json:"date_start"`
ValidTo string `json:"date_end"`
WelshName string `json:"name_welsh"`
GeometricData map[string]interface{} `json:"geometry"`
Visible bool `json:"visible"`
AreaType string `json:"area_type"`
}
AreasDataResults
type AreasResults ¶
type AreasResults struct {
Items *[]Area `json:"items"`
Count int `json:"count"`
Offset int `json:"offset"`
Limit int `json:"limit"`
TotalCount int `json:"total_count"`
}
AreasResults represents a structure for a list of areas
type Error ¶ added in v0.6.0
type Error struct {
Cause error `json:"-"`
Code string `json:"code"`
Description string `json:"description"`
}
func NewValidationError ¶ added in v0.6.0
type ErrorResponse ¶ added in v0.6.0
type ErrorResponse struct {
Errors []error `json:"errors"`
Status int `json:"-"`
Headers map[string]string `json:"-"`
}
func NewErrorResponse ¶ added in v0.6.0
func NewErrorResponse(statusCode int, headers map[string]string, errors ...error) *ErrorResponse
type LinkedAreas ¶
type SuccessResponse ¶ added in v0.6.0
type SuccessResponse struct {
Body []byte `json:"-"`
Status int `json:"-"`
Headers map[string]string `json:"-"`
}
func NewSuccessResponse ¶ added in v0.6.0
func NewSuccessResponse(jsonBody []byte, statusCode int, headers map[string]string) *SuccessResponse
Click to show internal directories.
Click to hide internal directories.