client

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

View Source
const MediathekEntriesDocument = `` /* 1166-byte string literal not displayed */
View Source
const SearchDocument = `` /* 1992-byte string literal not displayed */

Variables

View Source
var DocumentOperationNames = map[string]string{
	MediathekEntriesDocument: "MediathekEntries",
	SearchDocument:           "search",
}

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *clientv2.Client
}

func (*Client) MediathekEntries

func (c *Client) MediathekEntries(ctx context.Context, signatures []string, interceptors ...clientv2.RequestInterceptor) (*MediathekEntries, error)

func (*Client) Search

func (c *Client) Search(ctx context.Context, query string, facets []*InFacet, filter []*InFilter, vector []float64, first *int64, size *int64, cursor *string, sort []*SortField, interceptors ...clientv2.RequestInterceptor) (*Search, error)

type Facet

type Facet struct {
	Name   string       `json:"name"`
	Values []FacetValue `json:"values,omitempty"`
}

type FacetFragment

type FacetFragment struct {
	Name   string                "json:\"name\" graphql:\"name\""
	Values []*FacetValueFragment "json:\"values,omitempty\" graphql:\"values\""
}

func (*FacetFragment) GetName

func (t *FacetFragment) GetName() string

func (*FacetFragment) GetValues

func (t *FacetFragment) GetValues() []*FacetValueFragment

type FacetValue

type FacetValue interface {
	IsFacetValue()
}

type FacetValueFragment

type FacetValueFragment struct {
	FacetValueString FacetValueStringFragment "graphql:\"... on FacetValueString\""
	FacetValueInt    FacetValueIntFragment    "graphql:\"... on FacetValueInt\""
}

func (*FacetValueFragment) GetFacetValueInt

func (t *FacetValueFragment) GetFacetValueInt() *FacetValueIntFragment

func (*FacetValueFragment) GetFacetValueString

func (t *FacetValueFragment) GetFacetValueString() *FacetValueStringFragment

type FacetValueInt

type FacetValueInt struct {
	IntVal int64 `json:"intVal"`
	Count  int64 `json:"count"`
}

func (FacetValueInt) IsFacetValue

func (FacetValueInt) IsFacetValue()

type FacetValueIntFragment

type FacetValueIntFragment struct {
	IntVal int64 "json:\"intVal\" graphql:\"intVal\""
	Count  int64 "json:\"count\" graphql:\"count\""
}

func (*FacetValueIntFragment) GetCount

func (t *FacetValueIntFragment) GetCount() int64

func (*FacetValueIntFragment) GetIntVal

func (t *FacetValueIntFragment) GetIntVal() int64

type FacetValueString

type FacetValueString struct {
	StrVal string `json:"strVal"`
	Count  int64  `json:"count"`
}

func (FacetValueString) IsFacetValue

func (FacetValueString) IsFacetValue()

type FacetValueStringFragment

type FacetValueStringFragment struct {
	StrVal string "json:\"strVal\" graphql:\"strVal\""
	Count  int64  "json:\"count\" graphql:\"count\""
}

func (*FacetValueStringFragment) GetCount

func (t *FacetValueStringFragment) GetCount() int64

func (*FacetValueStringFragment) GetStrVal

func (t *FacetValueStringFragment) GetStrVal() string

type InFacet

type InFacet struct {
	Term  *InFacetTerm `json:"term,omitempty"`
	Query *InFilter    `json:"query"`
}

type InFacetTerm

type InFacetTerm struct {
	Field       string   `json:"field"`
	Name        string   `json:"name"`
	MinDocCount int64    `json:"minDocCount"`
	Size        int64    `json:"size"`
	Include     []string `json:"include,omitempty"`
	Exclude     []string `json:"exclude,omitempty"`
}

type InFilter

type InFilter struct {
	BoolTerm *InFilterBoolTerm `json:"boolTerm,omitempty"`
}

type InFilterBoolTerm

type InFilterBoolTerm struct {
	Field  string   `json:"field"`
	And    bool     `json:"and"`
	Values []string `json:"values,omitempty"`
}

type KeyValue

type KeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type KeyValueFragment

type KeyValueFragment struct {
	Key   string "json:\"key\" graphql:\"key\""
	Value string "json:\"value\" graphql:\"value\""
}

func (*KeyValueFragment) GetKey

