Documentation ¶
Overview ¶
阿里云 短信发送
Index ¶
- func GetRandomString(length int) string
- func SendMessage(userInput *UserParams) (bool, string, error)
- func SendSms(tplCode, mobile, code string) bool
- func SendSmsLoginCode(mobile, code string) bool
- func SendSmsRegCode(mobile, code string) bool
- func SendSmsResetCode(mobile, code string) bool
- func Sign(appSecret, paramsEncodeValue string) string
- func SpecialUrlEncode(str string) string
- type Params
- type SendSmsResponse
- type UserParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendMessage ¶
func SendMessage(userInput *UserParams) (bool, string, error)
func SpecialUrlEncode ¶
Types ¶
type SendSmsResponse ¶
type UserParams ¶
type UserParams struct { AccessKeyId string AppSecret string PhoneNumbers string // 接收手机号 SignName string // 短信签名 TemplateCode string // 短信模板ID TemplateParam string // 短信模板变量替换JSON串,友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\r\n,否则会导致JSON在服务端解析失败 SmsUpExtendCode string // 上行短信扩展码,无特殊需要此字段的用户请忽略此字段 OutId string // 外部流水扩展字段 }
Click to show internal directories.
Click to hide internal directories.