增加短信渠道

This commit is contained in:
Yvan
2026-09-29 18:15:35 +08:00
parent a16b8f8e89
commit 89cc7761b5
38 changed files with 1469 additions and 39 deletions
@@ -120,6 +120,22 @@ func genericPaymentDefinition(provider, name, description string) IntegrationCon
}
var integrationDefinitions = map[string][]IntegrationConfigDefinition{
IntegrationKindSMS: {
{Kind: IntegrationKindSMS, Provider: "aliyun", Name: "阿里云短信", Description: "中国大陆短信,使用已审核的签名和模板。", Defaults: map[string]any{"access_key_id": "", "access_key_secret": "", "sign_name": "", "template_id": ""}, Fields: []IntegrationConfigField{
integrationField("access_key_id", "AccessKey ID", true, false, "text"),
integrationField("access_key_secret", "AccessKey Secret", true, true, "password"),
integrationField("sign_name", "短信签名", true, false, "text"),
integrationField("template_id", "模板 CODE", true, false, "text"),
}},
{Kind: IntegrationKindSMS, Provider: "tencent", Name: "腾讯云短信", Description: "使用短信应用、已审核的签名和模板,模板参数按顺序填写。", Defaults: map[string]any{"secret_id": "", "secret_key": "", "sdk_app_id": "", "region": "ap-guangzhou", "sign_name": "", "template_id": ""}, Fields: []IntegrationConfigField{
integrationField("secret_id", "Secret ID", true, true, "password"),
integrationField("secret_key", "Secret Key", true, true, "password"),
integrationField("sdk_app_id", "短信应用 SDK App ID", true, false, "text"),
integrationField("region", "地域", true, false, "text"),
integrationField("sign_name", "短信签名", true, false, "text"),
integrationField("template_id", "模板 ID", true, false, "text"),
}},
},
IntegrationKindMQ: {
{
Kind: IntegrationKindMQ, Provider: "emqx", Name: "EMQX", Description: "EMQX MQTT 消息服务",