Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is the expected error if the secret isn't found in the // keyring. ErrNotFound = errors.New("secret not found in keyring") // ErrSetDataTooBig is returned if `Set` was called with too much data. // On MacOS: The combination of service, username & password should not exceed ~3000 bytes // On Windows: The service is limited to 32KiB while the password is limited to 2560 bytes // On Linux/Unix: There is no theoretical limit but performance suffers with big values (>100KiB) ErrSetDataTooBig = errors.New("data passed to Set was too big") )
View Source
var ErrUnsupportedPlatform = errors.New("unsupported platform: " + runtime.GOOS)
All of the following methods error out on unsupported platforms
Functions ¶
func MockInitWithError ¶ added in v0.2.3
func MockInitWithError(err error)
MockInitWithError sets the provider to a mocked memory store that returns the given error on all operations
Types ¶
type Keyring ¶
type Keyring interface { // Set password in keyring for user. Set(service, user, password string) error // Get password from keyring given service and user name. Get(service, user string) (string, error) // Delete secret from keyring. Delete(service, user string) error // DeleteAll deletes all secrets for a given service DeleteAll(service string) error }
Keyring provides a simple set/get interface for a keyring service.
Click to show internal directories.
Click to hide internal directories.