Documentation ¶
Index ¶
- func CanExceedLimit(ctx context.Context) bool
- func DataLoaderFromContext(ctx context.Context) *dataloader.DataLoader
- func DataLoadersToContext(dltcc DataLoadersToContextConfig, cfg dataloader.Config) gin.HandlerFunc
- func LimitWhitelist(cfg LimitWhitelistConfig) gin.HandlerFunc
- func ServerDataLoadersFromContext(ctx context.Context) map[string]*dataloader.ServerDataLoader
- func StoreDataLoaderInContext(ctx context.Context, loaders *dataloader.DataLoader) context.Context
- func StoreLimitWhitelistDataInContext(ctx context.Context, canExceedLimit bool) context.Context
- func StoreServerDataLoadersInContext(ctx context.Context, loaders map[string]*dataloader.ServerDataLoader) context.Context
- func StoreVersionDataLoadersInContext(ctx context.Context, ...) context.Context
- func VersionDataLoadersFromContext(ctx context.Context) map[twmodel.VersionCode]*dataloader.VersionDataLoader
- type ContextKey
- type DataLoadersToContextConfig
- type LimitWhitelistConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanExceedLimit ¶
func DataLoaderFromContext ¶
func DataLoaderFromContext(ctx context.Context) *dataloader.DataLoader
func DataLoadersToContext ¶
func DataLoadersToContext(dltcc DataLoadersToContextConfig, cfg dataloader.Config) gin.HandlerFunc
func LimitWhitelist ¶
func LimitWhitelist(cfg LimitWhitelistConfig) gin.HandlerFunc
func ServerDataLoadersFromContext ¶
func ServerDataLoadersFromContext(ctx context.Context) map[string]*dataloader.ServerDataLoader
func StoreDataLoaderInContext ¶
func StoreDataLoaderInContext(ctx context.Context, loaders *dataloader.DataLoader) context.Context
func StoreServerDataLoadersInContext ¶
func StoreServerDataLoadersInContext(ctx context.Context, loaders map[string]*dataloader.ServerDataLoader) context.Context
func StoreVersionDataLoadersInContext ¶
func StoreVersionDataLoadersInContext(ctx context.Context, loaders map[twmodel.VersionCode]*dataloader.VersionDataLoader) context.Context
func VersionDataLoadersFromContext ¶
func VersionDataLoadersFromContext(ctx context.Context) map[twmodel.VersionCode]*dataloader.VersionDataLoader
Types ¶
type ContextKey ¶
type ContextKey string
type DataLoadersToContextConfig ¶
type DataLoadersToContextConfig struct {
ServerRepo server.Repository
}
type LimitWhitelistConfig ¶
type LimitWhitelistConfig struct {
IPAddresses []string
}
Click to show internal directories.
Click to hide internal directories.