Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter[M any, W wireObject] func(M) W
Converter is a generic function which converts a database model to its wire form.
type Lister ¶
type Lister[M any, W wireObject] struct { // contains filtered or unexported fields }
Lister is a generic utility to list, filter, sort and paginate Results and Records in a uniform and consistent manner.
func OfRecords ¶
func OfRecords(env *cel.Env, resultParent, resultName string, request *resultspb.ListRecordsRequest) (*Lister[*db.Record, *resultspb.Record], error)
OfRecords creates a Lister for Record objects.
func OfResults ¶
func OfResults(env *cel.Env, request *resultspb.ListResultsRequest) (*Lister[*db.Result, *resultspb.Result], error)
OfResults creates a Lister for Result objects.
type PageTokenGenerator ¶
PageTokenGenerator takes a wire object and returns a page token for retrieving more resources from thee API.
Click to show internal directories.
Click to hide internal directories.