homebox/backend/internal/sys/config/conf_mailer.go

16 lines
394 B
Go
Raw Normal View History

2022-08-30 02:30:36 +00:00
package config
type MailerConf struct {
Host string `conf:""`
Port int `conf:""`
Username string `conf:""`
Password string `conf:""`
2024-03-02 18:02:41 +00:00
From string `conf:"info@example.com"`
2022-08-30 02:30:36 +00:00
}
// Ready is a simple check to ensure that the configuration is not empty.
// or with it's default state.
func (mc *MailerConf) Ready() bool {
2024-03-02 18:02:41 +00:00
return mc.Host != "" && mc.Port != 0 && mc.From != ""
2022-08-30 02:30:36 +00:00
}