Documentation ¶
Index ¶
- Variables
- func BuildLogger(conf Log, stdout, stderr zapcore.WriteSyncer) (*zaplog.Logger, error)
- func CobraInitialize(cfgFile string)
- func ConfigureLogger(conf Log, stdout, stderr zapcore.WriteSyncer) (err error)
- func GetDefaultInt(name string) int
- func GetDefaultString(name string) string
- func Hook(dataType reflect.Type, targetDataType reflect.Type, rawData interface{}) (interface{}, error)
- func Init(cfgFile string)
- func LoadConfigFile(cfgFile string)
- func LogHook(dataType reflect.Type, targetDataType reflect.Type, rawData interface{}) (interface{}, error)
- func RelayHook(dataType reflect.Type, targetDataType reflect.Type, rawData interface{}) (interface{}, error)
- func Reload()
- func SMTPHook(dataType reflect.Type, targetDataType reflect.Type, rawData interface{}) (interface{}, error)
- func SetDefaults(force bool)
- func SetDefaultsForViper(force bool, v *viper.Viper)
- type Config
- type Log
- type LogFormat
- type Relay
- type RelayAuthMethod
- type RelayConnectionType
- type RelayOutgoingServer
- type SMTP
- type SMTPAuth
- type SMTPAuthUser
- type SMTPLimit
- type SMTPListen
- type SMTPTLS
- type SMTPTimeout
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAuthMethod = errors.New("invalid auth method") ErrInvalidConnectionType = errors.New("invalid address protocol") )
View Source
var ErrInvalidLogFormat = errors.New("invalid log format")
View Source
var (
ErrUnserializing = errors.New("error unserializing conf")
)
Functions ¶
func BuildLogger ¶
func CobraInitialize ¶
func CobraInitialize(cfgFile string)
func ConfigureLogger ¶
func ConfigureLogger(conf Log, stdout, stderr zapcore.WriteSyncer) (err error)
func GetDefaultInt ¶
func GetDefaultString ¶
func LoadConfigFile ¶
func LoadConfigFile(cfgFile string)
func SetDefaults ¶
func SetDefaults(force bool)
func SetDefaultsForViper ¶
Types ¶
type Relay ¶
type Relay struct {
OutgoingServer RelayOutgoingServer
}
type RelayAuthMethod ¶
type RelayAuthMethod int
const ( AuthNone RelayAuthMethod = iota AuthPlain AuthCramMD5 )
type RelayConnectionType ¶
type RelayConnectionType int
const ( ConnectionPlain RelayConnectionType = iota ConnectionStartTLS ConnectionTLS )
type RelayOutgoingServer ¶
type RelayOutgoingServer struct { AuthMethod RelayAuthMethod ConnectionType RelayConnectionType FromEmail string Host string Password string Port int Username string VerifyTLS bool }
type SMTP ¶
type SMTP struct { Auth SMTPAuth Hostname string Limit SMTPLimit Listen []SMTPListen Timeout SMTPTimeout TLS SMTPTLS Whitelist []string }
type SMTPAuth ¶
type SMTPAuth struct { Enabled bool Users []SMTPAuthUser }
type SMTPAuthUser ¶
type SMTPListen ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.