Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keyring ¶
type Keyring struct {
// contains filtered or unexported fields
}
Keyring provides accessor methods for the user's system's keyring.
func Load ¶
Load initialises the underlying keyring and returns a Keyring which provides accessor methods.
func (*Keyring) LoadPassword ¶
func (k *Keyring) LoadPassword(fingerprint fpr.Fingerprint) (password string, gotPassword bool)
LoadPassword attempts to load a password from the keyring for the given key and returns (password, gotPassword).
func (*Keyring) PurgePassword ¶
func (k *Keyring) PurgePassword(fingerprint fpr.Fingerprint) error
PurgePassword deletes the key from the keyring or returns an error if it encounters one with the underlying keyring. If the keyring announces the key wasn't found, PurgePassword swallows that particular error.
func (*Keyring) SavePassword ¶
func (k *Keyring) SavePassword(fingerprint fpr.Fingerprint, newPassword string) error
SavePassword stores the given password in the keyring against the key and returns any error encountered in the underlying keyring.
Click to show internal directories.
Click to hide internal directories.