Documentation ¶
Overview ¶
Package keychain implements a native secure password store for each platform.
Index ¶
Constants ¶
View Source
const ( Pass = "pass-app" SecretService = "secret-service" SecretServiceDBus = "secret-service-dbus" )
View Source
const Version = "k11"
Version is the keychain data version.
Variables ¶
View Source
var ( // ErrNoKeychain indicates that no suitable keychain implementation could be loaded. ErrNoKeychain = errors.New("no keychain") //nolint:gochecknoglobals // ErrMacKeychainRebuild is returned on macOS with blocked or corrupted keychain. ErrMacKeychainRebuild = errors.New("keychain error -25293") // Helpers holds all discovered keychain helpers. It is populated in init(). Helpers map[string]helperConstructor //nolint:gochecknoglobals )
Functions ¶
This section is empty.
Types ¶
type Keychain ¶
type Keychain struct {
// contains filtered or unexported fields
}
func NewKeychain ¶
NewKeychain creates a new native keychain.
func NewMissingKeychain ¶
func NewMissingKeychain() *Keychain
NewMissingKeychain returns a new keychain that always returns an error.
type SecretServiceDBusHelper ¶
type SecretServiceDBusHelper struct{}
SecretServiceDBusHelper is wrapper around keybase/go-keychain/secretservice library.
func (*SecretServiceDBusHelper) Add ¶
func (s *SecretServiceDBusHelper) Add(creds *credentials.Credentials) error
Add appends credentials to the store.
func (*SecretServiceDBusHelper) Delete ¶
func (s *SecretServiceDBusHelper) Delete(serverURL string) error
Delete removes credentials from the store.
type TestHelper ¶ added in v3.0.7
type TestHelper map[string]*credentials.Credentials
func NewTestHelper ¶ added in v3.0.7
func NewTestHelper() TestHelper
func (TestHelper) Add ¶ added in v3.0.7
func (h TestHelper) Add(creds *credentials.Credentials) error
func (TestHelper) Delete ¶ added in v3.0.7
func (h TestHelper) Delete(url string) error
Click to show internal directories.
Click to hide internal directories.