models

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 0 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentItemLegacy

type ContentItemLegacy struct {
	Description DescriptionLegacy `json:"description"`
	Type        string            `json:"type"`
	URI         string            `json:"uri"`
}

type ContentTypeLegacy added in v1.20.0

type ContentTypeLegacy struct {
	Type  string `json:"type"`
	Count int    `json:"count"`
}

type DescriptionLegacy

type DescriptionLegacy struct {
	Contact           *contactLegacy      `json:"contact,omitempty"`
	DatasetID         string              `json:"dataset_id,omitempty"`
	Edition           string              `json:"edition,omitempty"`
	Headline1         string              `json:"headline1,omitempty"`
	Headline2         string              `json:"headline2,omitempty"`
	Headline3         string              `json:"headline3,omitempty"`
	Highlight         *HighlightObjLegacy `json:"highlight,omitempty"`
	Keywords          []*string           `json:"keywords,omitempty"`
	LatestRelease     *bool               `json:"latest_release,omitempty"`
	Language          string              `json:"language,omitempty"`
	MetaDescription   string              `json:"meta_description,omitempty"`
	NationalStatistic *bool               `json:"national_statistic,omitempty"`
	NextRelease       string              `json:"next_release,omitempty"`
	PreUnit           string              `json:"pre_unit,omitempty"`
	ReleaseDate       string              `json:"release_date,omitempty"`
	Source            string              `json:"source,omitempty"`
	Summary           string              `json:"summary"`
	Title             string              `json:"title"`
	Unit              string              `json:"unit,omitempty"`
}

type ESBucket

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

type ESBucketLegacy

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

type ESDocCounts

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

type ESHighlight

type ESHighlight struct {
	DescriptionTitle     []*string `json:"description.title"`
	DescriptionEdition   []*string `json:"description.edition"`
	DescriptionSummary   []*string `json:"description.summary"`
	DescriptionMeta      []*string `json:"description.metaDescription"`
	DescriptionKeywords  []*string `json:"description.keywords"`
	DescriptionDatasetID []*string `json:"description.datasetId"`
}

type ESHighlightLegacy

type ESHighlightLegacy struct {
	DescriptionTitle     []*string `json:"description.title"`
	DescriptionEdition   []*string `json:"description.edition"`
	DescriptionSummary   []*string `json:"description.summary"`
	DescriptionMeta      []*string `json:"description.metaDescription"`
	DescriptionKeywords  []*string `json:"description.keywords"`
	DescriptionDatasetID []*string `json:"description.datasetId"`
}

type ESResponseAggregations

type ESResponseAggregations struct {
	Doccounts ESDocCounts `json:"docCounts"`
}

type ESResponseAggregationsLegacy

type ESResponseAggregationsLegacy struct {
	DocCounts struct {
		Buckets []ESBucketLegacy `json:"buckets"`
	} `json:"docCounts"`
}

type ESResponseHit

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

type ESResponseHitLegacy

type ESResponseHitLegacy struct {
	Source    ESSourceDocumentLegacy `json:"_source"`
	Highlight ESHighlightLegacy      `json:"highlight"`
}

type ESResponseHits

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

type ESResponseHitsLegacy

type ESResponseHitsLegacy struct {
	Total int
	Hits  []ESResponseHitLegacy `json:"hits"`
}

type ESResponseItemLegacy

type ESResponseItemLegacy struct {
	Took         int                          `json:"took"`
	Hits         ESResponseHitsLegacy         `json:"hits"`
	Aggregations ESResponseAggregationsLegacy `json:"aggregations"`
	Suggest      ESSuggestLegacy              `json:"suggest"`
}

type ESResponseLegacy

type ESResponseLegacy struct {
	Responses []ESResponseItemLegacy `json:"responses"`
}

type ESSearchSuggestLegacy

type ESSearchSuggestLegacy struct {
	Options []ESSearchSuggestOptionsLegacy `json:"options"`
}

type ESSearchSuggestOptionsLegacy

type ESSearchSuggestOptionsLegacy struct {
	Text string `json:"text"`
}

type ESSourceDocument

type ESSourceDocument struct {
	DataType        string   `json:"type"`
	JobID           string   `json:"job_id"`
	SearchIndex     string   `json:"search_index"`
	CDID            string   `json:"cdid"`
	DatasetID       string   `json:"dataset_id"`
	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"`
}

type ESSourceDocumentLegacy

type ESSourceDocumentLegacy struct {
	Description struct {
		Summary           string         `json:"summary"`
		NextRelease       string         `json:"nextRelease,omitempty"`
		Unit              string         `json:"unit,omitempty"`
		Keywords          []*string      `json:"keywords,omitempty"`
		ReleaseDate       string         `json:"releaseDate,omitempty"`
		Edition           string         `json:"edition,omitempty"`
		LatestRelease     *bool          `json:"latestRelease,omitempty"`
		Language          string         `json:"language,omitempty"`
		Contact           *contactLegacy `json:"contact,omitempty"`
		DatasetID         string         `json:"datasetId,omitempty"`
		Source            string         `json:"source,omitempty"`
		Title             string         `json:"title"`
		MetaDescription   string         `json:"metaDescription,omitempty"`
		NationalStatistic *bool          `json:"nationalStatistic,omitempty"`
		PreUnit           string         `json:"preUnit,omitempty"`
		Headline1         string         `json:"headline1,omitempty"`
		Headline2         string         `json:"headline2,omitempty"`
		Headline3         string         `json:"headline3,omitempty"`
	} `json:"description"`
	Type string `json:"type"`
	URI  string `json:"uri"`
}

type ESSuggestLegacy

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

type EsResponse

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

type EsResponses

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

EsResponse holds a response slice from ES

type HighlightObjLegacy

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

type SearchResponse

type SearchResponse struct {
	Count               int                `json:"count"`
	Took                int                `json:"took"`
	Items               []ESSourceDocument `json:"items"`
	Suggestions         []string           `json:"suggestions,omitempty"`
	AdditionSuggestions []string           `json:"additional_suggestions,omitempty"`
}

type SearchResponseLegacy

type SearchResponseLegacy struct {
	Count               int                 `json:"count"`
	Took                int                 `json:"took"`
	ContentTypes        []ContentTypeLegacy `json:"content_types"`
	Items               []ContentItemLegacy `json:"items"`
	Suggestions         []string            `json:"suggestions,omitempty"`
	AdditionSuggestions []string            `json:"additional_suggestions,omitempty"`
}

Structs representing the transformed response

Jump to

Keyboard shortcuts

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