mapper

package
v1.49.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PeriodYear is the string value for year time period
	PeriodYear = "year"
	// PeriodQuarter is the string value for quarter time period
	PeriodQuarter = "quarter"
	// PeriodMonth is the string value for month time period
	PeriodMonth    = "month"
	CensusURI      = "/census"
	CensusPageType = "census"
	CensusTitle    = "Census"
)

Variables

This section is empty.

Functions

func AroundONS added in v1.12.0

func AroundONS(homepageData zebedee.HomepageContent, images map[string]image.ImageDownload) []model.Feature

AroundONS takes the homepageContent as returned from the client and returns an array of featured content

func Census added in v1.16.0

func Census(req *http.Request, cfg *config.Config, localeCode string, basePage coreModel.Page, navigationContent *topicModel.Navigation, emergencyBannerContent zebedee.EmergencyBanner, censusSubTopics []model.Topics) model.CensusPage

Census maps data to our census frontend model

func CensusLegacy added in v1.32.0

func CensusLegacy(req *http.Request, cfg *config.Config, localeCode string, basePage coreModel.Page, navigationContent *topicModel.Navigation, emergencyBannerContent zebedee.EmergencyBanner) model.CensusPage

func FeaturedContent added in v1.6.0

func FeaturedContent(homepageData zebedee.HomepageContent, images map[string]image.ImageDownload) []model.Feature

FeaturedContent takes the homepageContent as returned from the client and returns an array of featured content

func Homepage

func Homepage(cfg config.Config, localeCode string, basePage coreModel.Page, mainFigures map[string]*model.MainFigure, featuredContent, aroundONS *[]model.Feature, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, navigationContent *topicModel.Navigation) model.Page

Homepage maps data to our homepage frontend model

func MainFigure added in v1.1.0

func MainFigure(ctx context.Context, id, datePeriod, differenceInterval string, figure zebedee.TimeseriesMainFigure, trendInfo TrendInfo) *model.MainFigure

MainFigure maps a single main figure object

Types

type TrendInfo added in v1.10.0

type TrendInfo struct {
	TrendFigure          zebedee.TimeseriesMainFigure
	IsTimeseriesForTrend bool
	RetrieveTrendFailed  bool
}

TrendInfo, stores all trend data for processing

Jump to

Keyboard shortcuts

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