homepage

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Featured struct {
	Title string `json:"title"`
	URI   string `json:"uri"`
}

Featured is data for content that displays under a 'featured' heading

type HeadlineFigure

type HeadlineFigure struct {
	Title         string          `json:"title"`
	URI           string          `json:"uri"`
	ReleaseDate   string          `json:"releaseDate"`
	LatestFigure  LatestFigure    `json:"latestFigure"`
	SparklineData []SparklineData `json:"sparklineData"`
	StartDate     string          `json:"-"`
	EndDate       string          `json:"-"`
}

HeadlineFigure is the data for an individual timeseries

type Homepage

type Homepage struct {
	Releases        []Release         `json:"releases"`
	HeadlineFigures []*HeadlineFigure `json:"headlineFigures"`
	Featured        []Featured        `json:"featured"`
	Other           []Other           `json:"other"`
}

Homepage contains data specific to this page type

type LatestFigure

type LatestFigure struct {
	PreUnit string `json:"preUnit"`
	Unit    string `json:"unit"`
	Figure  string `json:"figure"`
}

LatestFigure is the extra information displayed for the latest figure for a timeseries

type Other

type Other struct {
	Title string `json:"title"`
	URI   string `json:"uri"`
}

Other is data for content that displays under a 'other' heading

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 SparklineData

type SparklineData struct {
	Name    string  `json:"name"`
	Y       float32 `json:"y"`
	StringY string  `json:"stringY"`
}

SparklineData is the data that is sent to highcharts to produce the sparkline for each timeseries

Jump to

Keyboard shortcuts

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