func (t *KeyValueFragment) GetKey() string

func (*KeyValueFragment) GetValue

func (t *KeyValueFragment) GetValue() string

type Media

type Media struct {
	Name        string  `json:"name"`
	Mimetype    string  `json:"mimetype"`
	Pronom      *string `json:"pronom,omitempty"`
	Type        string  `json:"type"`
	URI         string  `json:"uri"`
	Orientation int64   `json:"orientation"`
	Fulltext    *string `json:"fulltext,omitempty"`
	Width       int64   `json:"width"`
	Height      int64   `json:"height"`
	Length      int64   `json:"length"`
}

type MediaItemFragment

type MediaItemFragment struct {
	Name        string  "json:\"name\" graphql:\"name\""
	Mimetype    string  "json:\"mimetype\" graphql:\"mimetype\""
	Pronom      *string "json:\"pronom,omitempty\" graphql:\"pronom\""
	Type        string  "json:\"type\" graphql:\"type\""
	URI         string  "json:\"uri\" graphql:\"uri\""
	Orientation int64   "json:\"orientation\" graphql:\"orientation\""
	Width       int64   "json:\"width\" graphql:\"width\""
	Height      int64   "json:\"height\" graphql:\"height\""
}

func (*MediaItemFragment) GetHeight

func (t *MediaItemFragment) GetHeight() int64

func (*MediaItemFragment) GetMimetype

func (t *MediaItemFragment) GetMimetype() string

func (*MediaItemFragment) GetName

func (t *MediaItemFragment) GetName() string

func (*MediaItemFragment) GetOrientation

func (t *MediaItemFragment) GetOrientation() int64

func (*MediaItemFragment) GetPronom

func (t *MediaItemFragment) GetPronom() *string

func (*MediaItemFragment) GetType

func (t *MediaItemFragment) GetType() string

func (*MediaItemFragment) GetURI

func (t *MediaItemFragment) GetURI() string

func (*MediaItemFragment) GetWidth

func (t *MediaItemFragment) GetWidth() int64

type MediaList

type MediaList struct {
	Name  string   `json:"name"`
	Items []*Media `json:"items"`
}

type MediaListFragment

type MediaListFragment struct {
	Name  string               "json:\"name\" graphql:\"name\""
	Items []*MediaItemFragment "json:\"items\" graphql:\"items\""
}

func (*MediaListFragment) GetItems

func (t *MediaListFragment) GetItems() []*MediaItemFragment

func (*MediaListFragment) GetName

func (t *MediaListFragment) GetName() string

type MediathekBaseEntry

type MediathekBaseEntry struct {
	ID                string             `json:"id"`
	Signature         string             `json:"signature"`
	SignatureOriginal string             `json:"signatureOriginal"`
	Source            string             `json:"source"`
	Title             []*MultiLangString `json:"title"`
	Series            *string            `json:"series,omitempty"`
	Place             *string            `json:"place,omitempty"`
	Date              *string            `json:"date,omitempty"`
	CollectionTitle   *string            `json:"collectionTitle,omitempty"`
	Person            []*Person          `json:"person,omitempty"`
	Catalog           []string           `json:"catalog,omitempty"`
	Category          []string           `json:"category,omitempty"`
	Tags              []string           `json:"tags,omitempty"`
	URL               *string            `json:"url,omitempty"`
	Publisher         *string            `json:"publisher,omitempty"`
	Rights            *string            `json:"rights,omitempty"`
	License           *string            `json:"license,omitempty"`
	References        []*Reference       `json:"references,omitempty"`
	Type              *string            `json:"type,omitempty"`
	Poster            *Media             `json:"poster,omitempty"`
}

type MediathekBaseFragment

