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:
commit
5ec815bea4
@ -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"`
|
||||
}
|
||||
|
@ -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"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user