mapper

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DimensionTime = "time"
	DimensionAge  = "age"
)

Dimension names

Variables

This section is empty.

Functions

func CreateEditionsList

func CreateEditionsList(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(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(ctx context.Context, 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 *model.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(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