v1.0.0
This commit is contained in:
@@ -14,6 +14,7 @@ type Config struct {
|
||||
JWT JWTConfig `mapstructure:"jwt"`
|
||||
API APIConfig `mapstructure:"api"`
|
||||
SMS SMSConfig `mapstructure:"sms"`
|
||||
Email EmailConfig `mapstructure:"email"`
|
||||
Storage StorageConfig `mapstructure:"storage"`
|
||||
OCR OCRConfig `mapstructure:"ocr"`
|
||||
RateLimit RateLimitConfig `mapstructure:"ratelimit"`
|
||||
@@ -184,6 +185,18 @@ type SMSRateLimit struct {
|
||||
MinInterval time.Duration `mapstructure:"min_interval"` // 最小发送间隔
|
||||
}
|
||||
|
||||
// EmailConfig 邮件服务配置
|
||||
type EmailConfig struct {
|
||||
Host string `mapstructure:"host"` // SMTP服务器地址
|
||||
Port int `mapstructure:"port"` // SMTP服务器端口
|
||||
Username string `mapstructure:"username"` // 邮箱用户名
|
||||
Password string `mapstructure:"password"` // 邮箱密码/授权码
|
||||
FromEmail string `mapstructure:"from_email"` // 发件人邮箱
|
||||
UseSSL bool `mapstructure:"use_ssl"` // 是否使用SSL
|
||||
Timeout time.Duration `mapstructure:"timeout"` // 超时时间
|
||||
Domain string `mapstructure:"domain"` // 控制台域名
|
||||
}
|
||||
|
||||
// GetDSN 获取数据库DSN连接字符串
|
||||
func (d DatabaseConfig) GetDSN() string {
|
||||
return "host=" + d.Host +
|
||||
|
||||
Reference in New Issue
Block a user