Documentation ¶
Index ¶
- type Client
- func (c *Client) MobileStatusPull(mobile string, startTime int64, endTime int64) (*MultiResult, error)
- func (c *Client) SMSStatusPull() (*MultiResult, error)
- func (c *Client) SendMarketSMS(mobile, content string) (*Result, error)
- func (c *Client) SendMarketSMSWithTemplate(mobile string, sign string, templateID string, parameters []string) (*Result, error)
- func (c *Client) SendMultipleMarketSMS(mobile []string, content string) (*MultiResult, error)
- func (c *Client) SendMultipleMarketSMSWithTemplate(mobile []string, sign, templateID string, parameters []string) (*MultiResult, error)
- func (c *Client) SendMultipleSMS(mobile []string, content string) (*MultiResult, error)
- func (c *Client) SendMultipleSMSWithTemplate(mobile []string, sign, templateID string, parameters []string) (*MultiResult, error)
- func (c *Client) SendSMS(mobile, content string) (*Result, error)
- func (c *Client) SendSMSWithTemplate(mobile string, sign string, templateID string, parameters []string) (*Result, error)
- func (c *Client) SendVoicePrompt(mobile string, content string, duration int64) (*Result, error)
- func (c *Client) SendVoiceWithFile(mobile string, file string) (*Result, error)
- func (c *Client) SendVoiceWithTemplate(mobile string, templateID string, templateParams []string, duration int64) (*Result, error)
- type MultiResult
- type Report
- type Result
- type SendResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { IDGenerator func() string // contains filtered or unexported fields }
Client a Tencent cloud SMS client
func (*Client) MobileStatusPull ¶
func (c *Client) MobileStatusPull(mobile string, startTime int64, endTime int64) (*MultiResult, error)
MobileStatusPull pull SMS messages status for single mobile.
func (*Client) SMSStatusPull ¶
func (c *Client) SMSStatusPull() (*MultiResult, error)
SMSStatusPull Pull SMS message status, this routine is enterprise only, please contact Tencent to open this feature see
func (*Client) SendMarketSMS ¶
SendMarketSMS send single market SMS without template and sign, which is available for enterprise account
func (*Client) SendMarketSMSWithTemplate ¶
func (c *Client) SendMarketSMSWithTemplate(mobile string, sign string, templateID string, parameters []string) (*Result, error)
SendMarketSMSWithTemplate send single market SMS with template and sign, which is default for personal account
func (*Client) SendMultipleMarketSMS ¶
func (c *Client) SendMultipleMarketSMS(mobile []string, content string) (*MultiResult, error)
SendMultipleMarketSMS multiple receiver version of SendMarketSMS
func (*Client) SendMultipleMarketSMSWithTemplate ¶
func (c *Client) SendMultipleMarketSMSWithTemplate(mobile []string, sign, templateID string, parameters []string) (*MultiResult, error)
SendMultipleMarketSMSWithTemplate multiple receiver version of SendMarketSMSWithTemplate
func (*Client) SendMultipleSMS ¶
func (c *Client) SendMultipleSMS(mobile []string, content string) (*MultiResult, error)
SendMultipleSMS multiple receiver version of SendSMS
func (*Client) SendMultipleSMSWithTemplate ¶
func (c *Client) SendMultipleSMSWithTemplate(mobile []string, sign, templateID string, parameters []string) (*MultiResult, error)
SendMultipleSMSWithTemplate multiple receiver version of SendSMSWithTemplate
func (*Client) SendSMS ¶
SendSMS send single notification SMS without template and sign, which is available for enterprise account
func (*Client) SendSMSWithTemplate ¶
func (c *Client) SendSMSWithTemplate(mobile string, sign string, templateID string, parameters []string) (*Result, error)
SendSMSWithTemplate send single notification SMS with template and sign, which is default for personal account
func (*Client) SendVoicePrompt ¶
SendVoicePrompt send voice message
func (*Client) SendVoiceWithFile ¶
SendVoiceWithFile send voice with file
type MultiResult ¶
type MultiResult struct { Status int `json:"result"` ErrMsg string `json:"errMsg"` LocalMessageID string `json:"ext,omitempty"` CallID string `json:"callid,omitempty"` ReportCount int `json:"count,omitempty"` MTResults []SendResult `json:"detail,omitempty"` Reports []Report `json:"data,omitempty"` FileID string `json:"fid,omitempty"` }
MultiResult result for multiple receivers
type Report ¶
type Report struct { Status string `json:"report_status,omitempty"` DeliverTime string `json:"user_receive_time,omitempty"` CountryCode string `json:"nationcode,omitempty"` Mobile string `json:"mobile,omitempty"` MessageID string `json:"sid,omitempty"` DeliverStatus string `json:"errmsg,omitempty"` Description string `json:"description,omitempty"` PullType int `json:"pull_type,omitempty"` }
Report represents the SMS Report message
type Result ¶
type Result struct { Status int `json:"result"` ErrMsg string `json:"errmsg"` LocalMessageID string `json:"ext"` MessageID string `json:"sid,omitempty"` Fee int `json:"fee,omitempty"` }
Result send result of single SMS
{ "result": 0, "errmsg": "OK", "ext": "6b6a09e7-be31-48cd-8171-0057ccbe550d", "sid": "2018:-9173686749108840660", "fee": 1 }
type SendResult ¶
type SendResult struct { Status int `json:"result"` ErrMsg string `json:"errmsg"` CountryCode string `json:"nationcode,omitempty"` Mobile string `json:"mobile,omitempty"` MessageID string `json:"sid,omitempty"` Fee int `json:"fee,omitempty"` }
SendResult result for single sms sending