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(deviceName string) error
DeleteAPIKey removes the API key for a device from the keyring.
func (*KeyringStore) GetAPIKey ¶
func (s *KeyringStore) GetAPIKey(deviceName string) (string, error)
GetAPIKey retrieves the API key for a device from the keyring.
func (*KeyringStore) HasAPIKey ¶
func (s *KeyringStore) HasAPIKey(deviceName string) (bool, error)
HasAPIKey checks whether an API key is stored for a device.
func (*KeyringStore) SetAPIKey ¶
func (s *KeyringStore) SetAPIKey(deviceName, key string) error
SetAPIKey stores an API key for a device in the keyring.
Click to show internal directories.
Click to hide internal directories.