Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMsgHandler ¶
ChatMsgHandler handles incoming messages from users; each message should invoke ChatMsgHandler in a separate goroutine.
type Listener ¶
type Listener interface {
Listen(ChatMsgHandler) error
}
Listener keeps listening to incoming messages, do any pre-processing if needed and calls ChatMsgHandler with the messages; it will not return utils error happens.
type SlackChat ¶
type SlackChat struct {
// contains filtered or unexported fields
}
SlackChat implements Chatter interface. It wraps the slack.Client and its RTM websocket for seamless communication.
func NewSlackChat ¶
NewSlackChat uses the token to set the slack client properly, but no connection is made so far.
func (*SlackChat) Listen ¶
func (t *SlackChat) Listen(f ChatMsgHandler) error
Listen keeps receiving the RTM events and dispatches them to the handler function in separate goroutines.
Click to show internal directories.
Click to hide internal directories.