Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { // Channel is the Slack channel name with the "#" prefix to post messages Channel string // VerificationToken is the token to verify interaction callbacks VerificationToken string // BotUserOAuthAccessToken can be obtained from https://api.slack.com/apps/<APP ID>/oauth? BotUserOAuthAccessToken string Client *slack.Client HandleSlashCommand func(*Connection, string, slack.SlashCommand) string // contains filtered or unexported fields }
func New ¶
func New(triggerCmd, botUserOAuthAccessToken string, verificationToken string, callback func(*Connection, string, slack.SlashCommand) string) *Connection
func (*Connection) Notify ¶
func (conn *Connection) Notify(n Notification) error
func (*Connection) RegisterInteractionCallbackHandler ¶
func (conn *Connection) RegisterInteractionCallbackHandler(callbackID string, callback InteractionCallbackHandler)
func (*Connection) Run ¶
func (conn *Connection) Run() error
type HTTPHandler ¶
type HTTPHandler interface {
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
type InteractionCallbackHandler ¶
type InteractionCallbackHandler func(slack.InteractionCallback) (interface{}, error)
type InteractionsHandler ¶
type InteractionsHandler func(callback slack.InteractionCallback) (interface{}, error)
type Notification ¶
type Notification struct {
Text string
}
Click to show internal directories.
Click to hide internal directories.