loader

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetByIDsLoader

func GetByIDsLoader[T model.HasID](
	ctx context.Context,
	keys dataloader.Keys,
	getByIDs func([]string) ([]*T, error)) []*dataloader.Result

func GetLoader

func GetLoader[T model.HasID](l *Loaders, tableName string) *dataloader.Loader

func NewObjNotFoundErr

func NewObjNotFoundErr(id string) error

Types

type ErrorObjNotFound

type ErrorObjNotFound struct {
	ID string
}

func (*ErrorObjNotFound) Error

func (e *ErrorObjNotFound) Error() string

type Loaders

type Loaders struct {
	MachineByID *dataloader.Loader
	ProjectByID *dataloader.Loader
	RouteByID   *dataloader.Loader
	// contains filtered or unexported fields
}

func NewLoaders

func NewLoaders() *Loaders

NewLoaders instantiates data loaders for the middleware

Jump to

Keyboard shortcuts

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