configs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	HTTPPort             uint16 `help:"HTTP port to listen on." default:"8080" env:"DORAS_HTTP_PORT"`
	Host                 string `help:"Hostname to listen on." default:"127.0.0.1" env:"DORAS_HOST"`
	ConfigFilePath       string `help:"Path to the Doras server config file." env:"DORAS_CONFIG_FILE_PATH"`
	DockerConfigFilePath string `` /* 145-byte string literal not displayed */
	LogLevel             string `help:"Server log level." default:"info" enum:"debug,info,warn,error" env:"DORAS_LOG_LEVEL"`
	ShutdownTimout       uint   `help:"Graceful shutdown timeout (in seconds)." default:"20" env:"DORAS_SHUTDOWN_TIMEOUT"`
	InsecureAllowHTTP    bool   `help:"Allow INSECURE HTTP connections." default:"false" env:"DORAS_INSECURE_ALLOW_HTTP"`
	RequireClientAuth    bool   `` /* 146-byte string literal not displayed */
	ExampleConfig        struct {
		Output string `help:"Write example config to this location instead of printing to stdout." type:"path"`
	} `cmd:"" help:"Print or store example config."`
	Run struct {
	} `cmd:"" help:"Run the server." default:"1"`
	Version bool `help:"Print version number version and exit." default:"false"`
}

CLI is the struct to parse the command line parameters or environment variables.

type RegConfig added in v0.5.0

type RegConfig struct {
	Auth RepoAuth `yaml:"auth"`
}

RegConfig stores the configuration for an OCI registry. Currently only wraps Auth, but more options may be added in the future.

type RepoAuth added in v0.5.0

type RepoAuth struct {
	Username    string `yaml:"username"`
	Password    string `yaml:"password"`
	AccessToken string `yaml:"access-token"`
}

RepoAuth stores registry login secrets. AccessToken is mutually exclusive to the other fields.

type ServerConfig

type ServerConfig struct {
	ConfigFile ServerConfigFile
	CliOpts    CLI
}

ServerConfig is the data structure to configure a Doras s

type ServerConfigFile

type ServerConfigFile struct {
	TrustedProxies []string             `yaml:"trusted-proxies"`
	Registries     map[string]RegConfig `yaml:"registries"`
}

ServerConfigFile is used to parse the config files that can be used for more extensive configuration.

Jump to

Keyboard shortcuts

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