Documentation
¶
Overview ¶
Package config persists non-secret CLI preferences: the active profile, the default output mode, and per-profile base-URLs. It lives at config.toml under os.UserConfigDir() (XDG on Linux, %AppData% on Windows, Application Support on macOS) with mode 0600. API keys are NEVER stored here — those go in the OS keychain (see internal/auth).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ActiveProfile string `toml:"active_profile,omitempty"`
Output string `toml:"output,omitempty"`
Profiles map[string]Profile `toml:"profiles,omitempty"`
}
Config is the on-disk shape of config.toml.
func (*Config) Save ¶
Save writes config.toml (file mode 0600, dir 0700). The 0600 is a POSIX best-effort and a no-op on Windows; config.toml deliberately holds NO secrets (API keys live in the OS keychain), so secret protection does not rely on it.
func (*Config) SetProfile ¶
SetProfile upserts a profile's base-URL.