Documentation
¶
Index ¶
- type Factory
- type Storer
- func (s *Storer) Create(ctx context.Context, scope scopes.Scope) error
- func (s *Storer) Delete(ctx context.Context, id string) error
- func (s *Storer) GetMulti(ctx context.Context, ids []string) (map[string]scopes.Scope, error)
- func (s *Storer) ListDefault(ctx context.Context) ([]scopes.Scope, error)
- func (s *Storer) Update(ctx context.Context, id string, change scopes.Change) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storer ¶
type Storer struct {
// contains filtered or unexported fields
}
Storer is an in-memory implementation of the Storer interface.
func (*Storer) Create ¶
Create inserts the passed Scope into the Storer, returning an ErrScopeAlreadyExists error if a Scope with the same ID already exists in the Storer.
func (*Storer) Delete ¶
Delete removes the Scope that matches the specified ID from the Storer, if any Scope matches the specified ID in the Storer.
func (*Storer) GetMulti ¶
GetMulti retrieves the Scopes specified by the passed IDs from the Storer, returning an empty map if no matching Scopes are found. If a Scope is not found, no error will be returned, it will just be omitted from the map.
func (*Storer) ListDefault ¶
ListDefault returns all the Scopes with IsDefault set to true. sorted lexicographically by their ID.