Versions in this module Expand all Collapse all v2 v2.2.2 Oct 18, 2022 Changes in this version type InvalidResponseError + Err error + type SendConnectionError struct + Body []byte + Debug []string + Err error + Message string + func (e SendConnectionError) Error() string v2.2.1 May 5, 2022 Changes in this version + const Binary + const BinaryMessage + const Text + const TextMessage + const Unicode + const UnicodeMessage + const VCal + const VCard + const WAPPush + func IsTrustedIP(ipStr string) bool + func NewDeliveryHandler(out chan *DeliveryReceipt, verifyIPs bool) http.HandlerFunc + func NewMessageHandler(out chan *ReceivedMessage, verifyIPs bool) http.HandlerFunc + type Account struct + func (nexmo *Account) GetBalance() (float64, error) + type Client struct + Account *Account + HTTPClient *http.Client + SMS *SMS + USSD *USSD + Verify *Verification + func NewClient(apiKey, apiSecret string) (*Client, error) + type DeliveryReceipt struct + ClientReference string + ErrorCode string + MSISDN string + MessageID string + NetworkCode string + Price string + SCTS time.Time + Status string + Timestamp time.Time + To string + func ParseDeliveryReceipt(req *http.Request) (*DeliveryReceipt, error) + type InvalidResponseError struct + Body []byte + Message string + func (e InvalidResponseError) Error() string + type MessageClass int + const Flash + const Forward + const SIMData + const Standard + func (m MessageClass) String() string + type MessageReport struct + ClientReference string + ErrorText string + MessageID string + MessagePrice string + Network string + RemainingBalance string + Status ResponseCode + To string + type MessageResponse struct + MessageCount int + Messages []MessageReport + type MessageType int + func (m MessageType) String() string + type ReceivedMessage struct + Concat struct{ ... } + Concatenated bool + Data []byte + ID string + Keyword string + MSISDN string + NetworkCode string + Text string + Timestamp time.Time + To string + Type MessageType + UDH []byte + func ParseReceivedMessage(req *http.Request) (*ReceivedMessage, error) + type ResponseCode int + const ResponseCommunicationFailed + const ResponseFacilityNotAllowed + const ResponseInternalError + const ResponseInvalidCredentials + const ResponseInvalidMessage + const ResponseInvalidMessageClass + const ResponseInvalidParams + const ResponseInvalidSenderAddress + const ResponseInvalidSignature + const ResponseInvalidTTL + const ResponseMessageTooLong + const ResponseMissingParams + const ResponseNumberBarred + const ResponsePartnerAcctBarred + const ResponsePartnerQuotaExceeded + const ResponseRESTNotEnabled + const ResponseSuccess + const ResponseThrottled + const ResponseUnused + func (c ResponseCode) String() string + type SMS struct + func (c *SMS) Send(msg *SMSMessage) (*MessageResponse, error) + type SMSMessage struct + Body []byte + Callback string + Class MessageClass + ClientReference string + From string + NetworkCode string + StatusReportRequired int + TTL int + Text string + Title string + To string + Type string + UDH []byte + URL string + VCal string + VCard string + Validity int + func (m *SMSMessage) MarshalJSON() ([]byte, error) + type USSD struct + func (c *USSD) Send(msg *USSDMessage) (*MessageResponse, error) + type USSDMessage struct + ClientReference string + From string + NetworkCode string + Prompt bool + StatusReportRequired bool + Text string + To string + type Verification struct + func (c *Verification) Check(m *VerifyCheckRequest) (*VerifyCheckResponse, error) + func (c *Verification) Control(m *VerifyControlRequest) (*VerifyControlResponse, error) + func (c *Verification) Search(m *VerifySearchRequest) (*VerifySearchResponse, error) + func (c *Verification) Send(m *VerifyMessageRequest) (*VerifyMessageResponse, error) + type VerifyCheckRequest struct + Code string + IPAddress string + RequestID string + func (m *VerifyCheckRequest) MarshalJSON() ([]byte, error) + type VerifyCheckResponse struct + Currency string + ErrorText string + EventID string + Price string + Status ResponseCode + type VerifyControlRequest struct + Command string + RequestID string + func (m *VerifyControlRequest) MarshalJSON() ([]byte, error) + type VerifyControlResponse struct + Command string + ErrorText string + Status ResponseCode + type VerifyMessageRequest struct + Brand string + CodeLength int + Country string + Language string + NextEventWait int + Number string + PINExpiry int + SenderID string + func (m *VerifyMessageRequest) MarshalJSON() ([]byte, error) + type VerifyMessageResponse struct + ErrorText string + RequestID string + Status ResponseCode + type VerifySearchRequest struct + RequestID string + func (m *VerifySearchRequest) MarshalJSON() ([]byte, error) + type VerifySearchResponse struct + AccountID string + Checks []struct{ ... } + Currency string + DateFinalized string + DateSubmitted string + ErrorText string + FirstEventDate string + LastEventDate string + Number string + Price string + RequestID string + SenderID string + Status string Other modules containing this package github.com/wheniwork/gonexmo