type MediathekBaseFragment struct {
	Signature       string               "json:\"signature\" graphql:\"signature\""
	CollectionTitle *string              "json:\"collectionTitle,omitempty\" graphql:\"collectionTitle\""
	Source          string               "json:\"source\" graphql:\"source\""
	Title           []*MultiLangFragment "json:\"title\" graphql:\"title\""
	Person          []*PersonFragment    "json:\"person,omitempty\" graphql:\"person\""
	Series          *string              "json:\"series,omitempty\" graphql:\"series\""
	Place           *string              "json:\"place,omitempty\" graphql:\"place\""
	Date            *string              "json:\"date,omitempty\" graphql:\"date\""
	Category        []string             "json:\"category,omitempty\" graphql:\"category\""
	Tags            []string             "json:\"tags,omitempty\" graphql:\"tags\""
	URL             *string              "json:\"url,omitempty\" graphql:\"url\""
	Publisher       *string              "json:\"publisher,omitempty\" graphql:\"publisher\""
	Rights          *string              "json:\"rights,omitempty\" graphql:\"rights\""
	License         *string              "json:\"license,omitempty\" graphql:\"license\""
	Type            *string              "json:\"type,omitempty\" graphql:\"type\""
	Poster          *MediaItemFragment   "json:\"poster,omitempty\" graphql:\"poster\""
	References      []*ReferenceFragment "json:\"references,omitempty\" graphql:\"references\""
}

func (*MediathekBaseFragment) GetCategory

func (t *MediathekBaseFragment) GetCategory() []string

func (*MediathekBaseFragment) GetCollectionTitle

func (t *MediathekBaseFragment) GetCollectionTitle() *string

func (*MediathekBaseFragment) GetDate

func (t *MediathekBaseFragment) GetDate() *string

func (*MediathekBaseFragment) GetLicense

func (t *MediathekBaseFragment) GetLicense() *string

func (*MediathekBaseFragment) GetPerson

func (t *MediathekBaseFragment) GetPerson() []*PersonFragment

func (*MediathekBaseFragment) GetPlace

func (t *MediathekBaseFragment) GetPlace() *string

func (*MediathekBaseFragment) GetPoster

func (t *MediathekBaseFragment) GetPoster() *MediaItemFragment

func (*MediathekBaseFragment) GetPublisher

func (t *MediathekBaseFragment) GetPublisher() *string

func (*MediathekBaseFragment) GetReferences

func (t *MediathekBaseFragment) GetReferences() []*ReferenceFragment

func (*MediathekBaseFragment) GetRights

func (t *MediathekBaseFragment) GetRights() *string

func (*MediathekBaseFragment) GetSeries

func (t *MediathekBaseFragment) GetSeries() *string

func (*MediathekBaseFragment) GetSignature

func (t *MediathekBaseFragment) GetSignature() string

func (*MediathekBaseFragment) GetSource

func (t *MediathekBaseFragment) GetSource() string

func (*MediathekBaseFragment) GetTags

func (t *MediathekBaseFragment) GetTags() []string

func (*MediathekBaseFragment) GetTitle

func (t *MediathekBaseFragment) GetTitle() []*MultiLangFragment

func (*MediathekBaseFragment) GetType

func (t *MediathekBaseFragment) GetType() *string

func (*MediathekBaseFragment) GetURL

func (t *MediathekBaseFragment) GetURL() *string

type MediathekEntries

type MediathekEntries struct {
	MediathekEntries []*MediathekEntries_MediathekEntries "json:\"mediathekEntries,omitempty\" graphql:\"mediathekEntries\""
}

func (*MediathekEntries) GetMediathekEntries

func (t *MediathekEntries) GetMediathekEntries() []*MediathekEntries_MediathekEntries

type MediathekEntries_MediathekEntries

type MediathekEntries_MediathekEntries struct {
	ID             string                   "json:\"id\" graphql:\"id\""
	Base           *MediathekBaseFragment   "json:\"base\" graphql:\"base\""
	Notes          []*NoteFragment          "json:\"notes,omitempty\" graphql:\"notes\""
	Abstract       []*MultiLangFragment     "json:\"abstract,omitempty\" graphql:\"abstract\""
	Extra          []*KeyValueFragment      "json:\"extra,omitempty\" graphql:\"extra\""
	Media          []*MediaListFragment     "json:\"media,omitempty\" graphql:\"media\""
	ReferencesFull []*MediathekBaseFragment "json:\"referencesFull,omitempty\" graphql:\"referencesFull\""
	Typename       *string                  "json:\"__typename,omitempty\" graphql:\"__typename\""
}

func (*MediathekEntries_MediathekEntries) GetAbstract

func (*MediathekEntries_MediathekEntries) GetBase

func (*MediathekEntries_MediathekEntries) GetExtra

func (*MediathekEntries_MediathekEntries) GetID

func (*MediathekEntries_MediathekEntries) GetMedia

func (*MediathekEntries_MediathekEntries) GetNotes

