config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: AGPL-3.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

func (*Check) Execute

func (cmd *Check) Execute(args []string) error

Execute runs the check command.

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.

func (*ExitError) Error

func (e *ExitError) Error() string

Error returns the description of the failure, if any.

func (*ExitError) ExitCode

func (e *ExitError) ExitCode() int

ExitCode returns the process exit code.

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

Unwrap returns the underlying error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL