datastore

package
v1.51.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StableSearch

func StableSearch[T any](
	ctx context.Context, svc *frame.Service,
	query *SearchQuery, searchFunc func(ctx context.Context, query *SearchQuery) ([]*T, error),
) (frame.JobResultPipe[[]*T], error)

Types

type Paginator

type Paginator struct {
	Offset int
	Limit  int

	BatchSize int
}

func (*Paginator) CanLoad

func (sq *Paginator) CanLoad() bool

func (*Paginator) Stop

func (sq *Paginator) Stop(loadedCount int) bool

type SearchQuery

type SearchQuery struct {
	ProfileID string
	Query     string
	Fields    map[string]any

	Pagination *Paginator
}

func NewSearchQuery

func NewSearchQuery(
	_ context.Context, query string,
	fields map[string]any,
	resultPage, resultCount int,
) (*SearchQuery, error)

Jump to

Keyboard shortcuts

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