mapper

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 34 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    = "30948d6"
)

Constants names

View Source
const (
	FilterOutput = "_filter_output"
)

Variables

This section is empty.

Functions

func CreateCensusBasePage added in v1.49.0

func CreateCensusBasePage(ctx context.Context, 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) datasetLandingPageCensus.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(ctx context.Context, 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, maxNumberOfOptions int, isValidationError, hasNoAreaOptions bool, filterOutput filter.Model, fDims []sharedModel.FilterDimension, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, isEnableMultivariate bool, dimDesc population.GetDimensionsResponse, sdc cantabular.GetBlockedAreaCountResult, population population.GetPopulationTypeResponse) datasetLandingPageCensus.Page

CreateCensusFilterOutputsPage creates a filter output page based on api model responses

func CreateCensusLandingPage added in v1.49.0

func CreateCensusLandingPage(ctx context.Context, 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, maxNumberOfOptions int, isValidationError bool, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner, isEnableMultivariate bool, population population.GetPopulationTypeResponse) datasetLandingPageCensus.Page

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

func CreateCustomDatasetPage added in v1.51.0

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

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

func CreateEditionsList

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

CreateEditionsList creates a editions list page based on api model responses

func CreateFilterableLandingPage

func CreateFilterableLandingPage(basePage coreModel.Page, ctx context.Context, 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) datasetLandingPageFilterable.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, edition dataset.Edition, versions []dataset.Version, serviceMessage string, emergencyBannerContent zebedee.EmergencyBanner) datasetVersionsList.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) []datasetPage.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 datasetPage.Page

DatasetPage is a DatasetPage representation

func CreateDatasetPage added in v1.34.0

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

type StaticDatasetLandingPage added in v1.13.0

type StaticDatasetLandingPage datasetLandingPageStatic.Page

StaticDatasetLandingPage is a StaticDatasetLandingPage representation

func CreateLegacyDatasetLanding added in v1.13.0

func CreateLegacyDatasetLanding(basePage coreModel.Page, ctx context.Context, req *http.Request, dlp zebedee.DatasetLandingPage, bcs []zebedee.Breadcrumb, ds []zebedee.Dataset, localeCode string, 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