mirror of https://gitee.com/godoos/godoos.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
794 B
27 lines
794 B
package tencent
|
|
|
|
import "errors"
|
|
|
|
type qcloudsms struct {
|
|
appid int
|
|
appkey string
|
|
SmsSingleSender *smsSingleSender
|
|
SmsMultiSender *smsMultiSender
|
|
SmsStatusPuller *smsStatusPuller
|
|
SmsMobileStatusPuller *smsMobileStatusPuller
|
|
}
|
|
|
|
// NewQcloudSms new一个qcloudsms实例
|
|
func NewQcloudSms(appid int, appkey string) (*qcloudsms, error) {
|
|
if appkey == "" {
|
|
return nil, errors.New("appkey is nil")
|
|
}
|
|
return &qcloudsms{
|
|
appid: appid,
|
|
appkey: appkey,
|
|
SmsSingleSender: newSmsSingleSender(appid, appkey),
|
|
SmsMultiSender: newSmsMultiSender(appid, appkey),
|
|
SmsStatusPuller: newSmsStatusPuller(appid, appkey),
|
|
SmsMobileStatusPuller: newSmsMobileStatusPuller(appid, appkey),
|
|
}, nil
|
|
}
|
|
|