diff options
| author | Clement Michaud <clement.michaud34@gmail.com> | 2019-11-17 11:47:07 +0100 |
|---|---|---|
| committer | Clément Michaud <clement.michaud34@gmail.com> | 2019-11-17 16:30:33 +0100 |
| commit | 3b2d733367c88621e4178301f2bcb4bc03613eee (patch) | |
| tree | 41ac41fc5b6cece04db85a08bfa7c32a022f7354 /internal/configuration/schema/notifier.go | |
| parent | a06b69dd458e756f1a3d6867eb5b9f54560e2ee1 (diff) | |
Move source code into internal directory to follow standard project layout.
https://github.com/golang-standards/project-layout
Diffstat (limited to 'internal/configuration/schema/notifier.go')
| -rw-r--r-- | internal/configuration/schema/notifier.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/configuration/schema/notifier.go b/internal/configuration/schema/notifier.go new file mode 100644 index 000000000..6a3a7694a --- /dev/null +++ b/internal/configuration/schema/notifier.go @@ -0,0 +1,31 @@ +package schema + +// FileSystemNotifierConfiguration represents the configuration of the notifier writing emails in a file. +type FileSystemNotifierConfiguration struct { + Filename string `yaml:"filename"` +} + +// EmailNotifierConfiguration represents the configuration of the email service notifier (like GMAIL API). +type EmailNotifierConfiguration struct { + Username string `yaml:"username"` + Password string `yaml:"password"` + Sender string `yaml:"sender"` + Service string `yaml:"service"` +} + +// SMTPNotifierConfiguration represents the configuration of the SMTP server to send emails with. +type SMTPNotifierConfiguration struct { + Username string `yaml:"username"` + Password string `yaml:"password"` + Secure string `yaml:"secure"` + Host string `yaml:"host"` + Port int `yaml:"port"` + Sender string `yaml:"sender"` +} + +// NotifierConfiguration representes the configuration of the notifier to use when sending notifications to users. +type NotifierConfiguration struct { + FileSystem *FileSystemNotifierConfiguration `yaml:"filesystem"` + Email *EmailNotifierConfiguration `yaml:"email"` + SMTP *SMTPNotifierConfiguration `yaml:"smtp"` +} |
