config

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr      string `flag:"listen-addr" desc:"HTTP listen address" default:":8080"`
	TLS             bool   `flag:"tls" desc:"Activate TLS" default:"false"`
	TLSCertFile     string `flag:"tls-cert-file" desc:"TLS certificate file" default:"server.pem"`
	TLSKeyFile      string `flag:"tls-key-file" desc:"TLS key file" default:"server.key"`
	TLSDomain       string `flag:"tls-domain" desc:"TLS domain name used by ACME"`
	NbWorkers       int    `flag:"nb-workers" desc:"Number of workers to start" default:"2"`
	HookTimeout     int    `flag:"hook-timeout" desc:"Maximum hook execution time in second" default:"10"`
	HookLogDir      string `flag:"hook-log-dir" desc:"Hook execution logs location" default:""`
	ScriptDir       string `flag:"scripts" desc:"Scripts location" default:"scripts"`
	PasswdFile      string `flag:"passwd-file" desc:"Password file for basic HTTP authentication" default:".htpasswd"`
	LogLevel        string `flag:"log-level" desc:"Log level (debug, info, warn, error)" default:"info"`
	LogFormat       string `flag:"log-format" desc:"Log format (json, text)" default:"text"`
	LogHookOutput   bool   `flag:"log-hook-output" desc:"Log hook execution output" default:"false"`
	LogHTTPRequest  bool   `flag:"log-http-request" desc:"Log HTTP request" default:"false"`
	StaticDir       string `flag:"static-dir" desc:"Static file directory to serve on /static path" default:""`
	StaticPath      string `flag:"static-path" desc:"Path to serve static file directory" default:"/static"`
	NotificationURI string `flag:"notification-uri" desc:"Notification URI"`
	TrustStoreFile  string `flag:"trust-store-file" desc:"Trust store used by HTTP signature verifier (.pem or .p12)"`
}

Config contain global configuration

func (*Config) Validate added in v1.13.0

func (c *Config) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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