models

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 0 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountValue

type CountValue struct {
	Value int `json:"value"`
}

type CreateIndexResponse

type CreateIndexResponse struct {
	IndexName string `json:"index_name"`
}

type ESBucket

type ESBucket struct {
	Key   string `json:"key"`
	Count int    `json:"doc_count"`
}

type ESDimensions

type ESDimensions struct {
	Name     string `json:"name"`
	Label    string `json:"label"`
	RawLabel string `json:"raw_label"`
}

type ESDocCounts

type ESDocCounts struct {
	Buckets []ESBucket `json:"buckets"`
}

type ESHighlight

type ESHighlight struct {
	Title     []*string `json:"title"`
	Edition   []*string `json:"edition"`
	Summary   []*string `json:"summary"`
	MetaDesc  []*string `json:"meta_description"`
	Keywords  []*string `json:"keywords"`
	DatasetID []*string `json:"dataset_id"`
}

type ESResponseAggregations

type ESResponseAggregations struct {
	ContentTypes       ESDocCounts `json:"content_types"`
	Topic              ESDocCounts `json:"topic"`
	Dimensions         ESDocCounts `json:"dimensions"`
	DistinctTopicCount CountValue  `json:"distinct_topics_count"`
}

type ESResponseHit

type ESResponseHit struct {
	Source    ESSourceDocument `json:"_source"`
	Highlight *ESHighlight     `json:"highlight"`
}

type ESResponseHits

type ESResponseHits struct {
	Total int
	Hits  []ESResponseHit `json:"hits"`
}

type ESSourceDocument

type ESSourceDocument struct {
	DataType        string              `json:"type"`
	CDID            string              `json:"cdid"`
	DatasetID       string              `json:"dataset_id"`
	Edition         string              `json:"edition"`
	Keywords        []string            `json:"keywords"`
	MetaDescription string              `json:"meta_description"`
	ReleaseDate     string              `json:"release_date,omitempty"`
	Summary         string              `json:"summary"`
	Title           string              `json:"title"`
	Topics          []string            `json:"topics"`
	URI             string              `json:"uri"`
	Highlight       *HighlightObj       `json:"highlight,omitempty"`
	DateChanges     []ReleaseDateChange `json:"date_changes,omitempty"`
	Cancelled       bool                `json:"cancelled,omitempty"`
	CanonicalTopic  string              `json:"canonical_topic"`
	Finalised       bool                `json:"finalised,omitempty"`
	ProvisionalDate string              `json:"provisional_date,omitempty"`
	PreviousURIs    []string            `json:"previous_uris,omitempty"`
	Published       bool                `json:"published,omitempty"`
	Language        string              `json:"language,omitempty"`
	Survey          string              `json:"survey,omitempty"`
	Dimensions      []ESDimensions      `json:"dimensions,omitempty"`
}

type EsResponse

type EsResponse struct {
	Took         int                    `json:"took"`
	Hits         ESResponseHits         `json:"hits"`
	Aggregations ESResponseAggregations `json:"aggregations"`
	Suggest      Suggest                `json:"suggest"`
}

type EsResponses

type EsResponses struct {
	Responses []*EsResponse `json:"responses"`
}

EsResponse holds a response slice from ES

type FilterCount

type FilterCount struct {
	Type  string `json:"type"`
	Label string `json:"label"`
	Count int    `json:"count"`
}

FilterCount represents the API response for an aggregation

type HighlightObj

type HighlightObj struct {
	DatasetID       string    `json:"dataset_id,omitempty"`
	Keywords        []*string `json:"keywords,omitempty"`
	MetaDescription string    `json:"meta_description,omitempty"`
	Summary         string    `json:"summary,omitempty"`
	Title           string    `json:"title,omitempty"`
}

type Item

type Item struct {
	DataType        string              `json:"type"`
	CDID            string              `json:"cdid"`
	DatasetID       string              `json:"dataset_id"`
	Edition         string              `json:"edition"`
	Keywords        []string            `json:"keywords"`
	MetaDescription string              `json:"meta_description"`
	ReleaseDate     string              `json:"release_date,omitempty"`
	Summary         string              `json:"summary"`
	Title           string              `json:"title"`
	Topics          []string            `json:"topics"`
	URI             string              `json:"uri"`
	Highlight       *HighlightObj       `json:"highlight,omitempty"`
	DateChanges     []ReleaseDateChange `json:"date_changes,omitempty"`
	Cancelled       bool                `json:"cancelled,omitempty"`
	CanonicalTopic  string              `json:"canonical_topic"`
	Finalised       bool                `json:"finalised,omitempty"`
	ProvisionalDate string              `json:"provisional_date,omitempty"`
	PreviousURIs    []string            `json:"previous_uris,omitempty"`
	Published       bool                `json:"published,omitempty"`
	Language        string              `json:"language,omitempty"`
	Survey          string              `json:"survey,omitempty"`
	Dimensions      []ESDimensions      `json:"dimensions,omitempty"`
}

type Option

type Option struct {
	Text  string  `json:"text"`
	Score float64 `json:"score"`
}

type ReleaseDateChange

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

ReleaseDateChange represent a date change of a release

type SearchResponse

type SearchResponse struct {
	Count               int           `json:"count"`
	Took                int           `json:"took"`
	DistinctItemsCount  int           `json:"distinct_items_count"`
	Topics              []FilterCount `json:"topics"`
	ContentTypes        []FilterCount `json:"content_types"`
	Items               []Item        `json:"items"`
	Suggestions         []string      `json:"suggestions,omitempty"`
	AdditionSuggestions []string      `json:"additional_suggestions,omitempty"`
	Dimensions          []FilterCount `json:"dimensions,omitempty"`
}

type SearchSuggest

type SearchSuggest struct {
	Text    string   `json:"text"`
	Offset  int      `json:"offset"`
	Length  int      `json:"length"`
	Options []Option `json:"options"`
}

type Suggest

type Suggest struct {
	SearchSuggest []SearchSuggest `json:"search_suggest"`
}

Jump to

Keyboard shortcuts

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