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 ¶
func LoadModule ¶ added in v0.1.11
Types ¶
type Cache ¶ added in v0.1.11
type Cache struct {
// contains filtered or unexported fields
}
Cache implements the dataloader.Cache interface
func (*Cache) Get ¶ added in v0.1.11
func (c *Cache) Get(_ context.Context, key dataloader.Key) (dataloader.Thunk, bool)
Get gets a value from the cache
func (*Cache) Set ¶ added in v0.1.11
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 ¶ added in v0.1.11
type ModuleLoader struct {
// contains filtered or unexported fields
}
type ModuleResult ¶ added in v0.1.11
type ModuleResults ¶ added in v0.1.11
type ModuleResults []ModuleResult
func LoadModules ¶ added in v0.1.11
func LoadModules(ctx context.Context, names []string) (ModuleResults, error)
func (ModuleResults) WithoutErrors ¶ added in v0.1.11
func (results ModuleResults) WithoutErrors() []*model.Module
Click to show internal directories.
Click to hide internal directories.