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 */
ExposeMetrics bool `help:"Expose prometheus metrics at '/metrics'." default:"false" env:"DORAS_EXPOSE_METRICS"`
EnableProfiling bool `help:"Enable and expose profiling at '/debug/pprof/'." default:"false" env:"DORAS_ENABLE_PROFILING"`
DummyExpirationDurationMins int `help:"Duration until a dummy is considered to be expired." default:"30" env:"DORAS_DUMMY_EXPIRATION_DURATION_MINS"`
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.
Click to show internal directories.
Click to hide internal directories.