Documentation
¶
Index ¶
Constants ¶
const (
// FileName denotes the name of the config file.
FileName = "config.yml"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
APIBaseURL string `yaml:"-"`
RegistryHost string `yaml:"-"`
AccessToken string `yaml:"access_token"`
VerboseOutput bool `yaml:"-"`
JSONOutput bool `yaml:"-"`
LogGQLErrors bool `yaml:"-"`
Organization string `yaml:"-"`
LocalOnly bool `yaml:"-"`
}
func FromContext ¶
FromContext returns the Config ctx carries. It panics in case ctx carries no Config.
func (*Config) ApplyEnv ¶
func (cfg *Config) ApplyEnv()
ApplyEnv sets the properties of cfg which may be set via environment variables to the values these variables contain.
func (*Config) ApplyFile ¶
ApplyFile sets the properties of cfg which may be set via configuration file to the values the file at the given path contains.
func (*Config) ApplyFlags ¶
ApplyFlags sets the properties of cfg which may be set via command line flags to the values the flags of the given FlagSet may contain.