Documentation ¶
Index ¶
- Variables
- type AlternateID
- type Content
- type DeepLink
- type Dictionary
- func (dict *Dictionary[T]) Lookup(key string) (zero T, ok bool)
- func (dict *Dictionary[T]) Map() map[string]T
- func (dict *Dictionary[T]) MarshalJSON() ([]byte, error)
- func (dict *Dictionary[T]) Message(tag language.Tag) (zero T)
- func (dict *Dictionary[T]) Neutral() (zero T)
- func (dict *Dictionary[T]) UnmarshalJSON(b []byte) error
- type Filter
- type FilterOptions
- type Image
- type Item
- type ItemReference
- type ItemType
- type Keyword
- type ModerationState
- type ModerationStatus
- type Price
- type PriceAmount
- type PriceAmountOverride
- type PriceOptions
- type PriceOptionsOverride
- type PriceOverride
- type Query
- type Rating
- type SearchResult
- type StoreDetails
- type StoreReference
Constants ¶
This section is empty.
Variables ¶
View Source
var Languages []language.Tag
Functions ¶
This section is empty.
Types ¶
type AlternateID ¶
type Dictionary ¶
type Dictionary[T comparable] struct { // contains filtered or unexported fields }
func (*Dictionary[T]) Lookup ¶
func (dict *Dictionary[T]) Lookup(key string) (zero T, ok bool)
func (*Dictionary[T]) Map ¶
func (dict *Dictionary[T]) Map() map[string]T
func (*Dictionary[T]) MarshalJSON ¶
func (dict *Dictionary[T]) MarshalJSON() ([]byte, error)
func (*Dictionary[T]) Message ¶
func (dict *Dictionary[T]) Message(tag language.Tag) (zero T)
func (*Dictionary[T]) Neutral ¶
func (dict *Dictionary[T]) Neutral() (zero T)
func (*Dictionary[T]) UnmarshalJSON ¶
func (dict *Dictionary[T]) UnmarshalJSON(b []byte) error
type Filter ¶
type Filter struct { // Count is the number of returned items included in the SearchResult. The maximum value is 50 and is stored // to 10 service-side by default. Count int `json:"Count,omitempty"` // ContinuationToken is the opaque token used for continuing the query of Search, if any are available. It is // normally filled from SearchResult.ContinuationToken. ContinuationToken string `json:"ContinuationToken,omitempty"` // CustomTags is the optional properties associated with the request. CustomTags map[string]any `json:"CustomTags,omitempty"` // Entity is the nullable entity.Key to perform any actions. Entity *entity.Key `json:"Entity,omitempty"` // Filter is an OData query for filtering the SearchResult. Filter string `json:"Filter,omitempty"` // OrderBy is an OData sort query for sorting the index of SearchResult. Defaulted to relevance. OrderBy string `json:"OrderBy,omitempty"` // Term is the string terms to be searched. Term string `json:"Search,omitempty"` // Select is an OData selection query for filtering the fields of returned items included in the SearchResult. Select string `json:"Select,omitempty"` // Store ... Store *StoreReference `json:"Store,omitempty"` // Language is used as the `Accept-Language` header of the request and is generally used to display // a localized dictionaries catalog items. It must be one of the supported Languages, otherwise it // will be ignored by the request hook. Language language.Tag `json:"-"` }
type FilterOptions ¶
type Item ¶
type Item struct { AlternateIDs []AlternateID `json:"AlternateIds,omitempty"` ContentType string `json:"ContentType,omitempty"` Contents []Content `json:"Contents,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` CreatorEntity entity.Key `json:"CreatorEntity,omitempty"` DeepLinks []DeepLink `json:"DeepLinks,omitempty"` DefaultStackID string `json:"DefaultStackId,omitempty"` // new? Description Dictionary[string] `json:"Description,omitempty"` DisplayProperties map[string]json.RawMessage `json:"DisplayProperties,omitempty"` DisplayVersion string `json:"DisplayVersion,omitempty"` ETag string `json:"ETag,omitempty"` EndDate time.Time `json:"EndDate,omitempty"` ID string `json:"Id,omitempty"` Images []Image `json:"Images,omitempty"` Hidden *bool `json:"IsHidden,omitempty"` ItemReferences []ItemReference `json:"ItemReferences,omitempty"` Keywords Dictionary[*Keyword] `json:"Keywords,omitempty"` LastModifiedDate time.Time `json:"LastModifiedDate,omitempty"` Moderation ModerationState `json:"Moderation,omitempty"` Platforms []string `json:"Platforms,omitempty"` PriceOptions PriceOptions `json:"PriceOptions,omitempty"` Rating Rating `json:"Rating,omitempty"` StartDate time.Time `json:"StartDate,omitempty"` StoreDetails StoreDetails `json:"StoreDetails,omitempty"` Tags []string `json:"Tags,omitempty"` Title Dictionary[string] `json:"Title,omitempty"` Type ItemType `json:"Type,omitempty"` }
type ItemReference ¶
type ItemReference struct { Amount int `json:"Amount,omitempty"` ID string `json:"Id,omitempty"` PriceOptions PriceOptions `json:"PriceOptions,omitempty"` }
type ModerationState ¶
type ModerationState struct { LastModifiedDate time.Time `json:"LastModifiedDate,omitempty"` Reason string `json:"Reason,omitempty"` Status ModerationStatus `json:"Status,omitempty"` }
type ModerationStatus ¶
type ModerationStatus string
const ( ModerationStatusApproved ModerationStatus = "Approved" ModerationStatusAwaitingModeration ModerationStatus = "AwaitingModeration" ModerationStatusRejected ModerationStatus = "Rejected" ModerationStatusUnknown ModerationStatus = "Unknown" )
type Price ¶
type Price struct { Amounts []PriceAmount `json:"Amounts,omitempty"` UnitDurationInSeconds int `json:"UnitDurationInSeconds,omitempty"` }
type PriceAmount ¶
type PriceAmountOverride ¶
type PriceOptions ¶
type PriceOptions []Price
func (PriceOptions) MarshalJSON ¶
func (opts PriceOptions) MarshalJSON() ([]byte, error)
func (*PriceOptions) UnmarshalJSON ¶
func (opts *PriceOptions) UnmarshalJSON(b []byte) error
type PriceOptionsOverride ¶
type PriceOptionsOverride []PriceOverride
func (PriceOptionsOverride) MarshalJSON ¶
func (opts PriceOptionsOverride) MarshalJSON() ([]byte, error)
func (*PriceOptionsOverride) UnmarshalJSON ¶
func (opts *PriceOptionsOverride) UnmarshalJSON(b []byte) error
type PriceOverride ¶
type PriceOverride struct {
Amounts []PriceAmountOverride `json:"Amounts,omitempty"`
}
type Query ¶
type Rating ¶
type Rating struct { Average float32 `json:"Average,omitempty"` Count1Star int `json:"Count1Star,omitempty"` Count2Star int `json:"Count2Star,omitempty"` Count3Star int `json:"Count3Star,omitempty"` Count4Star int `json:"Count4Star,omitempty"` Count5Star int `json:"Count5Star,omitempty"` TotalCount int `json:"TotalCount,omitempty"` }
type SearchResult ¶
type StoreDetails ¶
type StoreDetails struct { FilterOptions FilterOptions `json:"FilterOptions,omitempty"` PriceOptionsOverride PriceOptionsOverride `json:"PriceOptionsOverride,omitempty"` }
type StoreReference ¶
type StoreReference struct { AlternateID AlternateID `json:"AlternateId,omitempty"` ID string `json:"Id,omitempty"` }
Click to show internal directories.
Click to hide internal directories.