Versions in this module Expand all Collapse all v1 v1.1.6 Jun 29, 2020 Changes in this version + var Debug bool + var ErrKeyNotFound = errors.New("The specified item could not be found in the keyring") + var ErrMetadataNeedsCredentials = errors.New("The keyring backend requires credentials for metadata access") + var ErrNoAvailImpl = errors.New("Specified keyring backend not available") + type ArrayKeyring struct + func NewArrayKeyring(initial []Item) *ArrayKeyring + func (k *ArrayKeyring) Get(key string) (Item, error) + func (k *ArrayKeyring) GetMetadata(_ string) (Metadata, error) + func (k *ArrayKeyring) Keys() ([]string, error) + func (k *ArrayKeyring) Remove(key string) error + func (k *ArrayKeyring) Set(i Item) error + type BackendType string + const FileBackend + const InvalidBackend + const KWalletBackend + const KeychainBackend + const PassBackend + const SecretServiceBackend + const WinCredBackend + func AvailableBackends() []BackendType + type Config struct + AllowedBackends []BackendType + FileDir string + FilePasswordFunc PromptFunc + KWalletAppID string + KWalletFolder string + KeychainAccessibleWhenUnlocked bool + KeychainName string + KeychainPasswordFunc PromptFunc + KeychainSynchronizable bool + KeychainTrustApplication bool + LibSecretCollectionName string + PassCmd string + PassDir string + PassPrefix string + ServiceName string + WinCredPrefix string + type Item struct + Data []byte + Description string + Key string + KeychainNotSynchronizable bool + KeychainNotTrustApplication bool + Label string + type Keyring interface + Get func(key string) (Item, error) + GetMetadata func(key string) (Metadata, error) + Keys func() ([]string, error) + Remove func(key string) error + Set func(item Item) error + func Open(cfg Config) (Keyring, error) + type Metadata struct + ModificationTime time.Time + type PromptFunc func(string) (string, error)