Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not known")
ErrNotFound is returned when a key cannot be found.
View Source
var ErrSchemeUnknown = errors.New("no confidants registered to handle that scheme")
ErrSchemeUnknown is returned when a confidant scheme is not found.
View Source
var ErrURLInvalid = errors.New("supplied URL is invalid")
ErrURLInvalid is returned when a URL is in some way invalid.
Functions ¶
This section is empty.
Types ¶
type Confidant ¶
type Confidant interface { // SupportedURLSchemes provides the list of schemes supported by this confidant. SupportedURLSchemes(ctx context.Context) ([]string, error) // Fetch fetches a value given its URL. Fetch(ctx context.Context, url *url.URL) ([]byte, error) }
Confidant is the interface for services that hold secrets.
type Service ¶
type Service interface { // Fetch fetches a value given its key. // The key is usually defined as a URL, although it is possible that some // confidants may require or accept a different format. Fetch(ctx context.Context, key string) ([]byte, error) }
Service is the interface for a majordomo. A majordomo takes key requests in the form of custom URLs and returns the related value.
Click to show internal directories.
Click to hide internal directories.