Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Sender string `schema:"From"` // TODO: enforce phone number Recipient string `schema:"To"` // TODO: enforce limit Content string `schema:"Body"` }
Message is a phone message
func (*Message) Response ¶
Response returns a response to the message
type ShortMessageService ¶
type ShortMessageService struct {
// contains filtered or unexported fields
}
ShortMessageService is a service for sending and receiving short messages
func New ¶
func New(sid, token string, handler Handler) *ShortMessageService
New returns a new short service message
func (*ShortMessageService) Send ¶
func (sms *ShortMessageService) Send(msg *Message)
Send sends a message
func (*ShortMessageService) ServeHTTP ¶
func (sms *ShortMessageService) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*ShortMessageService) Stop ¶
func (*ShortMessageService) Stop() error
Stop stops the ShortMessageService
Click to show internal directories.
Click to hide internal directories.