Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoAPIKey = errors.New("no API key configured")
)
Functions ¶
Types ¶
type KeyringBackendInfo ¶
KeyringBackendInfo holds the resolved keyring backend value and its source.
func ResolveKeyringBackendInfo ¶
func ResolveKeyringBackendInfo() (KeyringBackendInfo, error)
ResolveKeyringBackendInfo determines the keyring backend from env, config, or default.
type KeyringStore ¶
type KeyringStore struct {
// contains filtered or unexported fields
}
KeyringStore implements Store using the system keyring.
func (*KeyringStore) DeleteAPIKey ¶
func (s *KeyringStore) DeleteAPIKey() error
DeleteAPIKey removes the API key from the keyring.
func (*KeyringStore) GetAPIKey ¶
func (s *KeyringStore) GetAPIKey() (string, error)
GetAPIKey retrieves the API key from the keyring.
func (*KeyringStore) HasAPIKey ¶
func (s *KeyringStore) HasAPIKey() (bool, error)
HasAPIKey checks whether an API key is stored in the keyring.
func (*KeyringStore) SetAPIKey ¶
func (s *KeyringStore) SetAPIKey(key string) error
SetAPIKey stores an API key in the keyring.
Click to show internal directories.
Click to hide internal directories.