model

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calendar

type Calendar struct {
	coreModel.Page

	RSSLink             string                  `json:"rss_link"`
	ReleaseTypes        map[string]ReleaseType  `json:"release_types"`
	Sort                Sort                    `json:"sort"`
	Keywords            string                  `json:"keywords"`
	BeforeDate          DateFieldset            `json:"before_date"`
	AfterDate           DateFieldset            `json:"after_date"`
	Entries             Entries                 `json:"entries"`
	KeywordSearch       coreModel.CompactSearch `json:"keyword_search"`
	TotalSearchPosition int                     `json:"total_search_position,omitempty"`
}

func (Calendar) FuncIsFilterCensusPresent

func (calendar Calendar) FuncIsFilterCensusPresent() bool

func (Calendar) FuncIsFilterDatePresent

func (calendar Calendar) FuncIsFilterDatePresent() bool

func (Calendar) FuncIsFilterSearchPresent

func (calendar Calendar) FuncIsFilterSearchPresent() bool

type CalendarEntry

type CalendarEntry struct {
	URI              string             `json:"uri"`
	DateChanges      []DateChange       `json:"date_changes"`
	Description      ReleaseDescription `json:"description"`
	PublicationState PublicationState   `json:"publication_state"`
}

type ContactDetails

type ContactDetails struct {
	Name      string `json:"name"`
	Email     string `json:"email"`
	Telephone string `json:"telephone"`
}

type DateChange

type DateChange struct {
	ChangeNotice string `json:"change_notice"`
	Date         string `json:"previous_date"`
}

type DateFieldset added in v1.7.0

type DateFieldset struct {
	Input                 coreModel.InputDate
	HasValidationErr      bool
	ValidationDescription []string
	ID                    string
}

type Entries added in v1.6.0

type Entries struct {
	Count int             `json:"count"`
	Items []CalendarEntry `json:"items"`
}
type Link struct {
	Title   string `json:"title"`
	URI     string `json:"uri"`
	Summary string `json:"summary"`
}

type PublicationState

type PublicationState struct {
	Type    string `json:"type"`
	SubType string `json:"sub_type"`
}

PublicationState represents Types 'cancelled', 'published', or 'upcoming' SubTypes of 'upcoming' are 'confirmed', 'postponed', or 'provisional'

type Release

type Release struct {
	coreModel.Page
	Markdown                  []string           `json:"markdown"`
	RelatedDocuments          []Link             `json:"related_documents"`
	RelatedDatasets           []Link             `json:"related_datasets"`
	RelatedAPIDatasets        []Link             `json:"related_api_datasets"`
	RelatedMethodology        []Link             `json:"related_methodology"`
	RelatedMethodologyArticle []Link             `json:"related_methodology_article"`
	Links                     []Link             `json:"links"`
	DateChanges               []DateChange       `json:"date_changes"`
	Description               ReleaseDescription `json:"description"`
	AboutTheData              bool               `json:"about_the_data"`
	PublicationState          PublicationState   `json:"publication_state"`
}

func (Release) FuncGetPostponementReason

func (release Release) FuncGetPostponementReason() string

FuncGetPostponementReason Gets the most recent postponement reason, if available

type ReleaseDescription

type ReleaseDescription struct {
	CancellationNotice []string       `json:"cancellation_notice"`
	Cancelled          bool           `json:"cancelled"`
	Contact            ContactDetails `json:"contact"`
	Finalised          bool           `json:"finalised"`
	NationalStatistic  bool           `json:"national_statistic"`
	WelshStatistic     bool           `json:"welsh_statistic"`
	Census2021         bool           `json:"census_2021"`
	NextRelease        string         `json:"next_release"`
	ProvisionalDate    string         `json:"provisional_date"`
	Published          bool           `json:"published"`
	ReleaseDate        string         `json:"release_date"`
	Summary            string         `json:"summary"`
	Title              string         `json:"title"`
}

type ReleaseType

type ReleaseType struct {
	DataAttributes []coreModel.DataAttribute `json:"data_attributes"`
	ID             string                    `json:"id"`
	Label          coreModel.Localisation    `json:"label"`
	Language       string                    `json:"language"`
	Name           string                    `json:"name"`
	Value          string                    `json:"value"`
	IsChecked      bool                      `json:"is_checked"`
	IsDisabled     bool                      `json:"is_disabled"`
	IsRequired     bool                      `json:"is_required"`
	Count          int                       `json:"count"`
	SubTypes       map[string]ReleaseType    `json:"sub_types"`
}

type Sort

type Sort struct {
	Mode    string       `json:"mode"`
	Options []SortOption `json:"options"`
}

type SortOption

type SortOption struct {
	LocaleKey string `json:"locale_key"`
	Plural    int    `json:"plural"`
	Value     string `json:"value"`
	Disabled  bool   `json:"disabled"`
}

Jump to

Keyboard shortcuts

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