Documentation ¶
Index ¶
- Constants
- Variables
- type ApiParams
- type AvParams
- type Client
- func (client *Client) AdultVerify(ctx context.Context, avParams *AvParams) (*SuccessAvResponse, error)
- func (client *Client) AvSolo(ctx context.Context, avParams *AvParams) (*SuccessAvSoloResponse, error)
- func (client *Client) ChargeSms(ctx context.Context, smsParams *SmsParams) (*SuccessChargeResponse, error)
- func (client *Client) OperatorLookup(ctx context.Context, oplkParams *OperatorLookupParams) (*SuccessOperatorLookupResponse, error)
- func (client *Client) SendBinSms(ctx context.Context, smsParams *SmsBinParams) (*SuccessResponse, error)
- func (client *Client) SendSms(ctx context.Context, smsParams *SmsParams) (*SuccessResponse, error)
- func (client *Client) SendWapPush(ctx context.Context, smsParams *SmsWapParams) (*SuccessWapResponse, error)
- func (c *Client) SetBaseURL(baseURL string) *Client
- func (c *Client) SetHttpClient(httpClient *http.Client) *Client
- type OperatorLookupParams
- type SmsBinParams
- type SmsParams
- type SmsWapParams
- type SuccessAvResponse
- type SuccessAvResponseWrapper
- type SuccessAvSoloResponse
- type SuccessAvSoloResponseWrapper
- type SuccessChargeResponse
- type SuccessChargeResponseWrapper
- type SuccessOperatorLookupResponse
- type SuccessOperatorLookupResponseWrapper
- type SuccessResponse
- type SuccessResponseWrapper
- type SuccessWapResponse
- type SuccessWapResponseWrapper
Constants ¶
View Source
const ( AV_VERIFIED = "verified" AV_NOT_VERIFIED = "no_verified" AV_UNKNOWN = "unknown" AV_PENDING = "pending" )
View Source
const ( DEFAULT_URL = "https://sonar.fonix.io" DEFAULT_URL_AVSOLO = "https://avsolo.fonix.io" V2_SENDSMS = "v2/sendsms" V2_SENDSMSBIN = "v2/sendbinsms" V2_CHARGESMS = "v2/chargesms" V2_SENDWAPPUSH = "v2/sendwappush" V2_ADULTVERIFY = "v2/adultverify" V2_OPERATORLOOKUP = "v2/operator_lookup" V2_AVSOLO = "v2/avsolo" )
Variables ¶
View Source
var ( //default timeout for requests is 15 seconds, can be changed by using custom http client // or you can change it via this VAr before creation of client. CLIENT_TIMEOUT = 15 * time.Second )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AdultVerify ¶
func (*Client) OperatorLookup ¶
func (client *Client) OperatorLookup(ctx context.Context, oplkParams *OperatorLookupParams) (*SuccessOperatorLookupResponse, error)
func (*Client) SendBinSms ¶
func (client *Client) SendBinSms(ctx context.Context, smsParams *SmsBinParams) (*SuccessResponse, error)
func (*Client) SendWapPush ¶
func (client *Client) SendWapPush(ctx context.Context, smsParams *SmsWapParams) (*SuccessWapResponse, error)
type OperatorLookupParams ¶
func (*OperatorLookupParams) ToParams ¶
func (oplkParams *OperatorLookupParams) ToParams() string
type SmsBinParams ¶
func (*SmsBinParams) ToParams ¶
func (smsParams *SmsBinParams) ToParams() string
type SmsWapParams ¶
type SmsWapParams struct { Originator string Numbers string PushTitle string PushLink string Dummy string }
func (*SmsWapParams) ToParams ¶
func (smsParams *SmsWapParams) ToParams() string
type SuccessAvResponse ¶
type SuccessAvResponseWrapper ¶
type SuccessAvResponseWrapper struct {
SuccessData SuccessAvResponse `json:"success"`
}
type SuccessAvSoloResponse ¶
type SuccessAvSoloResponseWrapper ¶
type SuccessAvSoloResponseWrapper struct { VerifiedData *SuccessAvSoloResponse `json:"verified"` NotVerifiedData *SuccessAvSoloResponse `json:"not_verified"` UnknownData *SuccessAvSoloResponse `json:"unknown"` PendingData *SuccessAvSoloResponse `json:"pending"` }
type SuccessChargeResponse ¶
type SuccessChargeResponseWrapper ¶
type SuccessChargeResponseWrapper struct {
SuccessData SuccessChargeResponse `json:"success"`
}
type SuccessOperatorLookupResponseWrapper ¶
type SuccessOperatorLookupResponseWrapper struct {
SuccessData SuccessOperatorLookupResponse `json:"success"`
}
type SuccessResponse ¶
type SuccessResponseWrapper ¶
type SuccessResponseWrapper struct {
SuccessData SuccessResponse `json:"success"`
}
type SuccessWapResponse ¶
type SuccessWapResponseWrapper ¶
type SuccessWapResponseWrapper struct {
SuccessData SuccessWapResponse `json:"success"`
}
Click to show internal directories.
Click to hide internal directories.