Documentation
¶
Index ¶
- Constants
- Variables
- type Actor
- type AppDeletedEvent
- type AppHomeOpenedEvent
- type AppInstalledEvent
- type AppMentionEvent
- type AppRequestedEvent
- type AppUninstalledEvent
- type AppUninstalledTeamEvent
- type AssistantThread
- type AssistantThreadContext
- type AssistantThreadContextChangedEvent
- type AssistantThreadStartedEvent
- type CallRejectedEvent
- type ChallengeResponse
- type ChannelArchiveEvent
- type ChannelCreatedEvent
- type ChannelCreatedInfo
- type ChannelDeletedEvent
- type ChannelHistoryChangedEvent
- type ChannelIDChangedEvent
- type ChannelLeftEvent
- type ChannelRenameEvent
- type ChannelRenameInfo
- type ChannelSharedEvent
- type ChannelUnarchiveEvent
- type CommandsChangedEvent
- type Comment
- type Config
- type DndUpdatedEvent
- type DndUpdatedUserEvent
- type Edited
- type EmailDomainChangedEvent
- type EmojiChangedEvent
- type EventWorkflowStep
- type EventsAPIAppRateLimited
- type EventsAPICallbackEvent
- type EventsAPIEvent
- type EventsAPIInnerEvent
- type EventsAPIType
- type EventsAPIURLVerificationEvent
- type File
- type FileChangeEvent
- type FileCreatedEvent
- type FileDeletedEvent
- type FileEventFile
- type FilePublicEvent
- type FileSharedEvent
- type FileUnsharedEvent
- type FunctionExecutedEvent
- type GridMigrationFinishedEvent
- type GridMigrationStartedEvent
- type GroupArchiveEvent
- type GroupCloseEvent
- type GroupDeletedEvent
- type GroupHistoryChangedEvent
- type GroupLeftEvent
- type GroupOpenEvent
- type GroupRenameEvent
- type GroupRenameInfo
- type GroupUnarchiveEvent
- type Icon
- type ImCloseEvent
- type ImCreatedEvent
- type ImHistoryChangedEvent
- type ImOpenEvent
- type InviteRequestedEvent
- type Item
- type ItemMessage
- type JSONTime
- type LinkSharedEvent
- type MemberJoinedChannelEvent
- type MemberLeftChannelEvent
- type MessageAction
- type MessageActionEntity
- type MessageActionResponse
- type MessageEvent
- type MessageMetadataDeletedEvent
- type MessageMetadataPostedEvent
- type MessageMetadataUpdatedEvent
- type Option
- type PinAddedEvent
- type PinRemovedEvent
- type Profile
- type ReactionAddedEvent
- type ReactionRemovedEvent
- type SharedChannel
- type SharedChannelInviteAcceptedEvent
- type SharedChannelInviteApprovedEvent
- type SharedChannelInviteDeclinedEvent
- type SharedChannelInviteReceivedEvent
- type SharedChannelInviteRequestedEvent
- type SharedInvite
- type SharedLinks
- type SlackEventIcon
- type SlackEventTeam
- type SlackEventUser
- type StarAddedEvent
- type StarRemovedEvent
- type SubTeam
- type SubteamCreatedEvent
- type SubteamMembersChangedEvent
- type SubteamSelfAddedEvent
- type SubteamSelfRemovedEvent
- type SubteamUpdatedEvent
- type TargetUser
- type Team
- type TeamAccessGrantedEvent
- type TeamAccessRevokedEvent
- type TeamDomainChangeEvent
- type TeamIcon
- type TeamJoinEvent
- type TeamRenameEvent
- type TokenComparator
- type TokensRevokedEvent
- type User
- type UserChangeEvent
- type UserHuddleChangedEvent
- type UserProfileChangedEvent
- type UserStatusChangedEvent
- type WorkflowStepExecuteEvent
Constants ¶
const ( // AppMention is an Events API subscribable event AppMention = EventsAPIType("app_mention") // AppHomeOpened Your Slack app home was opened AppHomeOpened = EventsAPIType("app_home_opened") // AppUninstalled Your Slack app was uninstalled. AppUninstalled = EventsAPIType("app_uninstalled") // AssistantThreadStarted Your Slack AI Assistant has started a new thread AssistantThreadStarted = EventsAPIType("assistant_thread_started") // AssistantThreadContextChanged Your Slack AI Assistant has changed the context of a thread AssistantThreadContextChanged = EventsAPIType("assistant_thread_context_changed") // ChannelCreated is sent when a new channel is created. ChannelCreated = EventsAPIType("channel_created") // ChannelDeleted is sent when a channel is deleted. ChannelDeleted = EventsAPIType("channel_deleted") // ChannelArchive is sent when a channel is archived. ChannelArchive = EventsAPIType("channel_archive") // ChannelUnarchive is sent when a channel is unarchived. ChannelUnarchive = EventsAPIType("channel_unarchive") // ChannelLeft is sent when a channel is left. ChannelLeft = EventsAPIType("channel_left") // ChannelRename is sent when a channel is rename. ChannelRename = EventsAPIType("channel_rename") // ChannelIDChanged is sent when a channel identifier is changed. ChannelIDChanged = EventsAPIType("channel_id_changed") // GroupDeleted is sent when a group is deleted. GroupDeleted = EventsAPIType("group_deleted") // GroupArchive is sent when a group is archived. GroupArchive = EventsAPIType("group_archive") // GroupUnarchive is sent when a group is unarchived. GroupUnarchive = EventsAPIType("group_unarchive") // GroupLeft is sent when a group is left. GroupLeft = EventsAPIType("group_left") // GroupRename is sent when a group is renamed. GroupRename = EventsAPIType("group_rename") // FileChange is sent when a file is changed. FileChange = EventsAPIType("file_change") // FileDeleted is sent when a file is deleted. FileDeleted = EventsAPIType("file_deleted") FileShared = EventsAPIType("file_shared") FileUnshared = EventsAPIType("file_unshared") // GridMigrationFinished An enterprise grid migration has finished on this workspace. GridMigrationFinished = EventsAPIType("grid_migration_finished") // GridMigrationStarted An enterprise grid migration has started on this workspace. GridMigrationStarted = EventsAPIType("grid_migration_started") LinkShared = EventsAPIType("link_shared") // Message A message was posted to a channel, private channel (group), im, or mim Message = EventsAPIType("message") // MemberJoinedChannel is sent if a member joined a channel. MemberJoinedChannel = EventsAPIType("member_joined_channel") // MemberLeftChannel is sent if a member left a channel. MemberLeftChannel = EventsAPIType("member_left_channel") // PinAdded An item was pinned to a channel PinAdded = EventsAPIType("pin_added") // PinRemoved An item was unpinned from a channel PinRemoved = EventsAPIType("pin_removed") // ReactionAdded An reaction was added to a message ReactionAdded = EventsAPIType("reaction_added") // ReactionRemoved An reaction was removed from a message ReactionRemoved = EventsAPIType("reaction_removed") // TeamJoin A new user joined the workspace TeamJoin = EventsAPIType("team_join") SharedChannelInviteReceived = EventsAPIType("shared_channel_invite_received") SharedChannelInviteApproved = EventsAPIType("shared_channel_invite_approved") SharedChannelInviteDeclined = EventsAPIType("shared_channel_invite_declined") SharedChannelInviteAccepted = EventsAPIType("shared_channel_invite_accepted") // TokensRevoked APP's API tokes are revoked TokensRevoked = EventsAPIType("tokens_revoked") // EmojiChanged A custom emoji has been added or changed EmojiChanged = EventsAPIType("emoji_changed") // WorkflowStepExecute Happens, if a workflow step of your app is invoked WorkflowStepExecute = EventsAPIType("workflow_step_execute") // MessageMetadataPosted A message with metadata was posted MessageMetadataPosted = EventsAPIType("message_metadata_posted") // MessageMetadataUpdated A message with metadata was updated MessageMetadataUpdated = EventsAPIType("message_metadata_updated") // MessageMetadataDeleted A message with metadata was deleted MessageMetadataDeleted = EventsAPIType("message_metadata_deleted") // TeamAccessGranted is sent if access to teams was granted for your org-wide app. TeamAccessGranted = EventsAPIType("team_access_granted") // TeamAccessRevoked is sent if access to teams was revoked for your org-wide app. TeamAccessRevoked = EventsAPIType("team_access_revoked") // UserProfileChanged is sent if a user's profile information has changed. UserProfileChanged = EventsAPIType("user_profile_changed") // ChannelHistoryChanged The history of a channel changed ChannelHistoryChanged = EventsAPIType("channel_history_changed") // CommandsChanged A command was changed CommandsChanged = EventsAPIType("commands_changed") // DndUpdated Do Not Disturb settings were updated DndUpdated = EventsAPIType("dnd_updated") // DndUpdatedUser Do Not Disturb settings for a user were updated DndUpdatedUser = EventsAPIType("dnd_updated_user") // EmailDomainChanged The email domain changed EmailDomainChanged = EventsAPIType("email_domain_changed") // GroupClose A group was closed GroupClose = EventsAPIType("group_close") // GroupHistoryChanged The history of a group changed GroupHistoryChanged = EventsAPIType("group_history_changed") // GroupOpen A group was opened GroupOpen = EventsAPIType("group_open") // ImClose An instant message channel was closed ImClose = EventsAPIType("im_close") // ImCreated An instant message channel was created ImCreated = EventsAPIType("im_created") // ImHistoryChanged The history of an instant message channel changed ImHistoryChanged = EventsAPIType("im_history_changed") // ImOpen An instant message channel was opened ImOpen = EventsAPIType("im_open") // SubteamCreated A subteam was created SubteamCreated = EventsAPIType("subteam_created") // SubteamMembersChanged The members of a subteam changed SubteamMembersChanged = EventsAPIType("subteam_members_changed") // SubteamSelfAdded The current user was added to a subteam SubteamSelfAdded = EventsAPIType("subteam_self_added") // SubteamSelfRemoved The current user was removed from a subteam SubteamSelfRemoved = EventsAPIType("subteam_self_removed") // SubteamUpdated A subteam was updated SubteamUpdated = EventsAPIType("subteam_updated") // TeamDomainChange The team's domain changed TeamDomainChange = EventsAPIType("team_domain_change") // TeamRename The team was renamed TeamRename = EventsAPIType("team_rename") // UserChange A user object has changed UserChange = EventsAPIType("user_change") // AppDeleted is an event when an app is deleted from a workspace AppDeleted = EventsAPIType("app_deleted") // AppInstalled is an event when an app is installed to a workspace AppInstalled = EventsAPIType("app_installed") // AppRequested is an event when a user requests to install an app to a workspace AppRequested = EventsAPIType("app_requested") // AppUninstalledTeam is an event when an app is uninstalled from a team AppUninstalledTeam = EventsAPIType("app_uninstalled_team") // CallRejected is an event when a Slack call is rejected CallRejected = EventsAPIType("call_rejected") ChannelShared = EventsAPIType("channel_shared") // FileCreated is an event when a file is created in a workspace FileCreated = EventsAPIType("file_created") // FilePublic is an event when a file is made public in a workspace FilePublic = EventsAPIType("file_public") // FunctionExecuted is an event when a Slack function is executed FunctionExecuted = EventsAPIType("function_executed") // InviteRequested is an event when a user requests an invite to a workspace InviteRequested = EventsAPIType("invite_requested") SharedChannelInviteRequested = EventsAPIType("shared_channel_invite_requested") // StarAdded is an event when a star is added to a message or file StarAdded = EventsAPIType("star_added") // StarRemoved is an event when a star is removed from a message or file StarRemoved = EventsAPIType("star_removed") // UserHuddleChanged is an event when a user's huddle status changes UserHuddleChanged = EventsAPIType("user_huddle_changed") // UserStatusChanged is an event when a user's status changes UserStatusChanged = EventsAPIType("user_status_changed") )
const ( // CallbackEvent is the "outer" event of an EventsAPI event. CallbackEvent = "event_callback" // URLVerification is an event used when configuring your EventsAPI app URLVerification = "url_verification" // AppRateLimited indicates your app's event subscriptions are being rate limited AppRateLimited = "app_rate_limited" )
Variables ¶
var EventsAPIEventMap = map[string]interface{}{ CallbackEvent: EventsAPICallbackEvent{}, URLVerification: EventsAPIURLVerificationEvent{}, AppRateLimited: EventsAPIAppRateLimited{}, }
EventsAPIEventMap maps OUTER Event API events to their corresponding struct implementations. The structs should be instances of the unmarshalling target for the matching event type.
var EventsAPIInnerEventMapping = map[EventsAPIType]interface{}{ AppMention: AppMentionEvent{}, AppHomeOpened: AppHomeOpenedEvent{}, AppUninstalled: AppUninstalledEvent{}, AssistantThreadStarted: AssistantThreadStartedEvent{}, AssistantThreadContextChanged: AssistantThreadContextChangedEvent{}, ChannelCreated: ChannelCreatedEvent{}, ChannelDeleted: ChannelDeletedEvent{}, ChannelArchive: ChannelArchiveEvent{}, ChannelUnarchive: ChannelUnarchiveEvent{}, ChannelLeft: ChannelLeftEvent{}, ChannelRename: ChannelRenameEvent{}, ChannelIDChanged: ChannelIDChangedEvent{}, FileChange: FileChangeEvent{}, FileDeleted: FileDeletedEvent{}, FileShared: FileSharedEvent{}, FileUnshared: FileUnsharedEvent{}, GroupDeleted: GroupDeletedEvent{}, GroupArchive: GroupArchiveEvent{}, GroupUnarchive: GroupUnarchiveEvent{}, GroupLeft: GroupLeftEvent{}, GroupRename: GroupRenameEvent{}, GridMigrationFinished: GridMigrationFinishedEvent{}, GridMigrationStarted: GridMigrationStartedEvent{}, LinkShared: LinkSharedEvent{}, Message: MessageEvent{}, MemberJoinedChannel: MemberJoinedChannelEvent{}, MemberLeftChannel: MemberLeftChannelEvent{}, PinAdded: PinAddedEvent{}, PinRemoved: PinRemovedEvent{}, ReactionAdded: ReactionAddedEvent{}, ReactionRemoved: ReactionRemovedEvent{}, SharedChannelInviteApproved: SharedChannelInviteApprovedEvent{}, SharedChannelInviteAccepted: SharedChannelInviteAcceptedEvent{}, SharedChannelInviteDeclined: SharedChannelInviteDeclinedEvent{}, SharedChannelInviteReceived: SharedChannelInviteReceivedEvent{}, TeamJoin: TeamJoinEvent{}, TokensRevoked: TokensRevokedEvent{}, EmojiChanged: EmojiChangedEvent{}, WorkflowStepExecute: WorkflowStepExecuteEvent{}, MessageMetadataPosted: MessageMetadataPostedEvent{}, MessageMetadataUpdated: MessageMetadataUpdatedEvent{}, MessageMetadataDeleted: MessageMetadataDeletedEvent{}, TeamAccessGranted: TeamAccessGrantedEvent{}, TeamAccessRevoked: TeamAccessRevokedEvent{}, UserProfileChanged: UserProfileChangedEvent{}, ChannelHistoryChanged: ChannelHistoryChangedEvent{}, DndUpdated: DndUpdatedEvent{}, DndUpdatedUser: DndUpdatedUserEvent{}, EmailDomainChanged: EmailDomainChangedEvent{}, GroupClose: GroupCloseEvent{}, GroupHistoryChanged: GroupHistoryChangedEvent{}, GroupOpen: GroupOpenEvent{}, ImClose: ImCloseEvent{}, ImCreated: ImCreatedEvent{}, ImHistoryChanged: ImHistoryChangedEvent{}, ImOpen: ImOpenEvent{}, SubteamCreated: SubteamCreatedEvent{}, SubteamMembersChanged: SubteamMembersChangedEvent{}, SubteamSelfAdded: SubteamSelfAddedEvent{}, SubteamSelfRemoved: SubteamSelfRemovedEvent{}, SubteamUpdated: SubteamUpdatedEvent{}, TeamDomainChange: TeamDomainChangeEvent{}, TeamRename: TeamRenameEvent{}, UserChange: UserChangeEvent{}, AppDeleted: AppDeletedEvent{}, AppInstalled: AppInstalledEvent{}, AppRequested: AppRequestedEvent{}, AppUninstalledTeam: AppUninstalledTeamEvent{}, CallRejected: CallRejectedEvent{}, ChannelShared: ChannelSharedEvent{}, FileCreated: FileCreatedEvent{}, FilePublic: FilePublicEvent{}, FunctionExecuted: FunctionExecutedEvent{}, InviteRequested: InviteRequestedEvent{}, SharedChannelInviteRequested: SharedChannelInviteRequestedEvent{}, StarAdded: StarAddedEvent{}, StarRemoved: StarRemovedEvent{}, UserHuddleChanged: UserHuddleChangedEvent{}, UserStatusChanged: UserStatusChangedEvent{}, }
EventsAPIInnerEventMapping maps INNER Event API events to their corresponding struct implementations. The structs should be instances of the unmarshalling target for the matching event type.
Functions ¶
This section is empty.
Types ¶
type AppDeletedEvent ¶ added in v0.14.0
type AppHomeOpenedEvent ¶ added in v0.6.1
type AppHomeOpenedEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` EventTimeStamp string `json:"event_ts"` Tab string `json:"tab"` View slack.View `json:"view"` }
AppHomeOpenedEvent Your Slack app home was opened.
type AppInstalledEvent ¶ added in v0.14.0
type AppMentionEvent ¶
type AppMentionEvent struct { Type string `json:"type"` User string `json:"user"` Text string `json:"text"` TimeStamp string `json:"ts"` ThreadTimeStamp string `json:"thread_ts"` Channel string `json:"channel"` EventTimeStamp string `json:"event_ts"` // When Message comes from a channel that is shared between workspaces UserTeam string `json:"user_team,omitempty"` SourceTeam string `json:"source_team,omitempty"` // BotID is filled out when a bot triggers the app_mention event BotID string `json:"bot_id,omitempty"` // When the app is mentioned in the edited message Edited *Edited `json:"edited,omitempty"` }
AppMentionEvent is an (inner) EventsAPI subscribable event.
type AppRequestedEvent ¶ added in v0.14.0
type AppRequestedEvent struct { Type string `json:"type"` AppRequest struct { ID string `json:"id"` App struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` HelpURL string `json:"help_url"` PrivacyPolicyURL string `json:"privacy_policy_url"` AppHomepageURL string `json:"app_homepage_url"` AppDirectoryURL string `json:"app_directory_url"` IsAppDirectoryApproved bool `json:"is_app_directory_approved"` IsInternal bool `json:"is_internal"` AdditionalInfo string `json:"additional_info"` } `json:"app"` PreviousResolution struct { Status string `json:"status"` Scopes []struct { Name string `json:"name"` Description string `json:"description"` IsSensitive bool `json:"is_sensitive"` TokenType string `json:"token_type"` } `json:"scopes"` } `json:"previous_resolution"` User struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` } `json:"user"` Team struct { ID string `json:"id"` Name string `json:"name"` Domain string `json:"domain"` } `json:"team"` Enterprise interface{} `json:"enterprise"` Scopes []struct { Name string `json:"name"` Description string `json:"description"` IsSensitive bool `json:"is_sensitive"` TokenType string `json:"token_type"` } `json:"scopes"` Message string `json:"message"` } `json:"app_request"` }
type AppUninstalledEvent ¶
type AppUninstalledEvent struct {
Type string `json:"type"`
}
AppUninstalledEvent Your Slack app was uninstalled.
type AppUninstalledTeamEvent ¶ added in v0.14.0
type AppUninstalledTeamEvent struct { Type string `json:"type"` AppID string `json:"app_id"` AppName string `json:"app_name"` AppOwnerID string `json:"app_owner_id"` UserID string `json:"user_id"` TeamID string `json:"team_id"` TeamDomain string `json:"team_domain"` EventTs string `json:"event_ts"` }
type AssistantThread ¶ added in v0.16.0
type AssistantThread struct { UserID string `json:"user_id"` Context AssistantThreadContext `json:"context"` ChannelID string `json:"channel_id"` ThreadTimeStamp string `json:"thread_ts"` }
AssistantThread is an object that represents a thread of messages between a user and an assistant.
type AssistantThreadContext ¶ added in v0.16.0
type AssistantThreadContext struct { ChannelID string `json:"channel_id"` TeamID string `json:"team_id"` EnterpriseID string `json:"enterprise_id"` }
AssistantThreadContext is an object that represents the context of an assistant thread.
type AssistantThreadContextChangedEvent ¶ added in v0.16.0
type AssistantThreadContextChangedEvent struct { Type string `json:"type"` AssistantThread AssistantThread `json:"assistant_thread"` EventTimestamp string `json:"event_ts"` }
AssistantThreadChangedEvent is an (inner) EventsAPI subscribable event.
type AssistantThreadStartedEvent ¶ added in v0.16.0
type AssistantThreadStartedEvent struct { Type string `json:"type"` AssistantThread AssistantThread `json:"assistant_thread"` EventTimestamp string `json:"event_ts"` }
AssistantThreadMessageEvent is an (inner) EventsAPI subscribable event.
type CallRejectedEvent ¶ added in v0.14.0
type CallRejectedEvent struct { Token string `json:"token"` TeamID string `json:"team_id"` APIAppID string `json:"api_app_id"` Event struct { Type string `json:"type"` CallID string `json:"call_id"` UserID string `json:"user_id"` ChannelID string `json:"channel_id"` ExternalUniqueID string `json:"external_unique_id"` } `json:"event"` Type string `json:"type"` EventID string `json:"event_id"` AuthedUsers []string `json:"authed_users"` }
type ChallengeResponse ¶
type ChallengeResponse struct {
Challenge string
}
ChallengeResponse is a response to a EventsAPIEvent URLVerification challenge
type ChannelArchiveEvent ¶ added in v0.9.5
type ChannelArchiveEvent struct { Type string `json:"type"` Channel string `json:"channel"` User string `json:"user"` EventTimestamp string `json:"event_ts"` }
ChannelArchiveEvent represents the Channel archive event
type ChannelCreatedEvent ¶ added in v0.8.2
type ChannelCreatedEvent struct { Type string `json:"type"` Channel ChannelCreatedInfo `json:"channel"` EventTimestamp string `json:"event_ts"` }
ChannelCreatedEvent represents the Channel created event
type ChannelCreatedInfo ¶ added in v0.8.2
type ChannelCreatedInfo struct { ID string `json:"id"` IsChannel bool `json:"is_channel"` Name string `json:"name"` Created int `json:"created"` Creator string `json:"creator"` }
ChannelCreatedInfo represents the information associated with the Channel created event
type ChannelDeletedEvent ¶ added in v0.9.5
type ChannelDeletedEvent struct { Type string `json:"type"` Channel string `json:"channel"` EventTimestamp string `json:"event_ts"` }
ChannelDeletedEvent represents the Channel deleted event
type ChannelHistoryChangedEvent ¶ added in v0.14.0
type ChannelIDChangedEvent ¶ added in v0.9.5
type ChannelIDChangedEvent struct { Type string `json:"type"` OldChannelID string `json:"old_channel_id"` NewChannelID string `json:"new_channel_id"` EventTimestamp string `json:"event_ts"` }
ChannelIDChangedEvent represents the Channel identifier changed event
type ChannelLeftEvent ¶ added in v0.9.5
type ChannelLeftEvent struct { Type string `json:"type"` Channel string `json:"channel"` EventTimestamp string `json:"event_ts"` }
ChannelLeftEvent represents the Channel left event
type ChannelRenameEvent ¶ added in v0.9.5
type ChannelRenameEvent struct { Type string `json:"type"` Channel ChannelRenameInfo `json:"channel"` EventTimestamp string `json:"event_ts"` }
ChannelRenameEvent represents the Channel rename event
type ChannelRenameInfo ¶ added in v0.9.5
type ChannelRenameInfo struct { ID string `json:"id"` Name string `json:"name"` Created int `json:"created"` }
ChannelRenameInfo represents the information associated with the Channel rename event
type ChannelSharedEvent ¶ added in v0.14.0
type ChannelSharedEvent struct {}
type ChannelUnarchiveEvent ¶ added in v0.9.5
type ChannelUnarchiveEvent struct { Type string `json:"type"` Channel string `json:"channel"` User string `json:"user"` EventTimestamp string `json:"event_ts"` }
ChannelUnarchiveEvent represents the Channel unarchive event
type CommandsChangedEvent ¶ added in v0.14.0
type Comment ¶ added in v0.5.0
type Comment struct { ID string `json:"id,omitempty"` Created JSONTime `json:"created,omitempty"` Timestamp JSONTime `json:"timestamp,omitempty"` User string `json:"user,omitempty"` Comment string `json:"comment,omitempty"` }
Comment contains all the information relative to a comment
type DndUpdatedEvent ¶ added in v0.14.0
type DndUpdatedEvent struct { Type string `json:"type"` User string `json:"user"` DndStatus struct { DndEnabled bool `json:"dnd_enabled"` NextDndStartTs int64 `json:"next_dnd_start_ts"` NextDndEndTs int64 `json:"next_dnd_end_ts"` SnoozeEnabled bool `json:"snooze_enabled"` SnoozeEndtime int64 `json:"snooze_endtime"` } `json:"dnd_status"` }
type DndUpdatedUserEvent ¶ added in v0.14.0
type EmailDomainChangedEvent ¶ added in v0.14.0
type EmojiChangedEvent ¶ added in v0.8.1
type EmojiChangedEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` EventTimeStamp string `json:"event_ts"` // filled out when custom emoji added Name string `json:"name,omitempty"` // filled out when custom emoji removed Names []string `json:"names,omitempty"` // filled out when custom emoji renamed OldName string `json:"old_name,omitempty"` NewName string `json:"new_name,omitempty"` // filled out when custom emoji added or renamed Value string `json:"value,omitempty"` }
EmojiChangedEvent is the event of custom emoji has been added or changed
type EventWorkflowStep ¶ added in v0.10.3
type EventWorkflowStep struct { WorkflowStepExecuteID string `json:"workflow_step_execute_id"` WorkflowID string `json:"workflow_id"` WorkflowInstanceID string `json:"workflow_instance_id"` StepID string `json:"step_id"` Inputs *slack.WorkflowStepInputs `json:"inputs,omitempty"` Outputs *[]slack.WorkflowStepOutput `json:"outputs,omitempty"` }
type EventsAPIAppRateLimited ¶
type EventsAPIAppRateLimited struct { Type string `json:"type"` Token string `json:"token"` TeamID string `json:"team_id"` MinuteRateLimited int `json:"minute_rate_limited"` APIAppID string `json:"api_app_id"` }
EventsAPIAppRateLimited indicates your app's event subscriptions are being rate limited
type EventsAPICallbackEvent ¶
type EventsAPICallbackEvent struct { Type string `json:"type"` Token string `json:"token"` TeamID string `json:"team_id"` APIAppID string `json:"api_app_id"` EnterpriseID string `json:"enterprise_id"` InnerEvent *json.RawMessage `json:"event"` AuthedUsers []string `json:"authed_users"` AuthedTeams []string `json:"authed_teams"` EventID string `json:"event_id"` EventTime int `json:"event_time"` EventContext string `json:"event_context"` }
EventsAPICallbackEvent is the main (outer) EventsAPI event.
type EventsAPIEvent ¶
type EventsAPIEvent struct { Token string `json:"token"` TeamID string `json:"team_id"` Type string `json:"type"` APIAppID string `json:"api_app_id"` EnterpriseID string `json:"enterprise_id"` Data interface{} InnerEvent EventsAPIInnerEvent }
EventsAPIEvent is the base EventsAPIEvent
func ParseEvent ¶
func ParseEvent(rawEvent json.RawMessage, opts ...Option) (EventsAPIEvent, error)
ParseEvent parses the outer and inner events (if applicable) of an events api event returning a EventsAPIEvent type. If the event is a url_verification event, the inner event is empty.
type EventsAPIInnerEvent ¶
type EventsAPIInnerEvent struct { Type string `json:"type"` Data interface{} }
EventsAPIInnerEvent the inner event of a EventsAPI event_callback Event.
type EventsAPIType ¶ added in v0.11.0
type EventsAPIType string
type EventsAPIURLVerificationEvent ¶
type EventsAPIURLVerificationEvent struct { Token string `json:"token"` Challenge string `json:"challenge"` Type string `json:"type"` }
EventsAPIURLVerificationEvent received when configuring a EventsAPI driven app
type File ¶
type File struct { ID string `json:"id"` Created int `json:"created"` Timestamp int `json:"timestamp"` Name string `json:"name"` Title string `json:"title"` Mimetype string `json:"mimetype"` Filetype string `json:"filetype"` PrettyType string `json:"pretty_type"` User string `json:"user"` Editable bool `json:"editable"` Size int `json:"size"` Mode string `json:"mode"` IsExternal bool `json:"is_external"` ExternalType string `json:"external_type"` IsPublic bool `json:"is_public"` DisplayAsBot bool `json:"display_as_bot"` Username string `json:"username"` URLPrivate string `json:"url_private"` FileAccess string `json:"file_access"` URLPrivateDownload string `json:"url_private_download"` Thumb64 string `json:"thumb_64"` Thumb80 string `json:"thumb_80"` Thumb360 string `json:"thumb_360"` Thumb360W int `json:"thumb_360_w"` Thumb360H int `json:"thumb_360_h"` Thumb480 string `json:"thumb_480"` Thumb480W int `json:"thumb_480_w"` Thumb480H int `json:"thumb_480_h"` Thumb160 string `json:"thumb_160"` Thumb720 string `json:"thumb_720"` Thumb720W int `json:"thumb_720_w"` Thumb720H int `json:"thumb_720_h"` Thumb800 string `json:"thumb_800"` Thumb800W int `json:"thumb_800_w"` Thumb800H int `json:"thumb_800_h"` Thumb960 string `json:"thumb_960"` Thumb960W int `json:"thumb_960_w"` Thumb960H int `json:"thumb_960_h"` Thumb1024 string `json:"thumb_1024"` Thumb1024W int `json:"thumb_1024_w"` Thumb1024H int `json:"thumb_1024_h"` ImageExifRotation int `json:"image_exif_rotation"` OriginalW int `json:"original_w"` OriginalH int `json:"original_h"` Permalink string `json:"permalink"` PermalinkPublic string `json:"permalink_public"` }
File is a file upload
type FileChangeEvent ¶ added in v0.11.4
type FileChangeEvent struct { Type string `json:"type"` FileID string `json:"file_id"` File FileEventFile `json:"file"` }
FileChangeEvent represents the information associated with the File change event.
type FileCreatedEvent ¶ added in v0.14.0
type FileDeletedEvent ¶ added in v0.11.4
type FileDeletedEvent struct { Type string `json:"type"` FileID string `json:"file_id"` EventTimestamp string `json:"event_ts"` }
FileDeletedEvent represents the information associated with the File deleted event.
type FileEventFile ¶ added in v0.11.4
type FileEventFile struct {
ID string `json:"id"`
}
FileEventFile represents information on the specific file being shared in a file-related Slack event.
type FilePublicEvent ¶ added in v0.14.0
type FileSharedEvent ¶ added in v0.11.4
type FileSharedEvent struct {}
FileSharedEvent represents the information associated with the File shared event.
type FileUnsharedEvent ¶ added in v0.11.4
type FileUnsharedEvent struct {}
FileUnsharedEvent represents the information associated with the File unshared event.
type FunctionExecutedEvent ¶ added in v0.14.0
type FunctionExecutedEvent struct { Type string `json:"type"` Function struct { ID string `json:"id"` CallbackID string `json:"callback_id"` Title string `json:"title"` Description string `json:"description"` Type string `json:"type"` InputParameters []struct { Type string `json:"type"` Name string `json:"name"` Description string `json:"description"` Title string `json:"title"` IsRequired bool `json:"is_required"` } `json:"input_parameters"` OutputParameters []struct { Type string `json:"type"` Name string `json:"name"` Description string `json:"description"` Title string `json:"title"` IsRequired bool `json:"is_required"` } `json:"output_parameters"` AppID string `json:"app_id"` DateCreated int64 `json:"date_created"` DateUpdated int64 `json:"date_updated"` DateDeleted int64 `json:"date_deleted"` } `json:"function"` Inputs map[string]string `json:"inputs"` FunctionExecutionID string `json:"function_execution_id"` WorkflowExecutionID string `json:"workflow_execution_id"` EventTs string `json:"event_ts"` BotAccessToken string `json:"bot_access_token"` }
type GridMigrationFinishedEvent ¶
type GridMigrationFinishedEvent struct { Type string `json:"type"` EnterpriseID string `json:"enterprise_id"` }
GridMigrationFinishedEvent An enterprise grid migration has finished on this workspace.
type GridMigrationStartedEvent ¶
type GridMigrationStartedEvent struct { Type string `json:"type"` EnterpriseID string `json:"enterprise_id"` }
GridMigrationStartedEvent An enterprise grid migration has started on this workspace.
type GroupArchiveEvent ¶ added in v0.9.5
type GroupArchiveEvent struct { Type string `json:"type"` Channel string `json:"channel"` EventTimestamp string `json:"event_ts"` }
GroupArchiveEvent represents the Group archive event
type GroupCloseEvent ¶ added in v0.14.0
type GroupDeletedEvent ¶ added in v0.9.5
type GroupDeletedEvent struct { Type string `json:"type"` Channel string `json:"channel"` EventTimestamp string `json:"event_ts"` }
GroupDeletedEvent represents the Group deleted event
type GroupHistoryChangedEvent ¶ added in v0.14.0
type GroupLeftEvent ¶ added in v0.9.5
type GroupLeftEvent struct { Type string `json:"type"` Channel string `json:"channel"` EventTimestamp string `json:"event_ts"` }
GroupLeftEvent represents the Group left event
type GroupOpenEvent ¶ added in v0.14.0
type GroupRenameEvent ¶ added in v0.9.5
type GroupRenameEvent struct { Type string `json:"type"` Channel GroupRenameInfo `json:"channel"` EventTimestamp string `json:"event_ts"` }
GroupRenameEvent represents the Group rename event
type GroupRenameInfo ¶ added in v0.9.5
type GroupRenameInfo struct { ID string `json:"id"` Name string `json:"name"` Created int `json:"created"` }
GroupRenameInfo represents the information associated with the Group rename event
type GroupUnarchiveEvent ¶ added in v0.9.5
type GroupUnarchiveEvent struct { Type string `json:"type"` Channel string `json:"channel"` EventTimestamp string `json:"event_ts"` }
GroupUnarchiveEvent represents the Group unarchive event
type Icon ¶
type Icon struct { IconURL string `json:"icon_url,omitempty"` IconEmoji string `json:"icon_emoji,omitempty"` }
Icon is used for bot messages
type ImCloseEvent ¶ added in v0.14.0
type ImCreatedEvent ¶ added in v0.14.0
type ImHistoryChangedEvent ¶ added in v0.14.0
type ImOpenEvent ¶ added in v0.14.0
type InviteRequestedEvent ¶ added in v0.14.0
type InviteRequestedEvent struct { Type string `json:"type"` InviteRequest struct { ID string `json:"id"` Email string `json:"email"` DateCreated int64 `json:"date_created"` RequesterIDs []string `json:"requester_ids"` ChannelIDs []string `json:"channel_ids"` InviteType string `json:"invite_type"` RealName string `json:"real_name"` DateExpire int64 `json:"date_expire"` RequestReason string `json:"request_reason"` Team struct { ID string `json:"id"` Name string `json:"name"` Domain string `json:"domain"` } `json:"team"` } `json:"invite_request"` }
type Item ¶ added in v0.5.0
type Item struct { Type string `json:"type"` Channel string `json:"channel,omitempty"` Message *ItemMessage `json:"message,omitempty"` File *File `json:"file,omitempty"` Comment *Comment `json:"comment,omitempty"` Timestamp string `json:"ts,omitempty"` }
Item is any type of slack message - message, file, or file comment.
type ItemMessage ¶ added in v0.5.0
type ItemMessage struct { Type string `json:"type"` User string `json:"user"` Text string `json:"text"` Timestamp string `json:"ts"` PinnedTo []string `json:"pinned_to"` ReplaceOriginal bool `json:"replace_original"` DeleteOriginal bool `json:"delete_original"` }
ItemMessage is the event message
type JSONTime ¶ added in v0.5.0
type JSONTime int64
JSONTime exists so that we can have a String method converting the date
type LinkSharedEvent ¶
type LinkSharedEvent struct { // MessageTimeStamp can be both a numeric timestamp if the LinkSharedEvent corresponds to a sent // message and (contrary to the field name) a uuid if the LinkSharedEvent is generated in the // compose text area. }
LinkSharedEvent A message was posted containing one or more links relevant to your application
type MemberJoinedChannelEvent ¶ added in v0.5.0
type MemberJoinedChannelEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` ChannelType string `json:"channel_type"` Team string `json:"team"` Inviter string `json:"inviter"` EventTimestamp string `json:"event_ts"` }
MemberJoinedChannelEvent A member joined a public or private channel
type MemberLeftChannelEvent ¶ added in v0.6.5
type MemberLeftChannelEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` ChannelType string `json:"channel_type"` Team string `json:"team"` EventTimestamp string `json:"event_ts"` }
MemberLeftChannelEvent A member left a public or private channel
type MessageAction ¶
type MessageAction struct { Type string `json:"type"` Actions []slack.AttachmentAction `json:"actions"` CallbackID string `json:"callback_id"` Team MessageActionEntity `json:"team"` Channel MessageActionEntity `json:"channel"` User MessageActionEntity `json:"user"` ActionTimestamp json.Number `json:"action_ts"` MessageTimestamp json.Number `json:"message_ts"` AttachmentID json.Number `json:"attachment_id"` Token string `json:"token"` Message slack.Message `json:"message"` OriginalMessage slack.Message `json:"original_message"` ResponseURL string `json:"response_url"` TriggerID string `json:"trigger_id"` }
func ParseActionEvent ¶
func ParseActionEvent(payloadString string, opts ...Option) (MessageAction, error)
type MessageActionEntity ¶
type MessageActionResponse ¶
type MessageEvent ¶
type MessageEvent struct { // Basic Message Event - https://api.slack.com/events/message ClientMsgID string `json:"client_msg_id"` Type string `json:"type"` User string `json:"user"` Text string `json:"text"` ThreadTimeStamp string `json:"thread_ts"` TimeStamp string `json:"ts"` Channel string `json:"channel"` ChannelType string `json:"channel_type"` EventTimeStamp string `json:"event_ts"` // When Message comes from a channel that is shared between workspaces UserTeam string `json:"user_team,omitempty"` SourceTeam string `json:"source_team,omitempty"` // Edited Message Message *MessageEvent `json:"message,omitempty"` PreviousMessage *MessageEvent `json:"previous_message,omitempty"` Edited *Edited `json:"edited,omitempty"` // Deleted Message DeletedTimeStamp string `json:"deleted_ts,omitempty"` // Message Subtypes SubType string `json:"subtype,omitempty"` // bot_message (https://api.slack.com/events/message/bot_message) BotID string `json:"bot_id,omitempty"` Username string `json:"username,omitempty"` Icons *Icon `json:"icons,omitempty"` Upload bool `json:"upload"` Files []File `json:"files"` Blocks slack.Blocks `json:"blocks,omitempty"` Attachments []slack.Attachment `json:"attachments,omitempty"` Metadata slack.SlackMetadata `json:"metadata,omitempty"` // Root is the message that was broadcast to the channel when the SubType is // thread_broadcast. If this is not a thread_broadcast message event, this // value is nil. Root *MessageEvent `json:"root"` }
MessageEvent occurs when a variety of types of messages has been posted. Parse ChannelType to see which if ChannelType = "group", this is a private channel message if ChannelType = "channel", this message was sent to a channel if ChannelType = "im", this is a private message if ChannelType = "mim", A message was posted in a multiparty direct message channel TODO: Improve this so that it is not required to manually parse ChannelType
func (MessageEvent) IsEdited ¶
func (e MessageEvent) IsEdited() bool
IsEdited checks if the MessageEvent is caused by an edit
type MessageMetadataDeletedEvent ¶ added in v0.11.3
type MessageMetadataDeletedEvent struct { Type string `json:"type"` ChannelId string `json:"channel_id"` EventTimestamp string `json:"event_ts"` PreviousMetadata *slack.SlackMetadata `json:"previous_metadata"` AppId string `json:"app_id"` BotId string `json:"bot_id"` UserId string `json:"user_id"` TeamId string `json:"team_id"` MessageTimestamp string `json:"message_ts"` DeletedTimestamp string `json:"deleted_ts"` }
MessageMetadataDeletedEvent is sent, if a message with metadata is deleted
type MessageMetadataPostedEvent ¶ added in v0.11.3
type MessageMetadataPostedEvent struct { Type string `json:"type"` AppId string `json:"app_id"` BotId string `json:"bot_id"` UserId string `json:"user_id"` TeamId string `json:"team_id"` ChannelId string `json:"channel_id"` Metadata *slack.SlackMetadata `json:"metadata"` MessageTimestamp string `json:"message_ts"` EventTimestamp string `json:"event_ts"` }
MessageMetadataPostedEvent is sent, if a message with metadata is posted
type MessageMetadataUpdatedEvent ¶ added in v0.11.3
type MessageMetadataUpdatedEvent struct { Type string `json:"type"` ChannelId string `json:"channel_id"` EventTimestamp string `json:"event_ts"` PreviousMetadata *slack.SlackMetadata `json:"previous_metadata"` AppId string `json:"app_id"` BotId string `json:"bot_id"` UserId string `json:"user_id"` TeamId string `json:"team_id"` MessageTimestamp string `json:"message_ts"` Metadata *slack.SlackMetadata `json:"metadata"` }
MessageMetadataUpdatedEvent is sent, if a message with metadata is deleted
type Option ¶
type Option func(cfg *Config)
func OptionNoVerifyToken ¶ added in v0.5.0
func OptionNoVerifyToken() Option
OptionNoVerifyToken skips the check of the Slack verification token
func OptionVerifyToken ¶
func OptionVerifyToken(v verifier) Option
type PinAddedEvent ¶ added in v0.5.0
type PinAddedEvent pinEvent
PinAddedEvent An item was pinned to a channel - https://api.slack.com/events/pin_added
type PinRemovedEvent ¶ added in v0.5.0
type PinRemovedEvent pinEvent
PinRemovedEvent An item was unpinned from a channel - https://api.slack.com/events/pin_removed
type Profile ¶ added in v0.14.0
type Profile struct { Title string `json:"title"` Phone string `json:"phone"` Skype string `json:"skype"` RealName string `json:"real_name"` RealNameNormalized string `json:"real_name_normalized"` DisplayName string `json:"display_name"` DisplayNameNormalized string `json:"display_name_normalized"` Fields map[string]interface{} `json:"fields"` StatusText string `json:"status_text"` StatusEmoji string `json:"status_emoji"` StatusEmojiDisplayInfo []interface{} `json:"status_emoji_display_info"` StatusExpiration int `json:"status_expiration"` AvatarHash string `json:"avatar_hash"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Image24 string `json:"image_24"` Image32 string `json:"image_32"` Image48 string `json:"image_48"` Image72 string `json:"image_72"` Image192 string `json:"image_192"` Image512 string `json:"image_512"` StatusTextCanonical string `json:"status_text_canonical"` Team string `json:"team"` }
type ReactionAddedEvent ¶ added in v0.6.3
type ReactionAddedEvent reactionEvent
ReactionAddedEvent An reaction was added to a message - https://api.slack.com/events/reaction_added
type ReactionRemovedEvent ¶ added in v0.6.3
type ReactionRemovedEvent reactionEvent
ReactionRemovedEvent An reaction was removed from a message - https://api.slack.com/events/reaction_removed
type SharedChannel ¶ added in v0.12.4
type SharedChannel struct {}
SharedChannel is a struct for shared channels in ShareChannel events
type SharedChannelInviteAcceptedEvent ¶ added in v0.12.4
type SharedChannelInviteAcceptedEvent struct {}
SharedChannelInviteAcceptedEvent is sent if external org accepts a Slack Connect channel invite
type SharedChannelInviteApprovedEvent ¶ added in v0.12.4
type SharedChannelInviteApprovedEvent struct {}
SharedChannelInviteApprovedEvent is sent if your invitation has been approved
type SharedChannelInviteDeclinedEvent ¶ added in v0.12.4
type SharedChannelInviteDeclinedEvent struct {}
SharedChannelInviteDeclinedEvent is sent if external or internal org declines the Slack Connect invite
type SharedChannelInviteReceivedEvent ¶ added in v0.12.4
type SharedChannelInviteReceivedEvent struct {}
SharedChannelInviteReceivedEvent is sent if a bot or app is invited to a Slack Connect channel
type SharedChannelInviteRequestedEvent ¶ added in v0.14.0
type SharedChannelInviteRequestedEvent struct {}
type SharedInvite ¶ added in v0.12.4
type SharedInvite struct {}
SharedInvite is a struct for shared invites in ShareChannel events
type SharedLinks ¶ added in v0.11.4
type SharedLinks struct {}
type SlackEventIcon ¶ added in v0.12.4
type SlackEventIcon struct { ImageDefault bool `json:"image_default,omitempty"` Image34 string `json:"image_34,omitempty"` Image44 string `json:"image_44,omitempty"` Image68 string `json:"image_68,omitempty"` Image88 string `json:"image_88,omitempty"` Image102 string `json:"image_102,omitempty"` Image132 string `json:"image_132,omitempty"` Image230 string `json:"image_230,omitempty"` }
SlackEventIcon is a struct for icons in ShareChannel events
type SlackEventTeam ¶ added in v0.12.4
type SlackEventTeam struct { ID string `json:"id"` Name string `json:"name"` Icon *SlackEventIcon `json:"icon,omitempty"` AvatarBaseURL string `json:"avatar_base_url,omitempty"` IsVerified bool `json:"is_verified"` Domain string `json:"domain"` DateCreated int `json:"date_created"` RequiresSponsorship bool `json:"requires_sponsorship,omitempty"` }
SlackEventTeam is a struct for teams in ShareChannel events
type SlackEventUser ¶ added in v0.12.4
type SlackEventUser struct { ID string `json:"id"` TeamID string `json:"team_id"` Name string `json:"name"` Updated int `json:"updated,omitempty"` Profile *slack.UserProfile `json:"profile,omitempty"` }
SlackEventUser is a struct for users in ShareChannel events
type StarAddedEvent ¶ added in v0.14.0
type StarRemovedEvent ¶ added in v0.14.0
type SubTeam ¶ added in v0.14.0
type SubTeam struct { ID string `json:"id"` TeamID string `json:"team_id"` IsUsergroup bool `json:"is_usergroup"` Name string `json:"name"` Description string `json:"description"` Handle string `json:"handle"` IsExternal bool `json:"is_external"` DateCreate int64 `json:"date_create"` DateUpdate int64 `json:"date_update"` DateDelete int64 `json:"date_delete"` AutoType string `json:"auto_type"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` Prefs struct { Channels []string `json:"channels"` Groups []string `json:"groups"` } `json:"prefs"` Users []string `json:"users"` UserCount int `json:"user_count"` }
type SubteamCreatedEvent ¶ added in v0.14.0
type SubteamMembersChangedEvent ¶ added in v0.14.0
type SubteamMembersChangedEvent struct { Type string `json:"type"` SubteamID string `json:"subteam_id"` TeamID string `json:"team_id"` DatePreviousUpdate int `json:"date_previous_update"` DateUpdate int64 `json:"date_update"` AddedUsers []string `json:"added_users"` AddedUsersCount string `json:"added_users_count"` RemovedUsers []string `json:"removed_users"` RemovedUsersCount string `json:"removed_users_count"` }
type SubteamSelfAddedEvent ¶ added in v0.14.0
type SubteamSelfRemovedEvent ¶ added in v0.14.0
type SubteamUpdatedEvent ¶ added in v0.14.0
type TargetUser ¶ added in v0.14.0
type Team ¶ added in v0.14.0
type Team struct { ID string `json:"id"` Icon TeamIcon `json:"icon"` Name string `json:"name"` Domain string `json:"domain"` IsVerified bool `json:"is_verified"` DateCreated int64 `json:"date_created"` AvatarBaseURL string `json:"avatar_base_url"` RequiresSponsorship bool `json:"requires_sponsorship"` }
type TeamAccessGrantedEvent ¶ added in v0.12.0
TeamAccessGrantedEvent is sent if access to teams was granted for your org-wide app.
type TeamAccessRevokedEvent ¶ added in v0.12.0
TeamAccessRevokedEvent is sent if access to teams was revoked for your org-wide app.
type TeamDomainChangeEvent ¶ added in v0.14.0
type TeamJoinEvent ¶ added in v0.10.0
type TeamJoinEvent struct { Type string `json:"type"` User *slack.User `json:"user"` EventTimestamp string `json:"event_ts"` }
TeamJoinEvent A new member joined a workspace - https://api.slack.com/events/team_join
type TeamRenameEvent ¶ added in v0.14.0
type TokenComparator ¶
type TokenComparator struct {
VerificationToken string
}
func (TokenComparator) Verify ¶
func (c TokenComparator) Verify(t string) bool
type TokensRevokedEvent ¶ added in v0.6.1
type TokensRevokedEvent struct { Type string `json:"type"` Tokens tokens `json:"tokens"` EventTimestamp string `json:"event_ts"` }
TokensRevokedEvent APP's API tokens are revoked - https://api.slack.com/events/tokens_revoked
type User ¶ added in v0.14.0
type User struct { ID string `json:"id"` TeamID string `json:"team_id"` Name string `json:"name"` Deleted bool `json:"deleted"` Color string `json:"color"` RealName string `json:"real_name"` TZ string `json:"tz"` TZLabel string `json:"tz_label"` TZOffset int `json:"tz_offset"` Profile Profile `json:"profile"` IsAdmin bool `json:"is_admin"` IsOwner bool `json:"is_owner"` IsPrimaryOwner bool `json:"is_primary_owner"` IsRestricted bool `json:"is_restricted"` IsUltraRestricted bool `json:"is_ultra_restricted"` IsBot bool `json:"is_bot"` IsAppUser bool `json:"is_app_user"` Updated int64 `json:"updated"` IsEmailConfirmed bool `json:"is_email_confirmed"` Locale string `json:"locale"` }
type UserChangeEvent ¶ added in v0.14.0
type UserHuddleChangedEvent ¶ added in v0.14.0
type UserProfileChangedEvent ¶ added in v0.12.2
type UserProfileChangedEvent struct { User *slack.User `json:"user"` CacheTs int `json:"cache_ts"` Type string `json:"type"` EventTs string `json:"event_ts"` }
UserProfileChangedEvent is sent if access to teams was revoked for your org-wide app.
type UserStatusChangedEvent ¶ added in v0.14.0
type WorkflowStepExecuteEvent ¶ added in v0.10.3
type WorkflowStepExecuteEvent struct { Type string `json:"type"` CallbackID string `json:"callback_id"` WorkflowStep EventWorkflowStep `json:"workflow_step"` EventTimestamp string `json:"event_ts"` }
WorkflowStepExecuteEvent is fired, if a workflow step of your app is invoked