Documentation
¶
Index ¶
Constants ¶
View Source
const (
APIKeyEnv = "CHATWOOT_API_KEY"
)
Variables ¶
View Source
var ErrAPIKeyNotFound = errors.New("api key not found")
Functions ¶
func ConfigPath ¶
func DeleteAPIKey ¶
func SaveAPIKey ¶
Types ¶
type Config ¶
type CredentialSource ¶
type CredentialSource string
const ( CredentialSourceEnvironment CredentialSource = "environment" CredentialSourceKeyring CredentialSource = "keyring" CredentialSourceMissing CredentialSource = "missing" )
func ResolveAPIKey ¶
func ResolveAPIKey(cfg *Config) (string, CredentialSource, error)
ResolveAPIKey implements the auth flow for the CLI. YAML config intentionally stores only non-secrets, and plaintext api_key values from older configs are ignored. CHATWOOT_API_KEY wins for CI, coding agents, and temporary overrides; otherwise saved interactive logins read the token from the OS keyring.
Click to show internal directories.
Click to hide internal directories.