Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = errors.New("Not supported")
Functions ¶
func MessageHandler ¶
func MessageHandler(fn MessageFunc) handlerFunc
Types ¶
type Attachment ¶
type Attachment struct { Fallback string `json:"fallback,omitempty"` ImageWidth int `json:"image_width,omitempty"` ImageHeight int `json:"image_height,omitempty"` ImageBytes int `json:"image_bytes,omitempty"` AuthorName string `json:"author_name,omitempty"` Id int `json:"id,omitempty"` TitleLink string `json:"title_link,omitempty"` FromUrl string `json:"from_url,omitempty"` ImageUrl string `json:"image_url,omitempty"` Text string `json:"text,omitempty"` Title string `json:"title,omitempty"` AuthorLink string `json:"author_link,omitempty"` Type string `json:"type,omitempty"` Subtype string `json:"subtype,omitempty"` Channel string `json:"channel,omitempty"` }
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) NewMessage ¶
func (*Bot) SetHandler ¶
func (*Bot) SetMessageHandler ¶
func (b *Bot) SetMessageHandler(fn MessageFunc)
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) AddCommand ¶
func (*Engine) ListenAndServe ¶
type EventType ¶
type EventType string
const ( EventTypeMessage EventType = "message" EventTypeHello EventType = "hello" EventTypeChannelMarked EventType = "channel_marked" EventTypeChannelCreated EventType = "channel_created" EventTypeChannelJoined EventType = "channel_joined" EventTypeChannelLeft EventType = "channel_left" EventTypeChannelDeleted EventType = "channel_deleted" EventTypeChannelRename EventType = "channel_rename" EventTypeChannelArchive EventType = "channel_archive" EventTypeChannelUnarchive EventType = "channel_unarchive" EventTypeChannelHistoryChanged EventType = "channel_history_changed" EventTypeChannelImCreated EventType = "im_created" EventTypeChannelImOpen EventType = "im_open" EventTypeChannelImClose EventType = "im_close" EventTypeChannelImMarked EventType = "im_marked" EventTypeChannelImHistoryChanged EventType = "im_history_changed" EventTypeChannelGroupJoined EventType = "group_joined" EventTypeChannelGroupLeft EventType = "group_left" EventTypeChannelGroupOpen EventType = "group_open" EventTypeChannelGroupClose EventType = "group_close" EventTypeChannelGroupArchive EventType = "group_archive" EventTypeChannelGroupUnarchive EventType = "group_unarchive" EventTypeChannelGroupRename EventType = "group_rename" EventTypeChannelGroupMarked EventType = "group_marked" EventTypeChannelGroupHistoryChanged EventType = "group_history_changed" EventTypeFileCreated EventType = "file_created" EventTypeFilePublic EventType = "file_public" EventTypeFilePrivate EventType = "file_private" EventTypeFileChange EventType = "file_change" EventTypeFileDeleted EventType = "file_deleted" EventTypeFileCommentAdded EventType = "file_comment_added" EventTypeFileCommentEdited EventType = "file_comment_edited" EventTypeFileCommentDeleted EventType = "file_comment_deleted" EventTypePresenceChange EventType = "presence_change" EventTypeManualPresenceChange EventType = "manual_presence_change" EventTypePrefChange EventType = "pref_change" EventTypeUserChange EventType = "user_change" EventTypeTeamJoin EventType = "team_join" EventTypeStarAdded EventType = "star_added" EventTypeStarRemoved EventType = "star_removed" EventTypeEmojiChanged EventType = "emoji_changed" EventTypeCommandsChanged EventType = "commands_changed" EventTypeTeamPrefChange EventType = "team_pref_change" EventTypeTeamRename EventType = "team_rename" EventTypeTeamDomainChange EventType = "team_domain_change" EventTypeEmailDomainChanged EventType = "email_domain_changed" EventTypeBotAdded EventType = "bot_added" EventTypeBotChanged EventType = "bot_changed" EventTypeAccountsChanged EventType = "accounts_changed" EventTypeTeamMigrationStarted EventType = "team_migration_started" )
type Message ¶
type Message struct { Id int `json:"id,omitempty"` Type string `json:"type,omitempty"` Channel string `json:"channel,omitempty"` User string `json:"user,omitempty"` Username string `json:"username,omitempty"` BotId string `json:"bot_id,omitempty"` Text string `json:"text,omitempty"` Timestamp Timestamp `json:"ts,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
type MessageFunc ¶
type SlackFunc ¶
type SlackFunc func(sc *Context, w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.