Documentation
¶
Overview ¶
Package slack is a Connection to the Slack Real Time Messaging API (https://api.slack.com/rtm). To use this connection, you will need to create a custom bot user. See https://api.slack.com/bot-users#custom_bot_users.
Once you've created a bot user, you will need to initialize the Slack connection using the API key for this bot user.
slackConnection := NewConnection("MySlackBotAPIKey")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
Connection provides an interface for storing the Slack API key and the inbox for storing received messages
func NewConnection ¶
func NewConnection(slackAPIKey string) *Connection
NewConnection returns a new Connection to Slack
func (*Connection) Start ¶
func (s *Connection) Start(errorChannel chan error) (rx, tx message.BasicChannel)
Start creates the connection for the Slack RTM and creates the transmit and receive goroutines that listen and send messages through the tx and rx channels