Documentation
¶
Overview ¶
Package secret stores datasource passwords outside the configuration file.
The Store interface exists so that the rest of datavase never imports a keychain library directly; tests use the in-memory implementation and get the same behaviour, guaranteed by the shared contract test.
Index ¶
Constants ¶
View Source
const Service = "datavase"
Service is the keychain service name every datavase entry is filed under. Accounts within it are datasource names.
Variables ¶
View Source
var ErrNotFound = errors.New("no password stored")
ErrNotFound reports that no password is stored for an account.
Functions ¶
This section is empty.
Types ¶
type Keychain ¶
type Keychain struct {
// contains filtered or unexported fields
}
Keychain is the OS keychain implementation (macOS Keychain, Secret Service on Linux, Credential Manager on Windows).
func NewKeychain ¶
func NewKeychain() *Keychain
NewKeychain returns a Store backed by the OS keychain.
Click to show internal directories.
Click to hide internal directories.