func (*MediathekEntries_MediathekEntries) GetReferencesFull

func (t *MediathekEntries_MediathekEntries) GetReferencesFull() []*MediathekBaseFragment

func (*MediathekEntries_MediathekEntries) GetTypename

func (t *MediathekEntries_MediathekEntries) GetTypename() *string

type MediathekFullEntry

type MediathekFullEntry struct {
	ID             string                `json:"id"`
	Base           *MediathekBaseEntry   `json:"base"`
	Notes          []*Note               `json:"notes,omitempty"`
	Abstract       []*MultiLangString    `json:"abstract,omitempty"`
	ReferencesFull []*MediathekBaseEntry `json:"referencesFull,omitempty"`
	Extra          []*KeyValue           `json:"extra,omitempty"`
	Media          []*MediaList          `json:"media,omitempty"`
}

type MultiLangFragment

type MultiLangFragment struct {
	Lang       string "json:\"lang\" graphql:\"lang\""
	Value      string "json:\"value\" graphql:\"value\""
	Translated bool   "json:\"translated\" graphql:\"translated\""
}

func (*MultiLangFragment) GetLang

func (t *MultiLangFragment) GetLang() string

func (*MultiLangFragment) GetTranslated

func (t *MultiLangFragment) GetTranslated() bool

func (*MultiLangFragment) GetValue

func (t *MultiLangFragment) GetValue() string

type MultiLangString

type MultiLangString struct {
	Lang       string `json:"lang"`
	Value      string `json:"value"`
	Translated bool   `json:"translated"`
}

type Note

type Note struct {
	Title *string `json:"title,omitempty"`
	Text  string  `json:"text"`
}

type NoteFragment

type NoteFragment struct {
	Title *string "json:\"title,omitempty\" graphql:\"title\""
	Text  string  "json:\"text\" graphql:\"text\""
}

func (*NoteFragment) GetText

func (t *NoteFragment) GetText() string

func (*NoteFragment) GetTitle

func (t *NoteFragment) GetTitle() *string

type PageInfo

type PageInfo struct {
	HasNextPage     bool   `json:"hasNextPage"`
	HasPreviousPage bool   `json:"hasPreviousPage"`
	CurrentCursor   string `json:"currentCursor"`
	StartCursor     string `json:"startCursor"`
	EndCursor       string `json:"endCursor"`
}

type PageInfoFragment

type PageInfoFragment struct {
	HasNextPage     bool   "json:\"hasNextPage\" graphql:\"hasNextPage\""
	HasPreviousPage bool   "json:\"hasPreviousPage\" graphql:\"hasPreviousPage\""
	CurrentCursor   string "json:\"currentCursor\" graphql:\"currentCursor\""
	StartCursor     string "json:\"startCursor\" graphql:\"startCursor\""
	EndCursor       string "json:\"endCursor\" graphql:\"endCursor\""
}

func (*PageInfoFragment) GetCurrentCursor

func (t *PageInfoFragment) GetCurrentCursor() string

func (*PageInfoFragment) GetEndCursor

func (t *PageInfoFragment) GetEndCursor() string

func (*PageInfoFragment) GetHasNextPage

func (t *PageInfoFragment) GetHasNextPage() bool

func (*PageInfoFragment) GetHasPreviousPage

func (t *PageInfoFragment) GetHasPreviousPage() bool

func (*PageInfoFragment) GetStartCursor

func (t *PageInfoFragment) GetStartCursor() string

type Person

type Person struct {
	Name string  `json:"name"`
	Role *string `json:"role,omitempty"`
}

type PersonFragment

type PersonFragment struct {
	Name string  "json:\"name\" graphql:\"name\""
	Role *string "json:\"role,omitempty\" graphql:\"role\""
}

func (*PersonFragment) GetName

func (t *PersonFragment) GetName() string

func (*PersonFragment) GetRole

func (t *PersonFragment) GetRole() *string

type Query

type Query struct {
}

type Reference

type Reference struct {
	Type      *string `json:"type,omitempty"`
	Title     *string `json:"title,omitempty"`
	Signature string  `json:"signature"`
}

type ReferenceFragment

type ReferenceFragment struct {
	Type      *string "json:\"type,omitempty\" graphql:\"type\""
	Title     *string "json:\"title,omitempty\" graphql:\"title\""
	Signature string  "json:\"signature\" graphql:\"signature\""
}

