mapper

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Coverage          = "Coverage"
	AreaType          = "Area type"
	AnalyticsMaxItems = 4
)

Constants...

View Source
const (
	AlertType           = "alert"
	CorrectionAlertType = "correction"
)

Constants...

View Source
const (
	DimensionTime      = "time"
	DimensionAge       = "age"
	DimensionGeography = "geography"
	SixteensVersion    = "749a88b"
)

Constants names

View Source
const (
	FilterOutput = "_filter_output"
)

Variables

This section is empty.

Functions

func CreateCensusBasePage added in v1.49.0

func CreateCensusBasePage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, version dataset.Version, initialVersionReleaseDate string, hasOtherVersions bool, allVersions []dataset.Version, latestVersionNumber int, latestVersionURL, lang string, isValidationError bool, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, isEnableMultivariate bool) census.Page

CreateCensusBasePage builds a base datasetLandingPageCensus.Page with shared functionality between Dataset Landing Pages and Filter Output pages

func CreateCensusFilterOutputsPage added in v1.49.0

func CreateCensusFilterOutputsPage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, version dataset.Version, initialVersionReleaseDate string, hasOtherVersions bool, allVersions []dataset.Version, latestVersionNumber int, latestVersionURL, lang string, queryStrValues []string, isValidationError, hasNoAreaOptions bool, filterOutput filter.Model, fDims []sharedModel.FilterDimension, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, isEnableMultivariate bool, dimDesc population.GetDimensionsResponse, sdc cantabular.GetBlockedAreaCountResult, pop population.GetPopulationTypeResponse) census.Page

CreateCensusFilterOutputsPage creates a filter output page based on api model responses

func CreateCensusLandingPage added in v1.49.0

func CreateCensusLandingPage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, version dataset.Version, opts []dataset.Options, categorisationsMap map[string]int, initialVersionReleaseDate string, hasOtherVersions bool, allVersions []dataset.Version, latestVersionNumber int, latestVersionURL, lang string, queryStrValues []string, isValidationError bool, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, isEnableMultivariate bool, pop population.GetPopulationTypeResponse) census.Page

CreateCensusLandingPage creates a census-landing page based on api model responses

func CreateCustomDatasetPage added in v1.51.0

func CreateCustomDatasetPage(req *http.Request, basePage coreModel.Page, populationTypes []population.PopulationType, lang, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner) custom.Page

CreateCustomDatasetPage builds a base datasetLandingPageCensus.Page with shared functionality between Dataset Landing Pages and Filter Output pages

func CreateEditionsList

func CreateEditionsList(ctx context.Context, basePage coreModel.Page, req *http.Request, d dataset.DatasetDetails, editions []dataset.Edition, datasetID string, breadcrumbs []zebedee.Breadcrumb, lang, apiRouterVersion, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner) edition.Page

CreateEditionsList creates a editions list page based on api model responses

func CreateFilterableLandingPage

func CreateFilterableLandingPage(ctx context.Context, basePage coreModel.Page, req *http.Request, d dataset.DatasetDetails, ver dataset.Version, datasetID string, opts []dataset.Options, dims dataset.VersionDimensions, displayOtherVersionsLink bool, breadcrumbs []zebedee.Breadcrumb, latestVersionNumber int, latestVersionURL, lang, apiRouterVersion string, maxNumOpts int, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner) filterable.Page

CreateFilterableLandingPage creates a filterable dataset landing page based on api model responses

func CreateVersionsList

func CreateVersionsList(basePage coreModel.Page, req *http.Request, d dataset.DatasetDetails, ed dataset.Edition, versions []dataset.Version, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner) version.Page

CreateVersionsList creates a versions list page based on api model responses

func FindVersion added in v1.34.0

func FindVersion(versionList []zebedee.Dataset, versionURI string) zebedee.Dataset

func MapCookiePreferences added in v1.13.0

func MapCookiePreferences(req *http.Request, preferencesIsSet *bool, policy *coreModel.CookiesPolicy)

MapCookiePreferences reads cookie policy and preferences cookies and then maps the values to the page model

func MapDownloads added in v1.34.0

func MapDownloads(downloadsList []zebedee.Download, versionURI string) []datasetMdl.Download

func MapNavigationContent added in v1.41.0

func MapNavigationContent(navigationContent topicModel.Navigation) []coreModel.NavigationItem

mapNavigationContent takes navigationContent as returned from the client and returns information needed for the navigation bar

Types

type DatasetPage added in v1.34.0

type DatasetPage dataset.Page

DatasetPage is a DatasetPage representation

func CreateDatasetPage added in v1.34.0

func CreateDatasetPage(basePage coreModel.Page, req *http.Request, d zebedee.Dataset, dlp zebedee.DatasetLandingPage, bc []zebedee.Breadcrumb, versions []zebedee.Dataset, lang, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, navigationContent *topicModel.Navigation) DatasetPage

type StaticDatasetLandingPage added in v1.13.0

type StaticDatasetLandingPage static.Page

StaticDatasetLandingPage is a StaticDatasetLandingPage representation

func CreateLegacyDatasetLanding added in v1.13.0

func CreateLegacyDatasetLanding(ctx context.Context, basePage coreModel.Page, req *http.Request, dlp zebedee.DatasetLandingPage, bcs []zebedee.Breadcrumb, ds []zebedee.Dataset, localeCode, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, navigationContent *topicModel.Navigation) StaticDatasetLandingPage

CreateLegacyDatasetLanding maps a zebedee response struct into a frontend model to be used for rendering

type TimeSlice

type TimeSlice []time.Time

TimeSlice allows sorting of a list of time.Time

func (TimeSlice) Len

func (p TimeSlice) Len() int

func (TimeSlice) Less

func (p TimeSlice) Less(i, j int) bool

func (TimeSlice) Swap

func (p TimeSlice) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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