Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultConfigDir() string
- func LoadEnvFromFile(envFile string) error
- func ParseEnvFile(envInput io.Reader) (map[string]string, error)
- func SetDefaults(c *Config)
- func TrapSignals()
- type Config
- func (c *Config) GetCertContainerDir() string
- func (c *Config) GetCertLocalDir() string
- func (c *Config) GetEngine() string
- func (c *Config) GetEngineConfigContainerFile() string
- func (c *Config) GetEngineConfigLocalFile() string
- func (c *Config) GetEnviron() string
- func (c *Config) GetIdent() string
- func (c *Config) GetTemplateFile() string
- func (c *Config) GetVhostConfigContainerDir() string
- func (c *Config) GetVhostConfigLocalDir() string
- func (c *Config) GetVhostConfigLocalDirAbs() (string, error)
- func (c *Config) Init() *Config
- func (c *Config) RemoveCachedCert(domain string)
- func (c *Config) Restart() error
- func (c *Config) Start() error
- func (c *Config) Stop() error
Constants ¶
View Source
const UnsupportedPathInfo = `unsupported-nging-default-webserver-config`
Variables ¶
View Source
var ( DefaultConfig = &Config{ Agreed: true, CAUrl: certmagic.Default.CA, CATimeout: int64(certmagic.HTTPTimeout.Seconds()), DisableHTTPChallenge: certmagic.Default.DisableHTTPChallenge, DisableTLSALPNChallenge: certmagic.Default.DisableTLSALPNChallenge, ServerType: `http`, CPU: `80%`, PidFile: `./caddy.pid`, AppName: `nging`, } DefaultVersion = `2.0.0` EnableReload = true )
Functions ¶
func DefaultConfigDir ¶ added in v1.4.7
func DefaultConfigDir() string
func LoadEnvFromFile ¶
LoadEnvFromFile loads additional envs if file provided and exists Envs in file should be in KEY=VALUE format
func ParseEnvFile ¶
ParseEnvFile implements parse logic for environment files
func SetDefaults ¶
func SetDefaults(c *Config)
func TrapSignals ¶
func TrapSignals()
Types ¶
type Config ¶
type Config struct { Agreed bool `json:"agreed"` //Agree to the CA's Subscriber Agreement CAUrl string `json:"caURL"` //URL to certificate authority's ACME server directory DisableHTTPChallenge bool `json:"disableHTTPChallenge"` DisableTLSALPNChallenge bool `json:"disableTLSALPNChallenge"` Caddyfile string `json:"caddyFile,omitempty"` //Caddyfile to load (default caddy.DefaultConfigFile) CPU string `json:"cpu"` //CPU cap CAEmail string `json:"caEmail"` //Default ACME CA account email address CATimeout int64 `json:"caTimeout"` //Default ACME CA HTTP timeout LogFile string `json:"logFile"` //Process log file PidFile string `json:"-"` //Path to write pid file Quiet bool `json:"quiet"` //Quiet mode (no initialization output) Revoke string `json:"revoke"` //Hostname for which to revoke the certificate ServerType string `json:"serverType"` //Type of server to run VhostConfigDir string `json:"vhostConfigDir"` //--- EnvFile string `json:"envFile"` //Path to file with environment variables to load in KEY=VALUE format Plugins bool `json:"plugins"` //List installed plugins Version bool `json:"version"` //Show version //--- AppVersion string AppName string // contains filtered or unexported fields }
func (*Config) GetCertContainerDir ¶ added in v1.4.7
func (*Config) GetCertLocalDir ¶ added in v1.4.7
func (*Config) GetEngineConfigContainerFile ¶ added in v1.4.7
func (*Config) GetEngineConfigLocalFile ¶ added in v1.4.7
func (*Config) GetEnviron ¶ added in v1.4.7
func (*Config) GetTemplateFile ¶ added in v1.4.7
func (*Config) GetVhostConfigContainerDir ¶ added in v1.4.7
func (*Config) GetVhostConfigLocalDir ¶ added in v1.4.7
func (*Config) GetVhostConfigLocalDirAbs ¶ added in v1.4.7
func (*Config) RemoveCachedCert ¶
Click to show internal directories.
Click to hide internal directories.