Documentation ¶
Index ¶
- Constants
- func CreateCensusBasePage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, ...) census.Page
- func CreateCensusFilterOutputsPage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, ...) census.Page
- func CreateCensusLandingPage(req *http.Request, basePage coreModel.Page, d dataset.DatasetDetails, ...) census.Page
- func CreateCustomDatasetPage(req *http.Request, basePage coreModel.Page, ...) custom.Page
- func CreateEditionsList(ctx context.Context, basePage coreModel.Page, req *http.Request, ...) edition.Page
- func CreateFilterableLandingPage(ctx context.Context, basePage coreModel.Page, req *http.Request, ...) filterable.Page
- func CreateVersionsList(basePage coreModel.Page, req *http.Request, d dataset.DatasetDetails, ...) version.Page
- func FindVersion(versionList []zebedee.Dataset, versionURI string) zebedee.Dataset
- func MapCookiePreferences(req *http.Request, preferencesIsSet *bool, policy *coreModel.CookiesPolicy)
- func MapDownloads(downloadsList []zebedee.Download, versionURI string) []datasetMdl.Download
- func MapNavigationContent(navigationContent topicModel.Navigation) []coreModel.NavigationItem
- type DatasetPage
- type StaticDatasetLandingPage
- type TimeSlice
Constants ¶
const ( Coverage = "Coverage" AreaType = "Area type" AnalyticsMaxItems = 4 )
Constants...
const ( AlertType = "alert" CorrectionAlertType = "correction" )
Constants...
const ( DimensionTime = "time" DimensionAge = "age" DimensionGeography = "geography" SixteensVersion = "749a88b" )
Constants names
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 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
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
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