collection

package
v0.0.0-...-4a248c4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetItemIDsForFilter

func GetItemIDsForFilter(ctx context.Context, db *sql.DB, roles []string, f common.Filter, noLimit bool) ([]common.Identifier, error)

GetItemIDsForFilter returns an array of ids for the collection

func NewCollectionItemLoader

func NewCollectionItemLoader(ctx context.Context, db *sql.DB, collectionLoader *loaders.Loader[int, *common.Collection], roles []string) *loaders.Loader[int, []common.Identifier]

NewCollectionItemLoader returns a new loader for getting ItemIds for Collection

Types

type Entry

type Entry struct {
	ID         string
	Collection common.ItemCollection
	Sort       int
}

Entry contains the ID and collection of a CollectionItem

func GetCollectionEntries

func GetCollectionEntries(ctx context.Context, ls *common.BatchLoaders, filteredLoaders *common.FilteredLoaders, collectionId int) ([]Entry, error)

GetCollectionEntries returns entries for the specified collection

Jump to

Keyboard shortcuts

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