Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("secret not found") ErrAccessDenied = errors.New("access denied") // nuh, uh, uh! )
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID contains a secret identifier. Valid secret identifiers must match the format [A-Za-z0-9.-]+(/[A-Za-z0-9.-]+)+?.
For storage, we don't really differentiate much about the ID format but by convention we do simple, slash-separated management, providing a groupable access control system for management across plugins.
type Restricted ¶
type Restricted struct {
// contains filtered or unexported fields
}
Restricted controls access to a set of secrets.
By default, it allows access to no secrets but can be modified safely from other threads.
func NewRestricted ¶
func NewRestricted(resolver Resolver, allowed ...ID) *Restricted
func (*Restricted) Allow ¶
func (r *Restricted) Allow(allowed ...ID)
Click to show internal directories.
Click to hide internal directories.