func (*ReferenceFragment) GetSignature

func (t *ReferenceFragment) GetSignature() string

func (*ReferenceFragment) GetTitle

func (t *ReferenceFragment) GetTitle() *string

func (*ReferenceFragment) GetType

func (t *ReferenceFragment) GetType() *string

type RevCatGraphQLClient

type RevCatGraphQLClient interface {
	MediathekEntries(ctx context.Context, signatures []string, interceptors ...clientv2.RequestInterceptor) (*MediathekEntries, error)
	Search(ctx context.Context, query string, facets []*InFacet, filter []*InFilter, vector []float64, first *int64, size *int64, cursor *string, sort []*SortField, interceptors ...clientv2.RequestInterceptor) (*Search, error)
}

func NewClient

func NewClient(cli *http.Client, baseURL string, options *clientv2.Options, interceptors ...clientv2.RequestInterceptor) RevCatGraphQLClient
type Search struct {
	Search Search_Search "json:\"search\" graphql:\"search\""
}

func (*Search) GetSearch

func (t *Search) GetSearch() *Search_Search

type SearchResult

type SearchResult struct {
	TotalCount int64                 `json:"totalCount"`
	PageInfo   *PageInfo             `json:"pageInfo"`
	Edges      []*MediathekFullEntry `json:"edges"`
	Facets     []*Facet              `json:"facets"`
}
type Search_Search struct {
	TotalCount int64                  "json:\"totalCount\" graphql:\"totalCount\""
	PageInfo   *PageInfoFragment      "json:\"pageInfo\" graphql:\"pageInfo\""
	Edges      []*Search_Search_Edges "json:\"edges\" graphql:\"edges\""
	Facets     []*FacetFragment       "json:\"facets\" graphql:\"facets\""
	Typename   *string                "json:\"__typename,omitempty\" graphql:\"__typename\""
}

func (*Search_Search) GetEdges

func (t *Search_Search) GetEdges() []*Search_Search_Edges

func (*Search_Search) GetFacets

func (t *Search_Search) GetFacets() []*FacetFragment

func (*Search_Search) GetPageInfo

func (t *Search_Search) GetPageInfo() *PageInfoFragment

func (*Search_Search) GetTotalCount

func (t *Search_Search) GetTotalCount() int64

func (*Search_Search) GetTypename

func (t *Search_Search) GetTypename() *string

type Search_Search_Edges

type Search_Search_Edges struct {
	ID             string                   "json:\"id\" graphql:\"id\""
	Base           *MediathekBaseFragment   "json:\"base\" graphql:\"base\""
	Notes          []*NoteFragment          "json:\"notes,omitempty\" graphql:\"notes\""
	Abstract       []*MultiLangFragment     "json:\"abstract,omitempty\" graphql:\"abstract\""
	Extra          []*KeyValueFragment      "json:\"extra,omitempty\" graphql:\"extra\""
	Media          []*MediaListFragment     "json:\"media,omitempty\" graphql:\"media\""
	ReferencesFull []*MediathekBaseFragment "json:\"referencesFull,omitempty\" graphql:\"referencesFull\""
	Typename       *string                  "json:\"__typename,omitempty\" graphql:\"__typename\""
}

func (*Search_Search_Edges) GetAbstract

func (t *Search_Search_Edges) GetAbstract() []*MultiLangFragment

func (*Search_Search_Edges) GetBase

func (*Search_Search_Edges) GetExtra

func (t *Search_Search_Edges) GetExtra() []*KeyValueFragment

func (*Search_Search_Edges) GetID

func (t *Search_Search_Edges) GetID() string

func (*Search_Search_Edges) GetMedia

func (t *Search_Search_Edges) GetMedia() []*MediaListFragment

func (*Search_Search_Edges) GetNotes

func (t *Search_Search_Edges) GetNotes() []*NoteFragment

func (*Search_Search_Edges) GetReferencesFull

func (t *Search_Search_Edges) GetReferencesFull() []*MediathekBaseFragment

func (*Search_Search_Edges) GetTypename

func (t *Search_Search_Edges) GetTypename() *string

type SortField added in v2.0.4

type SortField struct {
	Field string `json:"field"`
	Order string `json:"order"`
}

Jump to

Keyboard shortcuts

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