mapper

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 23 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 (
	DimensionTime = "time"
	DimensionAge  = "age"
)

Dimension names

Variables

This section is empty.

Functions

func CreateCensusDatasetLandingPage added in v1.24.0

func CreateCensusDatasetLandingPage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, version dataset.Version, initialVersionReleaseDate string, hasOtherVersions bool, lang string) datasetLandingPageCensus.Page

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

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) 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) 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) datasetVersionsList.Page

CreateVersionsList creates a versions list page based on api model responses

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

Types

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) 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)

Jump to

Keyboard shortcuts

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