47 lines
1.0 KiB
Go
47 lines
1.0 KiB
Go
package config
|
|
|
|
import "time"
|
|
|
|
type SMTPConfig struct {
|
|
Enable bool
|
|
Sort int
|
|
GoroutinePoolNum int
|
|
|
|
Host string
|
|
Port int
|
|
Username string
|
|
Password string
|
|
}
|
|
|
|
type AmazonSesSettings struct {
|
|
Enable bool
|
|
Sort int
|
|
PoolSize int
|
|
|
|
Region string
|
|
Sender string
|
|
Charset string
|
|
AccessKey string
|
|
SecretKey string
|
|
Token string
|
|
}
|
|
|
|
type MitakeSMSSender struct {
|
|
Enable bool
|
|
Sort int
|
|
PoolSize int
|
|
|
|
User string
|
|
Password string
|
|
}
|
|
|
|
// DeliveryConfig 傳送重試配置
|
|
type DeliveryConfig struct {
|
|
MaxRetries int `json:"max_retries"` // 最大重試次數
|
|
InitialDelay time.Duration `json:"initial_delay"` // 初始重試延遲 (100ms)
|
|
BackoffFactor float64 `json:"backoff_factor"` // 指數退避因子 (2.0)
|
|
MaxDelay time.Duration `json:"max_delay"` // 最大延遲時間
|
|
Timeout time.Duration `json:"timeout"` // 單次發送超時時間
|
|
EnableHistory bool `json:"enable_history"` // 是否啟用歷史記錄
|
|
}
|