Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoHTTP ¶
func DoHTTP(client http.Client, method, contentType, address string, fields url.Values, body []byte, onResponse Response) (resp *http.Response, err error)
DoHTTP sends an HTTP Request for sending an SMS
func OnGettingSMS ¶
func OnGettingSMS(path string, mux *http.ServeMux, httpHandler http.HandlerFunc)
OnGettingSMS is an HTTP server handler when incoming SMS arrives. If mux exists, it will use it for a server, otherwise it will use http.HandleFunc.
Types ¶
type HTTPHandler ¶
HTTPHandler holds interface for HTTP client usage that implemented by each provider
type Response ¶
type Response interface {
FromXMLResponse(status []byte) (XMLResponse, error)
ToError() error
IsOK() bool
}
Response holds interface for
type XMLHandler ¶
type XMLHandler interface {
SendSMS(h HTTPHandler) (*http.Response, error)
}
XMLHandler is an interface to send and post SMS messages
type XMLResponse ¶
type XMLResponse struct{}
XMLResponse holds interface for XMLResponse that are implemented on each provider
Click to show internal directories.
Click to hide internal directories.