Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DEFAULT_TENCENT_SMS_ENDPOINT todo
DEFAULT_TENCENT_SMS_ENDPOINT = "sms.tencentcloudapi.com"
)
Variables ¶
View Source
var ( // Provider_name name map Provider_name = map[Provider]string{ ProviderTenCent: "tencent", } // Provider_value value map Provider_value = map[string]Provider{ "tencent": ProviderTenCent, } )
Functions ¶
Types ¶
type Config ¶
type Config struct { EnabledProvider Provider `bson:"enabled_provider" json:"enabled_provider"` Tencent *TenCentConfig `bson:"tencent" json:"tencent"` ALI *ALI `bson:"ali" json:"ali"` }
Config 短信配置
type Provider ¶
type Provider uint
Provider 短信提供商
func ParseProviderFromString ¶
ParseProviderFromString Parse Provider from string
func (*Provider) UnmarshalJSON ¶
UnmarshalJSON todo
type TenCentConfig ¶
type TenCentConfig struct { Endpoint string `bson:"endpoint" json:"endpoint" env:"K_SMS_TENCENT_ENDPOINT"` SecretID string `bson:"secret_id" json:"secret_id" validate:"required,lte=64" env:"K_SMS_TENCENT_SECRET_ID"` SecretKey string `bson:"secret_key" json:"secret_key" validate:"required,lte=64" env:"K_SMS_TENCENT_SECRET_KEY"` AppID string `bson:"app_id" json:"app_id" validate:"required,lte=64" env:"K_SMS_TENCENT_APPID"` TemplateID string `bson:"template_id" json:"template_id" validate:"required,lte=64" env:"K_SMS_TENCENT_TEMPLATE_ID"` Sign string `bson:"sign" json:"sign" validate:"required,lte=128" env:"K_SMS_TENCENT_SIGN"` }
TenCentConfig todo 接口和相关文档请参考https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms&SignVersion=
type TestSendRequest ¶
type TestSendRequest struct { *notify.SendSMSRequest *Config }
TestSendRequest todo
func NewDeaultTestSendRequest ¶
func NewDeaultTestSendRequest() *TestSendRequest
NewDeaultTestSendRequest todo
Click to show internal directories.
Click to hide internal directories.