mapper

package
v1.94.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 40 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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    = "ef5a1ca"
)

Constants names

View Source
const (
	FilterOutput = "_filter_output"
)

Variables

This section is empty.

Functions

func CreateBreadcrumbsFromTopicList added in v1.70.0

func CreateBreadcrumbsFromTopicList(topicObjectList []*dpTopicApiModels.Topic) []dpRendererModel.TaxonomyNode

func CreateCensusBasePage added in v1.49.0

func CreateCensusBasePage(basePage dpRendererModel.Page, datasetDetails dpDatasetApiModels.Dataset, version dpDatasetApiModels.Version,
	allVersions []dpDatasetApiModels.Version, 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 core.Page, d dpDatasetApiModels.Dataset, version dpDatasetApiModels.Version, hasOtherVersions bool, allVersions []dpDatasetApiModels.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(basePage core.Page, d dpDatasetApiModels.Dataset, version dpDatasetApiModels.Version,
	opts []dpDatasetApiSdk.VersionDimensionOptionsList, categorisationsMap map[string]int, allVersions []dpDatasetApiModels.Version, queryStrValues []string,
	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 core.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 dpRendererModel.Page, req *http.Request, d dpDatasetApiModels.Dataset, editions dpDatasetApiSdk.EditionsList, datasetID string, breadcrumbs []zebedee.Breadcrumb, apiRouterVersion string) edition.Page

CreateEditionsList creates an editions list page based on api model responses

func CreateEditionsListForStaticDatasetType added in v1.70.0

func CreateEditionsListForStaticDatasetType(ctx context.Context, basePage dpRendererModel.Page, req *http.Request, d dpDatasetApiModels.Dataset, editions dpDatasetApiSdk.EditionsList, datasetID, apiRouterVersion string, topicObjectList []*dpTopicApiModels.Topic) edition.Page

CreateEditionsListForStaticDatasetType creates an editions list page when dataset type is static, based on api model responses

func CreateFilterableLandingPage

func CreateFilterableLandingPage(ctx context.Context, basePage dpRendererModel.Page, d dpDatasetApiModels.Dataset, ver dpDatasetApiModels.Version,
	datasetID string, opts []dpDatasetApiSdk.VersionDimensionOptionsList, dims dpDatasetApiSdk.VersionDimensionsList, displayOtherVersionsLink bool,
	breadcrumbs []zebedee.Breadcrumb, latestVersionNumber int, latestVersionURL, apiRouterVersion string, maxNumOpts int) filterable.Page

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

func CreateStaticBasePage added in v1.68.0

func CreateStaticBasePage(basePage core.Page, d dpDatasetApiModels.Dataset, version dpDatasetApiModels.Version,
	allVersions []dpDatasetApiModels.Version, isEnableMultivariate bool, topicObjectList []*dpTopicApiModels.Topic,
) static.Page

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

func CreateStaticOverviewPage added in v1.68.0

func CreateStaticOverviewPage(ctx context.Context, basePage core.Page, datasetDetails dpDatasetApiModels.Dataset,
	version dpDatasetApiModels.Version, allVersions []dpDatasetApiModels.Version, isEnableMultivariate bool, topicObjectList []*dpTopicApiModels.Topic, isPublishing bool, enableApprovalButton bool,
) static.Page

CreateStaticLandingPage creates a static-overview page based on api model responses

func CreateVersionsList

func CreateVersionsList(basePage dpRendererModel.Page, req *http.Request, datasetDetails dpDatasetApiModels.Dataset, editionDetails dpDatasetApiModels.Edition, versions []dpDatasetApiModels.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 *dpRendererModel.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) []core.NavigationItem

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

func MapStaticDatasetToZebedee added in v1.85.0

func MapStaticDatasetToZebedee(ctx context.Context, dataset datasetAPIModels.Dataset, topicSlugs []string) (*zebedee.DatasetLandingPage, error)

MapStaticDatasetToZebedee maps a dataset of type static from the dataset API to the equivalent zebedee format.

func MapStaticVersionToZebedee added in v1.85.0

func MapStaticVersionToZebedee(dataset datasetAPIModels.Dataset, version datasetAPIModels.Version, previousVersions []datasetAPIModels.Version, topicSlugs []string) (*zebedee.Dataset, error)

MapStaticVersionToZebedee maps a version of type static from the dataset API to the equivalent zebedee format.

func UpdateBasePage added in v1.69.0

func UpdateBasePage(basePage *dpRendererModel.Page, dataset dpDatasetApiModels.Dataset,
	homepageContent zebedee.HomepageContent, isValidationError bool, lang string, request *http.Request)

Updates input `basePage` to include common dataset overview attributes, homepage content and dataset details across all dataset types

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 core.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 staticlegacy.Page

StaticDatasetLandingPage is a StaticDatasetLandingPage representation

func CreateLegacyDatasetLanding added in v1.13.0

func CreateLegacyDatasetLanding(ctx context.Context, basePage core.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