events

package
v0.0.0-...-1aaae71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelArchiveType        = "channel_archive"
	ChannelCreatedType        = "channel_created"
	ChannelDeletedType        = "channel_deleted"
	ChannelHistoryChangedType = "channel_history_changed"
	ChannelRenameType         = "channel_rename"
	ChannelUnarchiveType      = "channel_unarchive"
	DndUpdatedType            = "dnd_updated"
	DndUpdatedUserType        = "dnd_updated_user"
	EmailDomainChangedType    = "email_domain_changed"
	EmojiChangedType          = "emoji_changed"
	ErrorType                 = "error"
	FileChangeType            = "file_change"
	FileCommentAddedType      = "file_comment_added"
	FileCommentDeletedType    = "file_comment_deleted"
	FileCommentEditedType     = "file_comment_edited"
	FileCreatedType           = "file_created"
	FileDeletedType           = "file_deleted"
	FilePublicType            = "file_public"
	FileSharedType            = "file_shared"
	FileUnsharedType          = "file_unshared"
	GroupArchiveType          = "group_archive"
	GroupCloseType            = "group_close"
	GroupHistoryChangedType   = "group_history_changed"
	GroupOpenType             = "group_open"
	GroupRenameType           = "group_rename"
	GroupUnarchiveType        = "group_unarchive"
	ImCloseType               = "im_close"
	ImCreatedType             = "im_created"
	ImHistoryChangedType      = "im_history_changed"
	ImOpenType                = "im_open"
	LinkSharedType            = "link_shared"
	MessageChannelsType       = "message.channels"
	MessageGroupsType         = "message.groups"
	MessageImType             = "message.im"
	MessageMpimType           = "message.mpim"
	PinAddedType              = "pin_added"
	PinRemovedType            = "pin_removed"
	PongType                  = "pong"
	ReactionAddedType         = "reaction_added"
	ReactionRemovedType       = "reaction_removed"
	StarAddedType             = "star_added"
	StarRemovedType           = "star_removed"
	SubteamCreatedType        = "subteam_created"
	SubteamSelfAddedType      = "subteam_self_added"
	SubteamSelfRemovedType    = "subteam_self_removed"
	SubteamUpdatedType        = "subteam_updated"
	TeamDomainChangeType      = "team_domain_change"
	TeamJoinType              = "team_join"
	TeamRenameType            = "team_rename"
	URLVerificationType       = "url_verification"
	UserChangeType            = "user_change"
)

These constants match the event types generated by Slack

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	APIAppID    string   `json:"api_app_id"`
	AuthedUsers []string `json:"authed_users"`
	Event       Event    `json:"event"`
	EventID     string   `json:"event_id"`
	EventTime   int      `json:"event_time"`
	TeamID      string   `json:"team_id"`
	Token       string   `json:"token"`
	Type        string   `json:"type"`
}

Evenlope is the "outer event" as described in https://api.slack.com/events-api#callback_field_overview

type Event

type Event struct {
	EventTimestamp string
	Item           interface{}
	Timestamp      string
	Type           string
	User           string
}

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL