Documentation
¶
Overview ¶
Package slack provides a Slack bot interface for Chronos agents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot is a Slack bot that receives messages and routes them to an agent.
func New ¶
func New(token, signingKey string, handler MessageHandler) *Bot
New creates a new Slack bot. token is the Slack Bot OAuth token. signingKey is the Slack signing secret for request verification. handler is called for each incoming message.
func (*Bot) PostMessage ¶
PostMessage sends a message to a Slack channel.
func (*Bot) ServeHTTP ¶
func (b *Bot) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles incoming Slack Events API requests.
Click to show internal directories.
Click to hide internal directories.