Documentation
¶
Overview ¶
Package config implements "semaphore-cli config validate" and "semaphore-cli config print --effective": thin commands over the strict loader of the version 2 bootstrap file (cmd/relayproxy/bootstrap).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cmd ¶
type Cmd struct {
Output string `default:"text" help:"${helpConfigOutput}" name:"output" short:"o"`
Validate ValidateCmd `cmd:"" help:"${helpConfigValidate}"`
Print PrintCmd `cmd:"" help:"${helpConfigPrint}"`
}
Cmd is the kong command group for validating and printing the version 2 bootstrap file of the relay proxy.
type Deps ¶
type Deps struct {
// LookupEnv reads an environment variable: the SEMAPHORE_* overrides apply to the effective configuration.
LookupEnv func(string) (string, bool)
// ReadFile reads the bootstrap file.
ReadFile func(string) ([]byte, error)
}
Deps are the parts of the outside world that the commands use.
func DefaultDeps ¶
func DefaultDeps() Deps
DefaultDeps returns the dependencies of the real command.
type PrintCmd ¶
type PrintCmd struct {
File string `arg:"" help:"Bootstrap file to print." name:"file"`
Effective bool `help:"print the effective configuration (required)" name:"effective"`
}
PrintCmd prints the effective bootstrap configuration with defaults and environment overrides applied.
type ValidateCmd ¶
type ValidateCmd struct {
File string `arg:"" help:"Bootstrap file to check." name:"file"`
}
ValidateCmd checks a bootstrap file with the loader of the relay proxy.
func (ValidateCmd) Help ¶
func (ValidateCmd) Help() string
Help returns the detailed description of config validate for kong's help output.