Documentation ¶
Index ¶
- Constants
- func GetMd5String(s string) string
- func Md5(str string) string
- func RandStringBytesCrypto(n int) (string, error)
- type ACSClient
- type AliyunClient
- type AliyunResult
- type AmazonSNSClient
- type BaiduClient
- type Destination
- type GCCPAYClient
- type HuaweiClient
- type HuyiClient
- type InfobipClient
- type InfobipConfigService
- type Message
- type MessageData
- type Mocker
- type Msg91Client
- type NetgsmClient
- type NetgsmResponse
- type OsonClient
- type OsonResponse
- type QuanmSMSClient
- type SmsBaoClient
- type SmsClient
- type SmsService
- type SubmailClient
- type SubmailResult
- type TencentClient
- type TwilioClient
- type UcloudClient
- type VolcClient
Constants ¶
View Source
const ( Twilio = "Twilio SMS" AmazonSNS = "Amazon SNS" AzureACS = "Azure ACS" Msg91 = "Msg91 SMS" GCCPAY = "GCCPAY SMS" Infobip = "Infobip SMS" SUBMAIL = "SUBMAIL SMS" SmsBao = "SmsBao SMS" Aliyun = "Aliyun SMS" TencentCloud = "Tencent Cloud SMS" BaiduCloud = "Baidu Cloud SMS" VolcEngine = "Volc Engine SMS" HuaweiCloud = "Huawei Cloud SMS" UCloud = "UCloud SMS" Huyi = "Huyi SMS" MockSms = "Mock SMS" Netgsm = "Netgsm SMS" OsonSms = "OSON SMS" QuanmSms = "Quanm SMS" )
View Source
const ( WSSE_HEADER_FORMAT = "UsernameToken Username=\"%s\",PasswordDigest=\"%s\",Nonce=\"%s\",Created=\"%s\"" AUTH_HEADER_VALUE = "WSSE realm=\"SDP\",profile=\"UsernameToken\",type=\"Appkey\"" )
Variables ¶
This section is empty.
Functions ¶
func GetMd5String ¶
func RandStringBytesCrypto ¶
Types ¶
type ACSClient ¶
func GetACSClient ¶
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 AliyunResult ¶
type AmazonSNSClient ¶
type AmazonSNSClient struct {
// contains filtered or unexported fields
}
func GetAmazonSNSClient ¶
func (*AmazonSNSClient) SendMessage ¶
func (a *AmazonSNSClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type BaiduClient ¶
type BaiduClient struct {
// contains filtered or unexported fields
}
func GetBceClient ¶
func GetBceClient(accessId, accessKey, sign, template string, endpoint []string) (*BaiduClient, error)
func (*BaiduClient) SendMessage ¶
func (c *BaiduClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type Destination ¶
type Destination struct {
To string `json:"to"`
}
type GCCPAYClient ¶
type GCCPAYClient struct {
// contains filtered or unexported fields
}
func GetGCCPAYClient ¶
func GetGCCPAYClient(clientname string, secret string, template string) (*GCCPAYClient, error)
func (*GCCPAYClient) SendMessage ¶
func (c *GCCPAYClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type HuaweiClient ¶
type HuaweiClient struct {
// contains filtered or unexported fields
}
func GetHuaweiClient ¶
func (*HuaweiClient) SendMessage ¶
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 ¶
type HuyiClient struct {
// contains filtered or unexported fields
}
func GetHuyiClient ¶
func GetHuyiClient(appId string, appKey string, template string) (*HuyiClient, error)
func (*HuyiClient) SendMessage ¶
func (hc *HuyiClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type InfobipClient ¶
type InfobipClient struct {
// contains filtered or unexported fields
}
func GetInfobipClient ¶
func (*InfobipClient) SendMessage ¶
func (c *InfobipClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type InfobipConfigService ¶
type InfobipConfigService struct {
// contains filtered or unexported fields
}
type Message ¶
type Message struct { From string `json:"from"` Destinations []Destination `json:"destinations"` Text string `json:"text"` }
type MessageData ¶
type MessageData struct {
Messages []Message `json:"messages"`
}
type Msg91Client ¶
type Msg91Client struct {
// contains filtered or unexported fields
}
func GetMsg91Client ¶
func GetMsg91Client(senderId string, authKey string, templateId string) (*Msg91Client, error)
func (*Msg91Client) SendMessage ¶
func (m *Msg91Client) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type NetgsmClient ¶
type NetgsmClient struct {
// contains filtered or unexported fields
}
func GetNetgsmClient ¶
func GetNetgsmClient(accessId, accessKey, sign, template string) (*NetgsmClient, error)
func (*NetgsmClient) SendMessage ¶
func (c *NetgsmClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type NetgsmResponse ¶
type OsonClient ¶
type OsonClient struct { Endpoint string SenderID string SecretAccessHash string Sign string Message string }
func GetOsonClient ¶
func GetOsonClient(senderId, secretAccessHash, sign, message string) (*OsonClient, error)
func (*OsonClient) SendMessage ¶
func (c *OsonClient) SendMessage(param map[string]string, targetPhoneNumber ...string) (err error)
type OsonResponse ¶
type QuanmSMSClient ¶
type QuanmSMSClient struct {
// contains filtered or unexported fields
}
func GetQuanmSMSClient ¶
func GetQuanmSMSClient(openid string, apikey string, templateid string) (*QuanmSMSClient, error)
func (*QuanmSMSClient) SendMessage ¶
func (c *QuanmSMSClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type SmsBaoClient ¶
type SmsBaoClient struct {
// contains filtered or unexported fields
}
func GetSmsbaoClient ¶
func (*SmsBaoClient) SendMessage ¶
func (c *SmsBaoClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type SmsClient ¶
type SmsService ¶
type SmsService struct {
// contains filtered or unexported fields
}
type SubmailClient ¶
type SubmailClient struct {
// contains filtered or unexported fields
}
func GetSubmailClient ¶
func GetSubmailClient(appid string, signature string, project string) (*SubmailClient, error)
func (*SubmailClient) SendMessage ¶
func (c *SubmailClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type SubmailResult ¶
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 ¶
type TwilioClient struct {
// contains filtered or unexported fields
}
func GetTwilioClient ¶
func GetTwilioClient(accessId string, accessKey string, template string) (*TwilioClient, error)
func (*TwilioClient) SendMessage ¶
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 UcloudClient ¶
type UcloudClient struct { ProjectId string PrivateKey string PublicKey string Sign string Template string // contains filtered or unexported fields }
func GetUcloudClient ¶
func (*UcloudClient) SendMessage ¶
func (c *UcloudClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type VolcClient ¶
type VolcClient struct {
// contains filtered or unexported fields
}
func GetVolcClient ¶
func GetVolcClient(accessId, accessKey, sign, templateId string, smsAccount []string) (*VolcClient, error)
func (*VolcClient) SendMessage ¶
func (c *VolcClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
Click to show internal directories.
Click to hide internal directories.