models

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 1 Imported by: 0

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        `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 AreaType

type AreaType int

AreaType defines possible area types

const (
	Country AreaType = iota
	Region
	UnitaryAuthorities
	CombinedAuthorities
	MetropolitanCounties
	Counties
	LondonBoroughs
	MetropolitanDistricts
	NonMetropolitanDistricts
	ElectoralWards
	Invalid
)

possible area types

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 LinkedAreas

type LinkedAreas struct {
	ID   string `bson:"id,omitempty"         json:"id,omitempty"`
	Type string `bson:"type,omitempty"       json:"type,omitempty"`
	Name string `bson:"name,omitempty"       json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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