Documentation ¶
Index ¶
Constants ¶
View Source
const (
LoadersKey = ctxKey("dataLoaders")
)
Variables ¶
This section is empty.
Functions ¶
func GetMayReports ¶
func GetMayReports(ctx context.Context, reportsKeys []string) ([]*commons.PageResult[cModel.Report], error)
GetMayReports returns many reports by reportsKeys efficiently
func GetReports ¶
GetReports returns single reports by reportsKey efficiently
Types ¶
type Loaders ¶
type Loaders struct { ReportLoader *dataloadgen.Loader[string, *commons.PageResult[cModel.Report]] VoucherLoader *dataloadgen.Loader[string, *commons.PageResult[cModel.ConvenienceVoucher]] NoticeLoader *dataloadgen.Loader[string, *commons.PageResult[cModel.ConvenienceNotice]] InputLoader *dataloadgen.Loader[string, *cModel.AdvanceInput] }
Loaders wrap your data loaders to inject via middleware
func NewLoaders ¶
func NewLoaders( reportRepository *repository.ReportRepository, voucherRepository *repository.VoucherRepository, noticeRepository *repository.NoticeRepository, inputRepository *repository.InputRepository, ) *Loaders
NewLoaders instantiates data loaders for the middleware
Click to show internal directories.
Click to hide internal directories.