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 SmsBaoClient
- type SmsClient
- type SmsService
- type SubmailClient
- type SubmailResult
- type TencentClient
- type TwilioClient
- type UcloudClient
- type UnismsClient
- 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" UniSms = "Uni 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 ¶ added in v0.0.6
func RandStringBytesCrypto ¶ added in v0.9.0
Types ¶
type ACSClient ¶ added in v0.11.0
func GetACSClient ¶ added in v0.11.0
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 ¶ added in v0.6.0
type AmazonSNSClient ¶ added in v0.11.0
type AmazonSNSClient struct {
// contains filtered or unexported fields
}
func GetAmazonSNSClient ¶ added in v0.11.0
func (*AmazonSNSClient) SendMessage ¶ added in v0.11.0
func (a *AmazonSNSClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type BaiduClient ¶ added in v0.8.0
type BaiduClient struct {
// contains filtered or unexported fields
}
func GetBceClient ¶ added in v0.8.0
func GetBceClient(accessId, accessKey, sign, template string, endpoint []string) (*BaiduClient, error)
func (*BaiduClient) SendMessage ¶ added in v0.8.0
func (c *BaiduClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type Destination ¶ added in v0.9.0
type Destination struct {
To string `json:"to"`
}
type GCCPAYClient ¶ added in v0.9.0
type GCCPAYClient struct {
// contains filtered or unexported fields
}
func GetGCCPAYClient ¶ added in v0.9.0
func GetGCCPAYClient(clientname string, secret string, template string) (*GCCPAYClient, error)
func (*GCCPAYClient) SendMessage ¶ added in v0.9.0
func (c *GCCPAYClient) 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 InfobipClient ¶ added in v0.9.0
type InfobipClient struct {
// contains filtered or unexported fields
}
func GetInfobipClient ¶ added in v0.9.0
func (*InfobipClient) SendMessage ¶ added in v0.9.0
func (c *InfobipClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type InfobipConfigService ¶ added in v0.9.0
type InfobipConfigService struct {
// contains filtered or unexported fields
}
type Message ¶ added in v0.9.0
type Message struct { From string `json:"from"` Destinations []Destination `json:"destinations"` Text string `json:"text"` }
type MessageData ¶ added in v0.9.0
type MessageData struct {
Messages []Message `json:"messages"`
}
type Msg91Client ¶ added in v0.10.0
type Msg91Client struct {
// contains filtered or unexported fields
}
func GetMsg91Client ¶ added in v0.10.0
func GetMsg91Client(senderId string, authKey string, templateId string) (*Msg91Client, error)
func (*Msg91Client) SendMessage ¶ added in v0.10.0
func (m *Msg91Client) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type NetgsmClient ¶ added in v0.13.0
type NetgsmClient struct {
// contains filtered or unexported fields
}
func GetNetgsmClient ¶ added in v0.13.0
func GetNetgsmClient(accessId, accessKey, sign, template string) (*NetgsmClient, error)
func (*NetgsmClient) SendMessage ¶ added in v0.13.0
func (c *NetgsmClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type NetgsmResponse ¶ added in v0.13.0
type OsonClient ¶ added in v0.20.0
type OsonClient struct { Endpoint string SenderID string SecretAccessHash string Sign string Message string }
func GetOsonClient ¶ added in v0.20.0
func GetOsonClient(senderId, secretAccessHash, sign, message string) (*OsonClient, error)
func (*OsonClient) SendMessage ¶ added in v0.20.0
func (c *OsonClient) SendMessage(param map[string]string, targetPhoneNumber ...string) (err error)
type OsonResponse ¶ added in v0.20.0
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 SmsService ¶ added in v0.9.0
type SmsService struct {
// contains filtered or unexported fields
}
type SubmailClient ¶ added in v0.6.0
type SubmailClient struct {
// contains filtered or unexported fields
}
func GetSubmailClient ¶ added in v0.6.0
func GetSubmailClient(appid string, signature string, project string) (*SubmailClient, error)
func (*SubmailClient) SendMessage ¶ added in v0.6.0
func (c *SubmailClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type SubmailResult ¶ added in v0.6.0
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 UcloudClient ¶ added in v0.9.0
type UcloudClient struct { ProjectId string PrivateKey string PublicKey string Sign string Template string // contains filtered or unexported fields }
func GetUcloudClient ¶ added in v0.9.0
func (*UcloudClient) SendMessage ¶ added in v0.9.0
func (c *UcloudClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
type UnismsClient ¶ added in v0.23.0
type UnismsClient struct {
// contains filtered or unexported fields
}
func GetUnismsClient ¶ added in v0.23.0
func (*UnismsClient) SendMessage ¶ added in v0.23.0
func (c *UnismsClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error
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.