Documentation ¶
Index ¶
Constants ¶
View Source
const ( SMSServerURL = "https://sms-api.luosimao.com/v1/" VoiceServerURL = "https://voice-api.luosimao.com/v1/" )
Variables ¶
This section is empty.
Functions ¶
func GetErrorDescription ¶
Types ¶
type Authorization ¶
func (*Authorization) BasicAuthorization ¶
func (p *Authorization) BasicAuthorization() string
type BatchSMSRequest ¶
type ErrorCode ¶
type ErrorCode int32
const ( SMS_ERROR_OK ErrorCode = 0 SMS_ERROR_VALIDATE_ERROR ErrorCode = -10 SMS_ERROR_BALANCE_NOT_ENOUGH ErrorCode = -20 SMS_ERROR_EMPTY_MESSAGE ErrorCode = -30 SMS_ERROR_CONTENT_SENSITIVE_WORD ErrorCode = -31 SMS_ERROR_NO_SIGNATURE ErrorCode = -32 SMS_ERROR_WRONG_MOBILE_NUMBER ErrorCode = -40 SMS_ERROR_IP_NOT_IN_WHITE_LIST ErrorCode = -50 )
type Response ¶
type Response struct { XMLName xml.Name `json:"-" xml:"response"` Error ErrorCode `json:"error" xml:"error"` Message string `json:"message" xml:"msg"` }
func (*Response) ErrorDescription ¶
type SMSRequest ¶
type SMSSender ¶
type SMSSender struct { Proxy string // contains filtered or unexported fields }
func NewSMSSender ¶
func NewSMSSender(auth Authorization, proto ProtocalType) *SMSSender
func (*SMSSender) BatchSend ¶
func (p *SMSSender) BatchSend(req BatchSMSRequest, timeout int64) (response Response, err error)
type Status ¶
type Status struct { XMLName xml.Name `json:"-" xml:"response"` Error ErrorCode `json:"error" xml:"error"` Deposit int64 `json:"deposit,string" xml:"deposit"` }
func (*Status) ErrorDescription ¶
type VoiceRequest ¶
type VoiceSender ¶
type VoiceSender struct { Proxy string // contains filtered or unexported fields }
func NewVoiceSender ¶
func NewVoiceSender(auth Authorization, proto ProtocalType) *VoiceSender
func (*VoiceSender) Send ¶
func (p *VoiceSender) Send(req VoiceRequest, timeout int64) (response Response, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.