Documentation
¶
Overview ¶
Package config manages the CLI's on-disk configuration: named configurations (profiles, like gcloud) plus env-var overrides. It holds only non-secret settings; tokens live in the auth package's credential store (OS keychain).
Index ¶
Constants ¶
View Source
const ( DefaultEndpoint = "https://api.developer.privasys.org" DefaultIssuer = "https://privasys.id" DefaultFormat = "table" )
Defaults for a fresh configuration.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct {
Endpoint string `yaml:"endpoint"`
Issuer string `yaml:"issuer"`
Account string `yaml:"account,omitempty"`
Format string `yaml:"format,omitempty"`
}
Configuration is a single named profile.
type File ¶
type File struct {
Current string `yaml:"current"`
Configurations map[string]*Configuration `yaml:"configurations"`
// contains filtered or unexported fields
}
File is the whole config document.
func (*File) Active ¶
func (f *File) Active() *Configuration
Active returns the current configuration, applying env-var overrides (PRIVASYS_ENDPOINT, PRIVASYS_ISSUER, PRIVASYS_ACCOUNT, PRIVASYS_FORMAT). Env overrides do not mutate the saved file.
Click to show internal directories.
Click to hide internal directories.