Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AreaModel ¶ added in v1.3.0
type AreaModel struct {
coreModel.Page
Name string `json:"name"`
Code string `json:"code"`
Level string `json:"level"`
AreaType string `json:"area_type"`
NomisLink string `json:"nomis_link"`
Ancestors []areas.Ancestor `json:"ancestors"`
Siblings []AreaModel `json:"siblings"`
Children []AreaModel `json:"children"`
Relations []RelationLink `json:"relations"`
Version string `json:"area_profiles_version"`
GetRelationsHeading func(ancestors []areas.Ancestor, headingOne string, headingTwo string, areaName string) string
}
func CreateAreaPage ¶ added in v1.3.0
func CreateAreaPage(basePage coreModel.Page, areaDetails areas.AreaDetails, relations []areas.Relation, lang string) AreaModel
CreateAreaPage maps request area profile data to frontend view
type ErrorDetails ¶ added in v1.7.0
type ErrorModel ¶ added in v1.7.0
type ErrorModel struct {
coreModel.Page
Error ErrorDetails
}
func Create404Page ¶ added in v1.7.0
func Create404Page(basePage coreModel.Page, errorDetails ErrorDetails) ErrorModel
Create404Page returns an ErrorModel struct for use with the error template
type RelationLink ¶ added in v1.7.0
type StartPageModel ¶ added in v1.2.0
type StartPageModel struct {
coreModel.Page
Greeting string `json:"greeting"`
Version string `json:"area_profiles_version"`
}
func CreateStartPage ¶ added in v1.2.0
func CreateStartPage(basePage coreModel.Page) StartPageModel
Click to show internal directories.
Click to hide internal directories.