Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶ added in v0.9.0
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator contains the query builders for filters and aggregate functions for summary
func OfRecordList ¶ added in v0.9.0
func OfRecordList(env *cel.Env, resultParent, resultName string, request *pb.RecordListSummaryRequest) (*Aggregator, error)
OfRecordList returns a new Aggregator for Record List Summary Request
func (*Aggregator) Aggregate ¶ added in v0.9.0
func (a *Aggregator) Aggregate(ctx context.Context, db *gorm.DB) (*pb.RecordListSummary, error)
Aggregate function runs the aggregation tasks and returns Summary
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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.