diff options
| author | Clement Michaud <clement.michaud34@gmail.com> | 2020-01-21 21:56:44 +0100 |
|---|---|---|
| committer | Amir Zarrinkafsh <nightah@me.com> | 2020-01-22 10:15:25 +1100 |
| commit | e92d3ced3a68783575e4be61621456eb5935d497 (patch) | |
| tree | 51367dc012781edacf69103edbd978381615ba8f /internal/configuration/schema/notifier.go | |
| parent | ea86b6252718059e120445afc5eacaf784d3608d (diff) | |
Introduce viper in order to read secrets from env variables.
Diffstat (limited to 'internal/configuration/schema/notifier.go')
| -rw-r--r-- | internal/configuration/schema/notifier.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/internal/configuration/schema/notifier.go b/internal/configuration/schema/notifier.go index e82cabbe5..ce2db6f73 100644 --- a/internal/configuration/schema/notifier.go +++ b/internal/configuration/schema/notifier.go @@ -2,23 +2,23 @@ package schema // FileSystemNotifierConfiguration represents the configuration of the notifier writing emails in a file. type FileSystemNotifierConfiguration struct { - Filename string `yaml:"filename"` + Filename string `mapstructure:"filename"` } // SMTPNotifierConfiguration represents the configuration of the SMTP server to send emails with. type SMTPNotifierConfiguration struct { - Username string `yaml:"username"` - Password string `yaml:"password"` - Sender string `yaml:"sender"` - Host string `yaml:"host"` - Port int `yaml:"port"` - TrustedCert string `yaml:"trusted_cert"` - DisableVerifyCert bool `yaml:"disable_verify_cert"` - DisableRequireTLS bool `yaml:"disable_require_tls"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` + Sender string `mapstructure:"sender"` + Host string `mapstructure:"host"` + Port int `mapstructure:"port"` + TrustedCert string `mapstructure:"trusted_cert"` + DisableVerifyCert bool `mapstructure:"disable_verify_cert"` + DisableRequireTLS bool `mapstructure:"disable_require_tls"` } // NotifierConfiguration represents the configuration of the notifier to use when sending notifications to users. type NotifierConfiguration struct { - FileSystem *FileSystemNotifierConfiguration `yaml:"filesystem"` - SMTP *SMTPNotifierConfiguration `yaml:"smtp"` + FileSystem *FileSystemNotifierConfiguration `mapstructure:"filesystem"` + SMTP *SMTPNotifierConfiguration `mapstructure:"smtp"` } |
