Documentation
¶
Overview ¶
Package local_data provides a keyring implementation that stores data in the system keyring. If the keyring is not available, it falls back to storing the data in a file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("data not found")
ErrNotFound is the expected error if the data isn't found in the keyring or in the file.
Functions ¶
This section is empty.
Types ¶
type Keyring ¶
type Keyring struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new keyring. serviceName is the name of the service that will be used to store the data. backupFile is the name of the file that will be used to store the data if the keyring is not available. The file is stored in the user's home directory, in a file named after the key.
func (*Keyring) Delete ¶
Delete removes the data from the keyring. If the keyring is not available, it falls back to removing the data from a file.