auth

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAPIKey = errors.New("no API key configured")
)

Functions

func GetAPIKey

func GetAPIKey() (string, error)

Types

type KeyringBackendInfo

type KeyringBackendInfo struct {
	Value  string
	Source string
}

func ResolveKeyringBackendInfo

func ResolveKeyringBackendInfo() (KeyringBackendInfo, error)

type KeyringStore

type KeyringStore struct {
	// contains filtered or unexported fields
}

func (*KeyringStore) DeleteAPIKey

func (s *KeyringStore) DeleteAPIKey() error

func (*KeyringStore) GetAPIKey

func (s *KeyringStore) GetAPIKey() (string, error)

func (*KeyringStore) HasAPIKey

func (s *KeyringStore) HasAPIKey() (bool, error)

func (*KeyringStore) SetAPIKey

func (s *KeyringStore) SetAPIKey(key string) error

type Store

type Store interface {
	SetAPIKey(key string) error
	GetAPIKey() (string, error)
	DeleteAPIKey() error
	HasAPIKey() (bool, error)
}

func OpenDefault

func OpenDefault() (Store, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL