1
0
mirror of https://github.com/rancher/types.git synced 2025-07-12 21:07:59 +00:00

Merge pull request #371 from zionwu/fixsmtp

Remove required tag for smtp username and password
This commit is contained in:
Alena Prokharchyk 2018-04-19 21:18:50 -07:00 committed by GitHub
commit 5ec815bea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -135,8 +135,9 @@ type Notification struct {
type SMTPConfig struct {
Host string `json:"host,omitempty" norman:"required,type=dnsLabel"`
Port int `json:"port,omitempty" norman:"required,min=1,max=65535,default=465"`
Username string `json:"username,omitempty" norman:"required"`
Password string `json:"password,omitempty" norman:"required"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Sender string `json:"sender,omitempty" norman:"required"`
DefaultRecipient string `json:"defaultRecipient,omitempty" norman:"required"`
TLS bool `json:"tls,omitempty" norman:"required,default=true"`
}

View File

@ -6,6 +6,7 @@ const (
SMTPConfigFieldHost = "host"
SMTPConfigFieldPassword = "password"
SMTPConfigFieldPort = "port"
SMTPConfigFieldSender = "sender"
SMTPConfigFieldTLS = "tls"
SMTPConfigFieldUsername = "username"
)
@ -15,6 +16,7 @@ type SMTPConfig struct {
Host string `json:"host,omitempty" yaml:"host,omitempty"`
Password string `json:"password,omitempty" yaml:"password,omitempty"`
Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
Sender string `json:"sender,omitempty" yaml:"sender,omitempty"`
TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"`
Username string `json:"username,omitempty" yaml:"username,omitempty"`
}