model

package
v1.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Census added in v1.29.0

type Census struct {
	AvailableTopics             []Topics `json:"available_topics"`
	UnavailableTopics           []Topics `json:"unavailable_topics"`
	EnableCensusTopicSubsection bool     `json:"enable_census_topic_subsection"`
	EnableGetDataCard           bool     `json:"enable_get_data_card"`
	EnableCustomDataset         bool     `json:"enable_custom_dataset"`
	DatasetFinderEnabled        bool     `json:"dataset_finder_enabled"`
	CensusSearchTopicID         string   `json:"census_search_topic_id"`
	GetCensusDataURLQuery       string   `json:"get_census_data_url_query"`
	EnableFeedbackAPI           bool     `json:"enable_feedback_api"`
	FeedbackAPIURL              string   `json:"feedback_api_url"`
}

Census is data for the census hub

type CensusPage added in v1.29.0

type CensusPage struct {
	model.Page
	Data Census `json:"data"`
}

Page contains data re-used for each page type a Data struct for data specific to the page type

type Feature

type Feature struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URI         string `json:"uri"`
	ImageURL    string `json:"image_url"`
	ImageAlt    string `json:"image_alt"`
}

Feature is data for linked content

type FigureURIs

type FigureURIs struct {
	Analysis string `json:"analysis"`
	Data     string `json:"data"`
}

FigureURIs struct contains URI's to related analysis and data

type Homepage

type Homepage struct {
	MainFigures        map[string]*MainFigure `json:"main_figures"`
	HasMainFigures     bool                   `json:"has_main_figures"`
	ReleaseCalendar    ReleaseCalendar        `json:"release_calendar"`
	Featured           []Feature              `json:"featured"`
	HasFeaturedContent bool                   `json:"has_featured_content"`
	AroundONS          []Feature              `json:"arounds_ons"`
	EnableFeedbackAPI  bool                   `json:"enable_feedback_api"`
	FeedbackAPIURL     string                 `json:"feedback_api_url"`
}

Homepage contains data specific to this page type

type HomepageData

type HomepageData struct {
	AroundONS       *[]Feature
	EmergencyBanner zebedee.EmergencyBanner
	FeaturedContent *[]Feature
	MainFigures     map[string]*MainFigure
	ReleaseCalendar *ReleaseCalendar
	ServiceMessage  string
}

type MainFigure

type MainFigure struct {
	ID               string     `json:"id"`
	Title            string     `json:"title"`
	Summary          string     `json:"summary"`
	Date             string     `json:"date"`
	Figure           string     `json:"figure"`
	Trend            Trend      `json:"trend"`
	ShowTrend        bool       `json:"show_trend"`
	TrendDescription string     `json:"trend_description"`
	Unit             string     `json:"unit"`
	FigureURIs       FigureURIs `json:"figure_uris"`
}

MainFigure is the data for an individual timeseries

type Page

type Page struct {
	model.Page
	Data Homepage `json:"data"`
}

Page contains data re-used for each page type a Data struct for data specific to the page type

type Release

type Release struct {
	Title       string `json:"title"`
	URI         string `json:"uri"`
	ReleaseDate string `json:"releaseDate"`
}

Release is the data for an individual release

type ReleaseCalendar

type ReleaseCalendar struct {
	Releases                         []Release `json:"releases"`
	NumberOfReleases                 int       `json:"number_of_releases"`
	NumberOfOtherReleasesInSevenDays int       `json:"number_of_other_releases"`
}

ReleaseCalendar is data for release calendar block

type Topics added in v1.28.0

type Topics struct {
	Topic       string `json:"topic"`
	ReleaseDate string `json:"release_date"`
	URL         string `json:"url"`
	ID          string `json:"id"`
}

Topics is the data for topics

type Trend

type Trend struct {
	IsUp       bool   `json:"is_up"`
	IsDown     bool   `json:"is_down"`
	IsFlat     bool   `json:"is_flat"`
	Difference string `json:"difference"`
	Period     string `json:"period"`
}

Trend contains bool values about the trend of a key figure (up from last month, down from last month, etc.)

Jump to

Keyboard shortcuts

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