Documentation ¶
Index ¶
Constants ¶
View Source
const NullStr = rune(0)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandArgs ¶
type CommandDef ¶
type CommandDef struct { Handler CommandHandler NoResponse bool }
type CommandHandler ¶
type CommandHandler func(args CommandArgs) (*CommandResponse, error)
type CommandResponse ¶
type CommandResponse struct { Attachments []slack.Attachment `json:"attachments"` Markdown bool `json:"markdown"` }
func SimpleTextResponse ¶
func SimpleTextResponse(text string) CommandResponse
type SlackMux ¶
type SlackMux struct { Token string SkipSlackResponse bool IgnoreSlackFormatting bool QuoteAwareArgParse bool // contains filtered or unexported fields }
func (*SlackMux) ClearCommandHandlers ¶
func (mux *SlackMux) ClearCommandHandlers()
func (*SlackMux) RegisterCommandHandler ¶
func (mux *SlackMux) RegisterCommandHandler(command string, cmdDef CommandDef)
func (*SlackMux) RegisterDefaultHandler ¶
func (mux *SlackMux) RegisterDefaultHandler(cmdDef CommandDef)
func (*SlackMux) SlackHandler ¶
func (mux *SlackMux) SlackHandler() func(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.