Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultServerAddress = "0.0.0.0:3000" DefaultDataDir = "./" DefaultDataRetention = "1d" DefaultLogLevel = "info" DefaultConfigFilename = "httpe.conf" EnvPrefix = "httpe" )
Variables ¶
View Source
var ( ErrAddressIncludesScheme = errors.New("server address must not include scheme") ErrUnableToAccessCertFile = errors.New("failed to open/access cert_file") ErrUnableToAccessKeyFile = errors.New("failed to open/access key_file") ErrCertOrKeyMissing = errors.New("to activate TLS you must provide cert AND key") ErrNoRulesFile = errors.New("no rules file specified") ErrRulesFileNotReadable = errors.New("rules file not found or not readable") ErrBadSMTPServer = errors.New("SMTP server is not a valid hostname or IP address") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { S *SvrConfig `mapstructure:"server"` SMTP *SMTPConfig `mapstructure:"smtp"` // contains filtered or unexported fields }
Config is used for managing the license server config values
func (*Config) Load ¶
Load reads the config from the reader (if non nil) or a file (if the reader isn't specified). If not using the reader, then the file will either be the one specified via the config flag or the default config filename.
func (*Config) LoadAndValidate ¶
LoadAndValidate loads and validates configuration values from either the path or reader specified
type SMTPConfig ¶
type SvrConfig ¶
type SvrConfig struct { Address string `mapstructure:"address"` DataDir string `mapstructure:"data_dir"` DataRetention string `mapstructure:"data_retention"` CertFile string `mapstructure:"cert_file"` KeyFile string `mapstructure:"key_file"` AccessLogFile string `mapstructure:"access_log_file"` LogFile string `mapstructure:"log_file"` LogLevel string `mapstructure:"log_level"` RulesFile string `mapstructure:"rules_file"` ValidateOnly bool `mapstructure:"validate"` DumpRules bool `mapstructure:"dump_rules"` }
SvrConfig represents the config settings for the server
Click to show internal directories.
Click to hide internal directories.