Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment interface { GetMimeType() string GetReader() (io.ReadCloser, error) }
Attachment is a central interface to get attachments from a message
type AttachmentProvider ¶
AttachmentProvider is a provider type that shows that you can send attachments from it, it is not required but recommended.
type Message ¶
type Message interface { Source() string Message() string Attachments() []Attachment Time() time.Time Read() bool }
Message is a central interface messages from providers should implement it provides everything required from a message
type Provider ¶
type Provider interface { SendMessage(string, string) error DeleteMessage(Message) error GetPhoneNumber() (string, error) Setup() error Shutdown() error }
All Providers must implement this interface, it has the required functions for a provider to be useful
type SMSAttachment ¶
type SMSAttachment struct {
URL string
}
SMSAttachment is an struct for sms attachments, standard sms sends an url for an attachment. This is here as an convenience struct for new sms providers.
func (SMSAttachment) GetMimeType ¶
func (a SMSAttachment) GetMimeType() string
func (SMSAttachment) GetReader ¶
func (a SMSAttachment) GetReader() (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.