Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliSmsClient ¶
AliSmsClient
func NewAliSmsClient ¶
func NewAliSmsClient(accessKeyID, accessKeySecret string) *AliSmsClient
NewAliSmsClient get aliyun sms client
func (*AliSmsClient) SendMarket ¶
func (m *AliSmsClient) SendMarket(sign, templateId, phone string) (err error)
SendMarket 营销短信
func (*AliSmsClient) SendVerifyCode ¶
func (m *AliSmsClient) SendVerifyCode(sign, templateID, phone, code string) (err error)
SendVerifyCode 验证码短信
type ISMS ¶
type ISMS interface {
// SendVerifyCode 发送验证码短信
// phones为多个时,用,分割
SendVerifyCode(phones, code string, templateId int) (bool, error)
// SendNotice 发送通知短信
SendNotice(phones, code string, templateId int) (bool, error)
// SendSell 发送营销短信
SendSell(phones, code string, templateId int) (bool, error)
//StatusCallBack 状态回调
StatusCallBack()
}
ISMS 接口
type UpYunMessage ¶
UpYunMessage UpYunMessage
type UpYunResult ¶
type UpYunResult struct {
MessageIDS []*UpYunMessage `json:"message_ids"`
}
UpYunResult 返回信息
type UpYunSmsBody ¶
type UpYunSmsBody struct {
Mobile string `json:"mobile"`
TemplateID int64 `json:"template_id"`
Vars string `json:"vars"`
}
UpYunSmsBody 发送模型
type UpYunSmsClient ¶
type UpYunSmsClient struct {
Token string
}
UpYunSmsClient UpYunSmsClient
func NewUpYunSmsClient ¶
func NewUpYunSmsClient(token string) *UpYunSmsClient
Click to show internal directories.
Click to hide internal directories.