loaders

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoalConvertedVisits

func GetGoalConvertedVisits(ctx context.Context, idSite int, idGoal int, opts *model.ConvertedVisitsOptions, orderBy *model.OrderByOptions) ([]*model.Visit, error)

func GetVisitorProfile

func GetVisitorProfile(ctx context.Context, idSite int, visitorId string) (*model.VisitorProfile, error)

func Middleware

func Middleware(next http.Handler) http.Handler

Middleware injects data loaders into the context

Types

type Loaders

type Loaders struct {
	GoalConvertedVisitsLoader *dataloadgen.Loader[string, []*model.Visit]
	VisitorProfilesLoader     *dataloadgen.Loader[string, *model.VisitorProfile]
}

func For

func For(ctx context.Context) *Loaders

For returns the dataloader for a given context

func NewLoaders

func NewLoaders() *Loaders

Jump to

Keyboard shortcuts

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