mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-06 17:23:42 +08:00
feat: 添加支持多个短信服务商支持 添加短信宝服务商支持,同时添加配置示例
This commit is contained in:
@@ -17,6 +17,7 @@ type AppConfig struct {
|
||||
ApiConfig ChatPlusApiConfig // ChatPlus API authorization configs
|
||||
SmsConfig AliYunSmsConfig // AliYun send message service config
|
||||
OSS OSSConfig // OSS config
|
||||
SMS SMSConfig // sms config
|
||||
MjConfigs []MidJourneyConfig // mj AI draw service pool
|
||||
WeChatBot bool // 是否启用微信机器人
|
||||
SdConfigs []StableDiffusionConfig // sd AI draw service pool
|
||||
@@ -71,14 +72,14 @@ type StableDiffusionConfig struct {
|
||||
Txt2ImgJsonPath string
|
||||
}
|
||||
|
||||
type AliYunSmsConfig struct {
|
||||
AccessKey string
|
||||
AccessSecret string
|
||||
Product string
|
||||
Domain string
|
||||
Sign string // 短信签名
|
||||
CodeTempId string // 验证码短信模板 ID
|
||||
}
|
||||
//type AliYunSmsConfig struct {
|
||||
// AccessKey string
|
||||
// AccessSecret string
|
||||
// Product string
|
||||
// Domain string
|
||||
// Sign string // 短信签名
|
||||
// CodeTempId string // 验证码短信模板 ID
|
||||
//}
|
||||
|
||||
type AlipayConfig struct {
|
||||
Enabled bool // 是否启用该支付通道
|
||||
|
||||
25
api/core/types/sms.go
Normal file
25
api/core/types/sms.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package types
|
||||
|
||||
type SMSConfig struct {
|
||||
Active string
|
||||
ALI AliYunSmsConfig
|
||||
SMSBAO SmsBaoSmsConfig
|
||||
}
|
||||
|
||||
type AliYunSmsConfig struct {
|
||||
AccessKey string
|
||||
AccessSecret string
|
||||
Product string
|
||||
Domain string
|
||||
Sign string // 短信签名
|
||||
CodeTempId string // 验证码短信模板 ID
|
||||
}
|
||||
|
||||
type SmsBaoSmsConfig struct {
|
||||
Account string //短信包平台注册的用户名
|
||||
ApiKey string //apiKey
|
||||
Domain string //域名
|
||||
Sign string // 短信签名
|
||||
CodeTemplate string // 验证码短信模板 匹配
|
||||
Num string // 实效性
|
||||
}
|
||||
Reference in New Issue
Block a user