Documentation
¶
Index ¶
Constants ¶
View Source
const ( Aliyun = "Aliyun SMS" TencentCloud = "Tencent Cloud SMS" VolcEngine = "Volc Engine SMS" Huyi = "Huyi SMS" HuaweiCloud = "Huawei Cloud SMS" Twilio = "Twilio SMS" SmsBao = "SmsBao SMS" MockSms = "Mock SMS" )
View Source
const AUTH_HEADER_VALUE = "WSSE realm=\"SDP\",profile=\"UsernameToken\",type=\"Appkey\""
View Source
const WSSE_HEADER_FORMAT = "UsernameToken Username=\"%s\",PasswordDigest=\"%s\",Nonce=\"%s\",Created=\"%s\""
Variables ¶
This section is empty.
Functions ¶
func GetMd5String ¶ added in v0.0.6
Types ¶
type AliyunClient ¶
type AliyunClient struct {
// contains filtered or unexported fields
}
func GetAliyunClient ¶
func (*AliyunClient) SendMessage ¶
func (c *AliyunClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type HuaweiClient ¶ added in v0.2.0
type HuaweiClient struct {
// contains filtered or unexported fields
}
func GetHuaweiClient ¶ added in v0.2.0
func (*HuaweiClient) SendMessage ¶ added in v0.2.0
func (c *HuaweiClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
SendMessage https://support.huaweicloud.com/intl/en-us/devg-msgsms/sms_04_0012.html
type HuyiClient ¶ added in v0.0.6
type HuyiClient struct {
// contains filtered or unexported fields
}
func GetHuyiClient ¶ added in v0.0.6
func GetHuyiClient(appId string, appKey string, template string) (*HuyiClient, error)
func (*HuyiClient) SendMessage ¶ added in v0.0.6
func (hc *HuyiClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type SmsBaoClient ¶ added in v0.5.0
type SmsBaoClient struct {
// contains filtered or unexported fields
}
func GetSmsbaoClient ¶ added in v0.5.0
func (*SmsBaoClient) SendMessage ¶ added in v0.5.0
func (c *SmsBaoClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type SmsClient ¶
type TencentClient ¶
type TencentClient struct {
// contains filtered or unexported fields
}
func GetTencentClient ¶
func (*TencentClient) SendMessage ¶
func (c *TencentClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type TwilioClient ¶ added in v0.4.0
type TwilioClient struct {
// contains filtered or unexported fields
}
func GetTwilioClient ¶ added in v0.4.0
func GetTwilioClient(accessId string, accessKey string, template string) (*TwilioClient, error)
func (*TwilioClient) SendMessage ¶ added in v0.4.0
func (c *TwilioClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
SendMessage targetPhoneNumber[0] is the sender's number, so targetPhoneNumber should have at least two parameters
type VolcClient ¶ added in v0.0.3
type VolcClient struct {
// contains filtered or unexported fields
}
func GetVolcClient ¶ added in v0.0.3
func GetVolcClient(accessId, accessKey, sign, templateId string, smsAccount []string) (*VolcClient, error)
func (*VolcClient) SendMessage ¶ added in v0.0.3
func (c *VolcClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
Click to show internal directories.
Click to hide internal directories.