mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-21 20:12:33 +03:00

Added email settings page, settings now save in database, ability to send an email to client when it's created
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// GlobalSetting model
|
|
type GlobalSetting struct {
|
|
EndpointAddress string `json:"endpoint_address"`
|
|
DNSServers []string `json:"dns_servers"`
|
|
MTU int `json:"mtu,string"`
|
|
PersistentKeepalive int `json:"persistent_keepalive,string"`
|
|
ForwardMark string `json:"forward_mark"`
|
|
ConfigFilePath string `json:"config_file_path"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type EmailSetting struct {
|
|
SendgridApiKey string `json:"sendgrid_api_key"`
|
|
EmailFromName string `json:"email_from_name"`
|
|
EmailFrom string `json:"email_from"`
|
|
SmtpHostname string `json:"smtp_hostname"`
|
|
SmtpPort int `json:"smtp_port"`
|
|
SmtpUsername string `json:"smtp_username"`
|
|
SmtpPassword string `json:"smtp_password"`
|
|
SmtpNoTLSCheck bool `json:"smtp_no_tls_check"`
|
|
SmtpAuthType string `json:"smtp_auth_type"`
|
|
SmtpEncryption string `json:"smtp_encryption"`
|
|
DefaultEmailSubject string `json:"default_email_subject"`
|
|
DefaultEmailContent string `json:"default_email_content"`
|
|
}
|