Documentation
¶
Overview ¶
Package config implements the "config" command group, which operates on the configuration files of the OpenStack metadata signer and JWKS aggregator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct {
// Signers are the paths of the signer configuration files.
Signers []string `short:"s" long:"signer" description:"Path to a signer configuration file (repeatable)." value-name:"PATH"`
// Aggregator is the path of the JWKS aggregator configuration file.
Aggregator *string `short:"a" long:"aggregator" description:"Path to the JWKS aggregator configuration file." value-name:"PATH"`
// Format is the output format.
//nolint:staticcheck // SA5008: go-flags reads repeated choice tags
Format string `short:"f" long:"format" description:"The format of the report." default:"text" choice:"text" choice:"json" choice:"yaml"`
// Strict turns warnings into failures.
Strict bool `long:"strict" description:"Fail on warnings too."`
// SkipFiles disables the checks on referenced TLS and CA files.
SkipFiles bool `long:"skip-files" description:"Do not check the TLS and CA files referenced by the configuration."`
// PrintEffective prints the configuration with defaults applied.
PrintEffective bool `long:"print-effective" description:"Print the effective configuration, defaults included."`
}
Check validates signer and aggregator configuration files and reports every finding: unknown keys, invalid values, rule violations, cross-file inconsistencies, problems with the referenced TLS/CA files and risky settings.
type Config ¶
type Config struct {
// Check validates configuration files.
Check Check `command:"check" alias:"c" description:"Validate signer and aggregator configuration files, reporting every problem found."`
}
Config groups the commands acting on configuration files.
type ExitError ¶
type ExitError struct {
// Code is the process exit code.
Code int
// Err describes the failure, if not reported yet.
Err error
}
ExitError carries the process exit code of a command; a nil Err means the command has already reported the failure to the user.