Documentation
¶
Overview ¶
Package keychain owns the user's macOS login keychain: one handle per run, opened on first use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLocked = errors.New("login keychain is locked")
ErrLocked reports that no usable password was supplied, so the keychain yields metadata only.
Functions ¶
This section is empty.
Types ¶
type Keychain ¶
type Keychain struct {
// contains filtered or unexported fields
}
func New ¶
func New(path string, password PasswordFunc) *Keychain
New does no I/O, so building a handle never prompts; the first query opens the keychain.
func (*Keychain) Err ¶
Err is why the keychain is locked or unreadable; nil when it is open or was never used.
func (*Keychain) GenericPassword ¶
func (*Keychain) InternetPasswords ¶
func (k *Keychain) InternetPasswords(ctx context.Context) ([]keychainbreaker.InternetPassword, error)
InternetPasswords leaves the secrets empty when the keychain is locked.