Documentation ¶
Index ¶
- func LoadConf(ctx context.Context, key string) (*model.Configuration, error)
- func LoadModule(ctx context.Context, name string) (*model.Module, error)
- func LoadRole(ctx context.Context, key string) (*model.Role, error)
- func LoadUser(ctx context.Context, key string) (*model.User, error)
- type Cache
- type Client
- type LoaderCollection
- type ModuleLoader
- type ModuleResult
- type ModuleResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache implements the dataloader.Cache interface
func (*Cache) Get ¶
func (c *Cache) Get(_ context.Context, key dataloader.Key) (dataloader.Thunk, bool)
Get gets a value from the cache
func (*Cache) Set ¶
func (c *Cache) Set(_ context.Context, key dataloader.Key, value dataloader.Thunk)
Set sets a value in the cache
type LoaderCollection ¶
type LoaderCollection struct {
// contains filtered or unexported fields
}
Collection holds an internal lookup of initialized batch data load functions.
func NewLoaderCollection ¶
func NewLoaderCollection(client Client) LoaderCollection
Initialize a lookup map of context keys to batch functions.
When Attach is called on the Collection, the batch functions are used to create new dataloader instances. The instances are attached to the request context at the provided keys.
The keys are then used to extract the dataloader instances from the request context.
type ModuleLoader ¶
type ModuleLoader struct {
// contains filtered or unexported fields
}
type ModuleResult ¶
type ModuleResults ¶
type ModuleResults []ModuleResult
func LoadModules ¶
func LoadModules(ctx context.Context, names []string) (ModuleResults, error)
func (ModuleResults) WithoutErrors ¶
func (results ModuleResults) WithoutErrors() []*model.Module
Click to show internal directories.
Click to hide internal directories.