mapper

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRelationsHeading added in v1.11.0

func GetRelationsHeading(ancestors []areas.Ancestor, headingOne, headingTwo, areaName string) string

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 ErrorDetails struct {
	Description string
	Title       string
}

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 struct {
	Name string
	Href string
}

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

Jump to

Keyboard shortcuts

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