Documentation ¶
Overview ¶
Package message handles message definitions and message senders.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemorySender ¶
type MemorySender struct {
Messages []Outbound
}
MemorySender just stores messages in an internal list.
func (*MemorySender) Send ¶
func (m *MemorySender) Send(message Outbound) error
Send the Outbound message to the internal memory store.
func (*MemorySender) SendString ¶
func (m *MemorySender) SendString(channel, message string) error
SendString wraps the message in an Outbound message type and calls Send.
type Outbound ¶
type Outbound struct { Channel string Message string Embed struct { URL string Title string Description string Colour string Image string Video string Fields []struct { Name string Value string } } }
Outbound sent to the chat platform.
type Sender ¶
type Sender interface { // Send the Outbound message. If the message fails to send return an // error. Send(message Outbound) error // SendString sends the message as a basic text message to the given // channel. If the message fails to send return an error. SendString(channel, message string) error }
A Sender is able to send a message to a chat platform.
Click to show internal directories.
Click to hide internal directories.