Documentation
¶
Overview ¶
Package config loads the shared Python/Go CLI configuration.
Index ¶
- Constants
- func ConfigDir(getenv func(string) string, home, platform string) string
- func IsScoped(token string) bool
- func ValidateHost(host string) error
- type Config
- type Hosts
- type Store
- func (s *Store) Clear(host string) (bool, error)
- func (s *Store) ClearDefaultOrg(host string) (bool, error)
- func (s *Store) Read() Hosts
- func (s *Store) ReadChecked() (Hosts, error)
- func (s *Store) Set(host, key, value string) error
- func (s *Store) Switch(host string) error
- func (s *Store) ValidateMutation() error
- func (s *Store) Write(h Hosts) error
Constants ¶
const DefaultHost = "https://api.avrea.com"
Variables ¶
This section is empty.
Functions ¶
func ValidateHost ¶
Types ¶
type Config ¶
type Store ¶
type Store struct{ Path string }
Store is shared with Python. All credentials belong to the caller's resolved host.
func DefaultStore ¶
func (*Store) ClearDefaultOrg ¶
ClearDefaultOrg removes only the active host's stored organization override. Tokens, unknown fields, host ordering and the selected default host survive.
func (*Store) ReadChecked ¶
ReadChecked distinguishes an absent store from an unreadable one.
func (*Store) ValidateMutation ¶
ValidateMutation refuses to discard a present but unreadable or malformed store. Reads remain lenient for commands that do not change credentials.