resolver

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBaseFilter

func BuildBaseFilter(client *config.Client, groups ...string) ([]*types.Query, error)

func DecodeCursor

func DecodeCursor(s string) (*cursor, error)

func NewCursor

func NewCursor(from, size int) *cursor

Types

type ElasticResolver

type ElasticResolver struct {
	// contains filtered or unexported fields
}

func NewElasticResolver

func NewElasticResolver(elastic *elasticsearch.TypedClient, index string, clients []*config.Client, logger zLogger.ZLogger) *ElasticResolver

func (*ElasticResolver) MediathekEntries

func (r *ElasticResolver) MediathekEntries(ctx context.Context, signatures []string) ([]*model.MediathekFullEntry, error)

MediathekEntries is the resolver for the mediathekEntries field.

func (*ElasticResolver) ReferencesFull

func (*ElasticResolver) Search

func (r *ElasticResolver) Search(ctx context.Context, query string, facets []*model.InFacet, filter []*model.InFilter, vector []float64, first *int, size *int, cursor *string, sort []*model.SortField) (*model.SearchResult, error)

Search is the resolver for the search field.

type Resolver

type Resolver interface {
	// Search is the resolver for the search field.
	Search(ctx context.Context, query string, facets []*model.InFacet, filter []*model.InFilter, vector []float64, first *int, size *int, cursor *string, sort []*model.SortField) (*model.SearchResult, error)

	// MediathekEntries is the resolver for the mediathekEntries field.
	MediathekEntries(ctx context.Context, signatures []string) ([]*model.MediathekFullEntry, error)

	ReferencesFull(ctx context.Context, obj *model.MediathekFullEntry) ([]*model.MediathekBaseEntry, error)
}

func NewBadgerResolver

func NewBadgerResolver(logger zLogger.ZLogger, db *badger.DB) Resolver

Jump to

Keyboard shortcuts

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