Documentation
¶
Index ¶
- Constants
- Variables
- func GetOAuthToken(client httpClient, clientID, clientSecret, code, redirectURI string) (accessToken string, scope string, err error)
- func GetOAuthTokenContext(ctx context.Context, client httpClient, ...) (accessToken string, scope string, err error)
- func OptionAPIURL(u string) func(*Client)
- func OptionAppLevelToken(token string) func(*Client)
- func OptionConfigRefreshToken(token string) func(*Client)
- func OptionConfigToken(token string) func(*Client)
- func OptionDebug(b bool) func(*Client)
- func OptionHTTPClient(client httpClient) func(*Client)
- func OptionLog(l logger) func(*Client)
- func PostWebhook(url string, msg *WebhookMessage) error
- func PostWebhookContext(ctx context.Context, url string, msg *WebhookMessage) error
- func PostWebhookCustomHTTP(url string, httpClient *http.Client, msg *WebhookMessage) error
- func PostWebhookCustomHTTPContext(ctx context.Context, url string, httpClient *http.Client, msg *WebhookMessage) error
- func UnsafeApplyMsgOptions(token, channel, apiurl string, options ...MsgOption) (string, url.Values, error)
- func ValidateUniqueBlockID(view ModalViewRequest) bool
- type AccessLogParameters
- type Accessory
- type AccountsChangedEvent
- type AckErrorEvent
- type AckMessage
- type ActionBlock
- type ActionCallbacks
- type ActionType
- type AddBookmarkParameters
- type AddCallParameters
- type AppHome
- type AssistantThreadsPrompt
- type AssistantThreadsSetStatusParameters
- type AssistantThreadsSetSuggestedPromptsParameters
- type AssistantThreadsSetTitleParameters
- type Attachment
- type AttachmentAction
- type AttachmentActionCallback
- type AttachmentActionOption
- type AttachmentActionOptionGroup
- type AttachmentField
- type AuditApp
- type AuditChannel
- type AuditEnterprise
- type AuditEntry
- type AuditFile
- type AuditLogParameters
- type AuditLogResponse
- type AuditUser
- type AuditWorkspace
- type AuthRevokeResponse
- type AuthTestResponse
- type BillableInfoResponse
- type BillingActive
- type Block
- type BlockAction
- type BlockActionStates
- type BlockElement
- type BlockElements
- type BlockObjects
- type Blocks
- type Bookmark
- type Bot
- type BotAddedEvent
- type BotChangedEvent
- type BotProfile
- type BotUser
- type ButtonBlockElement
- type Call
- type CallBlock
- type CallParticipant
- type Canvas
- type CanvasChange
- type CanvasDetails
- type CanvasSection
- type Channel
- type ChannelArchiveEvent
- type ChannelCreatedEvent
- type ChannelCreatedInfo
- type ChannelDeletedEvent
- type ChannelHistoryChangedEvent
- type ChannelInfoEvent
- type ChannelJoinedEvent
- type ChannelLeftEvent
- type ChannelMarkedEvent
- type ChannelRenameEvent
- type ChannelRenameInfo
- type ChannelUnarchiveEvent
- type CheckboxGroupsBlockElement
- type Client
- func (api *Client) AddBookmark(channelID string, params AddBookmarkParameters) (Bookmark, error)
- func (api *Client) AddBookmarkContext(ctx context.Context, channelID string, params AddBookmarkParameters) (Bookmark, error)
- func (api *Client) AddCall(params AddCallParameters) (Call, error)
- func (api *Client) AddCallContext(ctx context.Context, params AddCallParameters) (Call, error)
- func (api *Client) AddChannelReminder(channelID, text, time string) (*Reminder, error)
- func (api *Client) AddChannelReminderContext(ctx context.Context, channelID, text, time string) (*Reminder, error)
- func (api *Client) AddPin(channel string, item ItemRef) error
- func (api *Client) AddPinContext(ctx context.Context, channel string, item ItemRef) error
- func (api *Client) AddReaction(name string, item ItemRef) error
- func (api *Client) AddReactionContext(ctx context.Context, name string, item ItemRef) error
- func (api *Client) AddRemoteFile(params RemoteFileParameters) (*RemoteFile, error)
- func (api *Client) AddRemoteFileContext(ctx context.Context, params RemoteFileParameters) (remotefile *RemoteFile, err error)
- func (api *Client) AddStar(channel string, item ItemRef) error
- func (api *Client) AddStarContext(ctx context.Context, channel string, item ItemRef) error
- func (api *Client) AddUserReminder(userID, text, time string) (*Reminder, error)
- func (api *Client) AddUserReminderContext(ctx context.Context, userID, text, time string) (*Reminder, error)
- func (api *Client) ArchiveConversation(channelID string) error
- func (api *Client) ArchiveConversationContext(ctx context.Context, channelID string) error
- func (api *Client) AuthTest() (response *AuthTestResponse, error error)
- func (api *Client) AuthTestContext(ctx context.Context) (response *AuthTestResponse, err error)
- func (api *Client) CallAddParticipants(callID string, participants []CallParticipant) error
- func (api *Client) CallAddParticipantsContext(ctx context.Context, callID string, participants []CallParticipant) error
- func (api *Client) CallRemoveParticipants(callID string, participants []CallParticipant) error
- func (api *Client) CallRemoveParticipantsContext(ctx context.Context, callID string, participants []CallParticipant) error
- func (api *Client) CloseConversation(channelID string) (noOp bool, alreadyClosed bool, err error)
- func (api *Client) CloseConversationContext(ctx context.Context, channelID string) (noOp bool, alreadyClosed bool, err error)
- func (api *Client) ConnectRTM() (info *Info, websocketURL string, err error)
- func (api *Client) ConnectRTMContext(ctx context.Context) (info *Info, websocketURL string, err error)
- func (api *Client) CreateCanvas(title string, documentContent DocumentContent) (string, error)
- func (api *Client) CreateCanvasContext(ctx context.Context, title string, documentContent DocumentContent) (string, error)
- func (api *Client) CreateChannelCanvas(channel string, documentContent DocumentContent) (string, error)
- func (api *Client) CreateChannelCanvasContext(ctx context.Context, channel string, documentContent DocumentContent) (string, error)
- func (api *Client) CreateConversation(params CreateConversationParams) (*Channel, error)
- func (api *Client) CreateConversationContext(ctx context.Context, params CreateConversationParams) (*Channel, error)
- func (api *Client) CreateManifest(manifest *Manifest, token string) (*ManifestResponse, error)
- func (api *Client) CreateManifestContext(ctx context.Context, manifest *Manifest, token string) (*ManifestResponse, error)
- func (api *Client) CreateUserGroup(userGroup UserGroup, options ...CreateUserGroupOption) (UserGroup, error)
- func (api *Client) CreateUserGroupContext(ctx context.Context, userGroup UserGroup, options ...CreateUserGroupOption) (UserGroup, error)
- func (api *Client) Debug() bool
- func (api *Client) Debugf(format string, v ...interface{})
- func (api *Client) Debugln(v ...interface{})
- func (api *Client) DeleteCanvas(canvasID string) error
- func (api *Client) DeleteCanvasAccess(params DeleteCanvasAccessParams) error
- func (api *Client) DeleteCanvasAccessContext(ctx context.Context, params DeleteCanvasAccessParams) error
- func (api *Client) DeleteCanvasContext(ctx context.Context, canvasID string) error
- func (api *Client) DeleteFile(fileID string) error
- func (api *Client) DeleteFileComment(commentID, fileID string) error
- func (api *Client) DeleteFileCommentContext(ctx context.Context, fileID, commentID string) (err error)
- func (api *Client) DeleteFileContext(ctx context.Context, fileID string) (err error)
- func (api *Client) DeleteManifest(token string, appId string) (*SlackResponse, error)
- func (api *Client) DeleteManifestContext(ctx context.Context, token string, appId string) (*SlackResponse, error)
- func (api *Client) DeleteMessage(channel, messageTimestamp string) (string, string, error)
- func (api *Client) DeleteMessageContext(ctx context.Context, channel, messageTimestamp string) (string, string, error)
- func (api *Client) DeleteReminder(id string) error
- func (api *Client) DeleteReminderContext(ctx context.Context, id string) error
- func (api *Client) DeleteScheduledMessage(params *DeleteScheduledMessageParameters) (bool, error)
- func (api *Client) DeleteScheduledMessageContext(ctx context.Context, params *DeleteScheduledMessageParameters) (bool, error)
- func (api *Client) DeleteUserPhoto() error
- func (api *Client) DeleteUserPhotoContext(ctx context.Context) (err error)
- func (api *Client) DisableUser(teamName string, uid string) error
- func (api *Client) DisableUserContext(ctx context.Context, teamName string, uid string) error
- func (api *Client) DisableUserGroup(userGroup string) (UserGroup, error)
- func (api *Client) DisableUserGroupContext(ctx context.Context, userGroup string) (UserGroup, error)
- func (api *Client) EditBookmark(channelID, bookmarkID string, params EditBookmarkParameters) (Bookmark, error)
- func (api *Client) EditBookmarkContext(ctx context.Context, channelID, bookmarkID string, ...) (Bookmark, error)
- func (api *Client) EditCanvas(params EditCanvasParams) error
- func (api *Client) EditCanvasContext(ctx context.Context, params EditCanvasParams) error
- func (api *Client) EnableUserGroup(userGroup string) (UserGroup, error)
- func (api *Client) EnableUserGroupContext(ctx context.Context, userGroup string) (UserGroup, error)
- func (api *Client) EndCall(callID string, params EndCallParameters) error
- func (api *Client) EndCallContext(ctx context.Context, callID string, params EndCallParameters) error
- func (api *Client) EndDND() error
- func (api *Client) EndDNDContext(ctx context.Context) error
- func (api *Client) EndSnooze() (*DNDStatus, error)
- func (api *Client) EndSnoozeContext(ctx context.Context) (*DNDStatus, error)
- func (api *Client) ExportManifest(token string, appId string) (*Manifest, error)
- func (api *Client) ExportManifestContext(ctx context.Context, token string, appId string) (*Manifest, error)
- func (api *Client) FunctionCompleteError(functionExecutionID string, errorMessage string) error
- func (api *Client) FunctionCompleteErrorContext(ctx context.Context, functionExecutionID string, errorMessage string) error
- func (api *Client) FunctionCompleteSuccess(functionExecutionId string, options ...FunctionCompleteSuccessRequestOption) error
- func (api *Client) FunctionCompleteSuccessContext(ctx context.Context, functionExecutionId string, ...) error
- func (api *Client) GetAccessLogs(params AccessLogParameters) ([]Login, *Paging, error)
- func (api *Client) GetAccessLogsContext(ctx context.Context, params AccessLogParameters) ([]Login, *Paging, error)
- func (api *Client) GetAuditLogs(params AuditLogParameters) (entries []AuditEntry, nextCursor string, err error)
- func (api *Client) GetAuditLogsContext(ctx context.Context, params AuditLogParameters) (entries []AuditEntry, nextCursor string, err error)
- func (api *Client) GetBillableInfo(params GetBillableInfoParams) (map[string]BillingActive, error)
- func (api *Client) GetBillableInfoContext(ctx context.Context, params GetBillableInfoParams) (map[string]BillingActive, error)
- func (api *Client) GetBotInfo(parameters GetBotInfoParameters) (*Bot, error)
- func (api *Client) GetBotInfoContext(ctx context.Context, parameters GetBotInfoParameters) (*Bot, error)
- func (api *Client) GetCall(callID string) (Call, error)
- func (api *Client) GetCallContext(ctx context.Context, callID string) (Call, error)
- func (api *Client) GetConversationHistory(params *GetConversationHistoryParameters) (*GetConversationHistoryResponse, error)
- func (api *Client) GetConversationHistoryContext(ctx context.Context, params *GetConversationHistoryParameters) (*GetConversationHistoryResponse, error)
- func (api *Client) GetConversationInfo(input *GetConversationInfoInput) (*Channel, error)
- func (api *Client) GetConversationInfoContext(ctx context.Context, input *GetConversationInfoInput) (*Channel, error)
- func (api *Client) GetConversationReplies(params *GetConversationRepliesParameters) (msgs []Message, hasMore bool, nextCursor string, err error)
- func (api *Client) GetConversationRepliesContext(ctx context.Context, params *GetConversationRepliesParameters) (msgs []Message, hasMore bool, nextCursor string, err error)
- func (api *Client) GetConversations(params *GetConversationsParameters) (channels []Channel, nextCursor string, err error)
- func (api *Client) GetConversationsContext(ctx context.Context, params *GetConversationsParameters) (channels []Channel, nextCursor string, err error)
- func (api *Client) GetConversationsForUser(params *GetConversationsForUserParameters) (channels []Channel, nextCursor string, err error)
- func (api *Client) GetConversationsForUserContext(ctx context.Context, params *GetConversationsForUserParameters) (channels []Channel, nextCursor string, err error)
- func (api *Client) GetDNDInfo(user *string) (*DNDStatus, error)
- func (api *Client) GetDNDInfoContext(ctx context.Context, user *string) (*DNDStatus, error)
- func (api *Client) GetDNDTeamInfo(users []string) (map[string]DNDStatus, error)
- func (api *Client) GetDNDTeamInfoContext(ctx context.Context, users []string) (map[string]DNDStatus, error)
- func (api *Client) GetEmoji() (map[string]string, error)
- func (api *Client) GetEmojiContext(ctx context.Context) (map[string]string, error)
- func (api *Client) GetFile(downloadURL string, writer io.Writer) error
- func (api *Client) GetFileContext(ctx context.Context, downloadURL string, writer io.Writer) error
- func (api *Client) GetFileInfo(fileID string, count, page int) (*File, []Comment, *Paging, error)
- func (api *Client) GetFileInfoContext(ctx context.Context, fileID string, count, page int) (*File, []Comment, *Paging, error)
- func (api *Client) GetFiles(params GetFilesParameters) ([]File, *Paging, error)
- func (api *Client) GetFilesContext(ctx context.Context, params GetFilesParameters) ([]File, *Paging, error)
- func (api *Client) GetOtherTeamInfo(team string) (*TeamInfo, error)
- func (api *Client) GetOtherTeamInfoContext(ctx context.Context, team string) (*TeamInfo, error)
- func (api *Client) GetPermalink(params *PermalinkParameters) (string, error)
- func (api *Client) GetPermalinkContext(ctx context.Context, params *PermalinkParameters) (string, error)
- func (api *Client) GetReactions(item ItemRef, params GetReactionsParameters) ([]ItemReaction, error)
- func (api *Client) GetReactionsContext(ctx context.Context, item ItemRef, params GetReactionsParameters) ([]ItemReaction, error)
- func (api *Client) GetRemoteFileInfo(externalID, fileID string) (remotefile *RemoteFile, err error)
- func (api *Client) GetRemoteFileInfoContext(ctx context.Context, externalID, fileID string) (remotefile *RemoteFile, err error)
- func (api *Client) GetScheduledMessages(params *GetScheduledMessagesParameters) (channels []ScheduledMessage, nextCursor string, err error)
- func (api *Client) GetScheduledMessagesContext(ctx context.Context, params *GetScheduledMessagesParameters) (channels []ScheduledMessage, nextCursor string, err error)
- func (api *Client) GetStarred(params StarsParameters) ([]StarredItem, *Paging, error)
- func (api *Client) GetStarredContext(ctx context.Context, params StarsParameters) ([]StarredItem, *Paging, error)
- func (api *Client) GetTeamInfo() (*TeamInfo, error)
- func (api *Client) GetTeamInfoContext(ctx context.Context) (*TeamInfo, error)
- func (api *Client) GetTeamProfile(teamID ...string) (*TeamProfile, error)
- func (api *Client) GetTeamProfileContext(ctx context.Context, teamID ...string) (*TeamProfile, error)
- func (api *Client) GetUserByEmail(email string) (*User, error)
- func (api *Client) GetUserByEmailContext(ctx context.Context, email string) (*User, error)
- func (api *Client) GetUserGroupMembers(userGroup string) ([]string, error)
- func (api *Client) GetUserGroupMembersContext(ctx context.Context, userGroup string) ([]string, error)
- func (api *Client) GetUserGroups(options ...GetUserGroupsOption) ([]UserGroup, error)
- func (api *Client) GetUserGroupsContext(ctx context.Context, options ...GetUserGroupsOption) ([]UserGroup, error)
- func (api *Client) GetUserIdentity() (*UserIdentityResponse, error)
- func (api *Client) GetUserIdentityContext(ctx context.Context) (response *UserIdentityResponse, err error)
- func (api *Client) GetUserInfo(user string) (*User, error)
- func (api *Client) GetUserInfoContext(ctx context.Context, user string) (*User, error)
- func (api *Client) GetUserPrefs() (*UserPrefsCarrier, error)
- func (api *Client) GetUserPrefsContext(ctx context.Context) (*UserPrefsCarrier, error)
- func (api *Client) GetUserPresence(user string) (*UserPresence, error)
- func (api *Client) GetUserPresenceContext(ctx context.Context, user string) (*UserPresence, error)
- func (api *Client) GetUserProfile(params *GetUserProfileParameters) (*UserProfile, error)
- func (api *Client) GetUserProfileContext(ctx context.Context, params *GetUserProfileParameters) (*UserProfile, error)
- func (api *Client) GetUsers(options ...GetUsersOption) ([]User, error)
- func (api *Client) GetUsersContext(ctx context.Context, options ...GetUsersOption) (results []User, err error)
- func (api *Client) GetUsersInConversation(params *GetUsersInConversationParameters) ([]string, string, error)
- func (api *Client) GetUsersInConversationContext(ctx context.Context, params *GetUsersInConversationParameters) ([]string, string, error)
- func (api *Client) GetUsersInfo(users ...string) (*[]User, error)
- func (api *Client) GetUsersInfoContext(ctx context.Context, users ...string) (*[]User, error)
- func (api *Client) GetUsersPaginated(options ...GetUsersOption) UserPagination
- func (api *Client) InviteGuest(teamName, channel, firstName, lastName, emailAddress string) error
- func (api *Client) InviteGuestContext(ctx context.Context, ...) error
- func (api *Client) InviteRestricted(teamName, channel, firstName, lastName, emailAddress string) error
- func (api *Client) InviteRestrictedContext(ctx context.Context, ...) error
- func (api *Client) InviteSharedEmailsToConversation(channelID string, emails ...string) (string, bool, error)
- func (api *Client) InviteSharedEmailsToConversationContext(ctx context.Context, channelID string, emails ...string) (string, bool, error)
- func (api *Client) InviteSharedToConversation(params InviteSharedToConversationParams) (string, bool, error)
- func (api *Client) InviteSharedToConversationContext(ctx context.Context, params InviteSharedToConversationParams) (string, bool, error)
- func (api *Client) InviteSharedUserIDsToConversation(channelID string, userIDs ...string) (string, bool, error)
- func (api *Client) InviteSharedUserIDsToConversationContext(ctx context.Context, channelID string, userIDs ...string) (string, bool, error)
- func (api *Client) InviteToTeam(teamName, firstName, lastName, emailAddress string) error
- func (api *Client) InviteToTeamContext(ctx context.Context, teamName, firstName, lastName, emailAddress string) error
- func (api *Client) InviteUsersToConversation(channelID string, users ...string) (*Channel, error)
- func (api *Client) InviteUsersToConversationContext(ctx context.Context, channelID string, users ...string) (*Channel, error)
- func (api *Client) JoinConversation(channelID string) (*Channel, string, []string, error)
- func (api *Client) JoinConversationContext(ctx context.Context, channelID string) (*Channel, string, []string, error)
- func (api *Client) KickUserFromConversation(channelID string, user string) error
- func (api *Client) KickUserFromConversationContext(ctx context.Context, channelID string, user string) error
- func (api *Client) LeaveConversation(channelID string) (bool, error)
- func (api *Client) LeaveConversationContext(ctx context.Context, channelID string) (bool, error)
- func (api *Client) ListAllStars() ([]Item, error)
- func (api *Client) ListAllStarsContext(ctx context.Context) (results []Item, err error)
- func (api *Client) ListBookmarks(channelID string) ([]Bookmark, error)
- func (api *Client) ListBookmarksContext(ctx context.Context, channelID string) ([]Bookmark, error)
- func (api *Client) ListEventAuthorizations(eventContext string) ([]EventAuthorization, error)
- func (api *Client) ListEventAuthorizationsContext(ctx context.Context, eventContext string) ([]EventAuthorization, error)
- func (api *Client) ListFiles(params ListFilesParameters) ([]File, *ListFilesParameters, error)
- func (api *Client) ListFilesContext(ctx context.Context, params ListFilesParameters) ([]File, *ListFilesParameters, error)
- func (api *Client) ListPins(channel string) ([]Item, *Paging, error)
- func (api *Client) ListPinsContext(ctx context.Context, channel string) ([]Item, *Paging, error)
- func (api *Client) ListReactions(params ListReactionsParameters) ([]ReactedItem, *Paging, error)
- func (api *Client) ListReactionsContext(ctx context.Context, params ListReactionsParameters) ([]ReactedItem, *Paging, error)
- func (api *Client) ListReminders() ([]*Reminder, error)
- func (api *Client) ListRemindersContext(ctx context.Context) ([]*Reminder, error)
- func (api *Client) ListRemoteFiles(params ListRemoteFilesParameters) ([]RemoteFile, error)
- func (api *Client) ListRemoteFilesContext(ctx context.Context, params ListRemoteFilesParameters) ([]RemoteFile, error)
- func (api *Client) ListStars(params StarsParameters) ([]Item, *Paging, error)
- func (api *Client) ListStarsContext(ctx context.Context, params StarsParameters) ([]Item, *Paging, error)
- func (api *Client) ListStarsPaginated(options ...ListStarsOption) StarredItemPagination
- func (api *Client) ListTeams(params ListTeamsParameters) ([]Team, string, error)
- func (api *Client) ListTeamsContext(ctx context.Context, params ListTeamsParameters) ([]Team, string, error)
- func (api *Client) LookupCanvasSections(params LookupCanvasSectionsParams) ([]CanvasSection, error)
- func (api *Client) LookupCanvasSectionsContext(ctx context.Context, params LookupCanvasSectionsParams) ([]CanvasSection, error)
- func (api *Client) MarkConversation(channel, ts string) (err error)
- func (api *Client) MarkConversationContext(ctx context.Context, channel, ts string) error
- func (api *Client) MuteChat(channelID string) (*UserPrefsCarrier, error)
- func (api *Client) NewRTM(options ...RTMOption) *RTM
- func (api *Client) OpenConversation(params *OpenConversationParameters) (*Channel, bool, bool, error)
- func (api *Client) OpenConversationContext(ctx context.Context, params *OpenConversationParameters) (*Channel, bool, bool, error)
- func (api *Client) OpenDialog(triggerID string, dialog Dialog) (err error)
- func (api *Client) OpenDialogContext(ctx context.Context, triggerID string, dialog Dialog) (err error)
- func (api *Client) OpenView(triggerID string, view ModalViewRequest) (*ViewResponse, error)
- func (api *Client) OpenViewContext(ctx context.Context, triggerID string, view ModalViewRequest) (*ViewResponse, error)
- func (api *Client) PostEphemeral(channelID, userID string, options ...MsgOption) (string, error)
- func (api *Client) PostEphemeralContext(ctx context.Context, channelID, userID string, options ...MsgOption) (timestamp string, err error)
- func (api *Client) PostMessage(channelID string, options ...MsgOption) (string, string, error)
- func (api *Client) PostMessageContext(ctx context.Context, channelID string, options ...MsgOption) (string, string, error)
- func (api *Client) PublishView(userID string, view HomeTabViewRequest, hash string) (*ViewResponse, error)
- func (api *Client) PublishViewContext(ctx context.Context, userID string, view HomeTabViewRequest, hash string) (*ViewResponse, error)
- func (api *Client) PushView(triggerID string, view ModalViewRequest) (*ViewResponse, error)
- func (api *Client) PushViewContext(ctx context.Context, triggerID string, view ModalViewRequest) (*ViewResponse, error)
- func (api *Client) RemoveBookmark(channelID, bookmarkID string) error
- func (api *Client) RemoveBookmarkContext(ctx context.Context, channelID, bookmarkID string) error
- func (api *Client) RemovePin(channel string, item ItemRef) error
- func (api *Client) RemovePinContext(ctx context.Context, channel string, item ItemRef) error
- func (api *Client) RemoveReaction(name string, item ItemRef) error
- func (api *Client) RemoveReactionContext(ctx context.Context, name string, item ItemRef) error
- func (api *Client) RemoveRemoteFile(externalID, fileID string) (err error)
- func (api *Client) RemoveRemoteFileContext(ctx context.Context, externalID, fileID string) (err error)
- func (api *Client) RemoveStar(channel string, item ItemRef) error
- func (api *Client) RemoveStarContext(ctx context.Context, channel string, item ItemRef) error
- func (api *Client) RenameConversation(channelID, channelName string) (*Channel, error)
- func (api *Client) RenameConversationContext(ctx context.Context, channelID, channelName string) (*Channel, error)
- func (api *Client) RevokeFilePublicURL(fileID string) (*File, error)
- func (api *Client) RevokeFilePublicURLContext(ctx context.Context, fileID string) (*File, error)
- func (api *Client) RotateTokens(configToken string, refreshToken string) (*TokenResponse, error)
- func (api *Client) RotateTokensContext(ctx context.Context, configToken string, refreshToken string) (*TokenResponse, error)
- func (api *Client) SaveWorkflowStepConfiguration(workflowStepEditID string, inputs *WorkflowStepInputs, ...) error
- func (api *Client) SaveWorkflowStepConfigurationContext(ctx context.Context, workflowStepEditID string, inputs *WorkflowStepInputs, ...) error
- func (api *Client) ScheduleMessage(channelID, postAt string, options ...MsgOption) (string, string, error)
- func (api *Client) ScheduleMessageContext(ctx context.Context, channelID, postAt string, options ...MsgOption) (string, string, error)
- func (api *Client) Search(query string, params SearchParameters) (*SearchMessages, *SearchFiles, error)
- func (api *Client) SearchContext(ctx context.Context, query string, params SearchParameters) (*SearchMessages, *SearchFiles, error)
- func (api *Client) SearchFiles(query string, params SearchParameters) (*SearchFiles, error)
- func (api *Client) SearchFilesContext(ctx context.Context, query string, params SearchParameters) (*SearchFiles, error)
- func (api *Client) SearchMessages(query string, params SearchParameters) (*SearchMessages, error)
- func (api *Client) SearchMessagesContext(ctx context.Context, query string, params SearchParameters) (*SearchMessages, error)
- func (api *Client) SendAuthRevoke(token string) (*AuthRevokeResponse, error)
- func (api *Client) SendAuthRevokeContext(ctx context.Context, token string) (*AuthRevokeResponse, error)
- func (api *Client) SendMessage(channel string, options ...MsgOption) (string, string, string, error)
- func (api *Client) SendMessageContext(ctx context.Context, channelID string, options ...MsgOption) (_channel string, _timestampOrScheduledMessageId string, _text string, ...)
- func (api *Client) SendSSOBindingEmail(teamName, user string) error
- func (api *Client) SendSSOBindingEmailContext(ctx context.Context, teamName, user string) error
- func (api *Client) SetAssistantThreadsStatus(params AssistantThreadsSetStatusParameters) (err error)
- func (api *Client) SetAssistantThreadsStatusContext(ctx context.Context, params AssistantThreadsSetStatusParameters) (err error)
- func (api *Client) SetAssistantThreadsSuggestedPrompts(params AssistantThreadsSetSuggestedPromptsParameters) (err error)
- func (api *Client) SetAssistantThreadsSuggestedPromptsContext(ctx context.Context, params AssistantThreadsSetSuggestedPromptsParameters) (err error)
- func (api *Client) SetAssistantThreadsTitle(params AssistantThreadsSetTitleParameters) (err error)
- func (api *Client) SetAssistantThreadsTitleContext(ctx context.Context, params AssistantThreadsSetTitleParameters) (err error)
- func (api *Client) SetCanvasAccess(params SetCanvasAccessParams) error
- func (api *Client) SetCanvasAccessContext(ctx context.Context, params SetCanvasAccessParams) error
- func (api *Client) SetPurposeOfConversation(channelID, purpose string) (*Channel, error)
- func (api *Client) SetPurposeOfConversationContext(ctx context.Context, channelID, purpose string) (*Channel, error)
- func (api *Client) SetRegular(teamName, user string) error
- func (api *Client) SetRegularContext(ctx context.Context, teamName, user string) error
- func (api *Client) SetRestricted(teamName, uid string, channelIds ...string) error
- func (api *Client) SetRestrictedContext(ctx context.Context, teamName, uid string, channelIds ...string) error
- func (api *Client) SetSnooze(minutes int) (*DNDStatus, error)
- func (api *Client) SetSnoozeContext(ctx context.Context, minutes int) (*DNDStatus, error)
- func (api *Client) SetTopicOfConversation(channelID, topic string) (*Channel, error)
- func (api *Client) SetTopicOfConversationContext(ctx context.Context, channelID, topic string) (*Channel, error)
- func (api *Client) SetUltraRestricted(teamName, uid, channel string) error
- func (api *Client) SetUltraRestrictedContext(ctx context.Context, teamName, uid, channel string) error
- func (api *Client) SetUserAsActive() error
- func (api *Client) SetUserAsActiveContext(ctx context.Context) (err error)
- func (api *Client) SetUserCustomFields(userID string, customFields map[string]UserProfileCustomField) error
- func (api *Client) SetUserCustomFieldsContext(ctx context.Context, userID string, ...) error
- func (api *Client) SetUserCustomStatus(statusText, statusEmoji string, statusExpiration int64) error
- func (api *Client) SetUserCustomStatusContext(ctx context.Context, statusText, statusEmoji string, statusExpiration int64) error
- func (api *Client) SetUserCustomStatusContextWithUser(ctx context.Context, user, statusText, statusEmoji string, ...) error
- func (api *Client) SetUserCustomStatusWithUser(user, statusText, statusEmoji string, statusExpiration int64) error
- func (api *Client) SetUserPhoto(image string, params UserSetPhotoParams) error
- func (api *Client) SetUserPhotoContext(ctx context.Context, image string, params UserSetPhotoParams) (err error)
- func (api *Client) SetUserPresence(presence string) error
- func (api *Client) SetUserPresenceContext(ctx context.Context, presence string) error
- func (api *Client) SetUserRealName(realName string) error
- func (api *Client) SetUserRealNameContextWithUser(ctx context.Context, user, realName string) error
- func (api *Client) ShareFilePublicURL(fileID string) (*File, []Comment, *Paging, error)
- func (api *Client) ShareFilePublicURLContext(ctx context.Context, fileID string) (*File, []Comment, *Paging, error)
- func (api *Client) ShareRemoteFile(channels []string, externalID, fileID string) (file *RemoteFile, err error)
- func (api *Client) ShareRemoteFileContext(ctx context.Context, channels []string, externalID, fileID string) (file *RemoteFile, err error)
- func (api *Client) StartRTM() (info *Info, websocketURL string, err error)deprecated
- func (api *Client) StartRTMContext(ctx context.Context) (info *Info, websocketURL string, err error)deprecated
- func (api *Client) StartSocketModeContext(ctx context.Context) (info *SocketModeConnection, websocketURL string, err error)
- func (api *Client) UnArchiveConversation(channelID string) error
- func (api *Client) UnArchiveConversationContext(ctx context.Context, channelID string) error
- func (api *Client) UnMuteChat(channelID string) (*UserPrefsCarrier, error)
- func (api *Client) UnfurlMessage(channelID, timestamp string, unfurls map[string]Attachment, ...) (string, string, string, error)
- func (api *Client) UnfurlMessageContext(ctx context.Context, channelID, timestamp string, ...) (string, string, string, error)
- func (api *Client) UnfurlMessageWithAuthURL(channelID, timestamp string, userAuthURL string, options ...MsgOption) (string, string, string, error)
- func (api *Client) UnfurlMessageWithAuthURLContext(ctx context.Context, channelID, timestamp string, userAuthURL string, ...) (string, string, string, error)
- func (api *Client) UninstallApp(clientID, clientSecret string) error
- func (api *Client) UninstallAppContext(ctx context.Context, clientID, clientSecret string) error
- func (api *Client) UnsetUserCustomStatus() error
- func (api *Client) UnsetUserCustomStatusContext(ctx context.Context) error
- func (api *Client) UpdateCall(callID string, params UpdateCallParameters) (Call, error)
- func (api *Client) UpdateCallContext(ctx context.Context, callID string, params UpdateCallParameters) (Call, error)
- func (api *Client) UpdateConfigTokens(response *TokenResponse)
- func (api *Client) UpdateManifest(manifest *Manifest, token string, appId string) (*UpdateManifestResponse, error)
- func (api *Client) UpdateManifestContext(ctx context.Context, manifest *Manifest, token string, appId string) (*UpdateManifestResponse, error)
- func (api *Client) UpdateMessage(channelID, timestamp string, options ...MsgOption) (string, string, string, error)
- func (api *Client) UpdateMessageContext(ctx context.Context, channelID, timestamp string, options ...MsgOption) (string, string, string, error)
- func (api *Client) UpdateRemoteFile(fileID string, params RemoteFileParameters) (remotefile *RemoteFile, err error)
- func (api *Client) UpdateRemoteFileContext(ctx context.Context, fileID string, params RemoteFileParameters) (remotefile *RemoteFile, err error)
- func (api *Client) UpdateUserGroup(userGroupID string, options ...UpdateUserGroupsOption) (UserGroup, error)
- func (api *Client) UpdateUserGroupContext(ctx context.Context, userGroupID string, options ...UpdateUserGroupsOption) (UserGroup, error)
- func (api *Client) UpdateUserGroupMembers(userGroup string, members string) (UserGroup, error)
- func (api *Client) UpdateUserGroupMembersContext(ctx context.Context, userGroup string, members string) (UserGroup, error)
- func (api *Client) UpdateView(view ModalViewRequest, externalID, hash, viewID string) (*ViewResponse, error)
- func (api *Client) UpdateViewContext(ctx context.Context, view ModalViewRequest, externalID, hash, viewID string) (*ViewResponse, error)
- func (api *Client) UploadFile(params FileUploadParameters) (file *File, err error)deprecated
- func (api *Client) UploadFileContext(ctx context.Context, params FileUploadParameters) (file *File, err error)deprecated
- func (api *Client) UploadFileV2(params UploadFileV2Parameters) (*FileSummary, error)
- func (api *Client) UploadFileV2Context(ctx context.Context, params UploadFileV2Parameters) (file *FileSummary, err error)
- func (api *Client) ValidateManifest(manifest *Manifest, token string, appId string) (*ManifestResponse, error)
- func (api *Client) ValidateManifestContext(ctx context.Context, manifest *Manifest, token string, appId string) (*ManifestResponse, error)
- func (api *Client) WorkflowStepCompleted(workflowStepExecuteID string, options ...WorkflowStepCompletedRequestOption) error
- func (api *Client) WorkflowStepFailed(workflowStepExecuteID string, errorMessage string) error
- type CommandsChangedEvent
- type Comment
- type ConfigurationModalRequest
- type ConfirmationBlockObject
- type ConfirmationField
- type ConnectedEvent
- type ConnectingEvent
- type ConnectionErrorEvent
- type Container
- type ContextBlock
- type ContextElements
- type Conversation
- type CreateConversationParams
- type CreateUserGroupOption
- type CtxChannel
- type CtxMessage
- type DNDStatus
- type DNDUpdatedEvent
- type DatePickerBlockElement
- type DateTimePickerBlockElement
- type Debug
- type DeleteCanvasAccessParams
- type DeleteScheduledMessageParameters
- type DesktopNotificationEvent
- type Dialog
- type DialogCallback
- type DialogElement
- type DialogInput
- type DialogInputSelect
- func NewChannelsSelect(name, label string) *DialogInputSelect
- func NewConversationsSelect(name, label string) *DialogInputSelect
- func NewExternalSelectDialogInput(name, label string, options []DialogSelectOption) *DialogInputSelect
- func NewGroupedSelectDialogInput(name, label string, options []DialogOptionGroup) *DialogInputSelect
- func NewStaticSelectDialogInput(name, label string, options []DialogSelectOption) *DialogInputSelect
- func NewUsersSelect(name, label string) *DialogInputSelect
- type DialogInputValidationError
- type DialogInputValidationErrors
- type DialogOpenResponse
- type DialogOptionGroup
- type DialogResponseMetadata
- type DialogSelectOption
- type DialogSubmissionCallback
- type DialogTrigger
- type DisconnectedEvent
- type DispatchActionConfig
- type Display
- type DividerBlock
- type DocumentContent
- type EditBookmarkParameters
- type EditCanvasParams
- type Edited
- type EmailDomainChangedEvent
- type EmailFileUserInfo
- type EmailTextInputBlockElement
- type EmojiChangedEvent
- type EndCallParameters
- type Enterprise
- type EnterpriseUser
- type Event
- type EventAuthorization
- type EventSubscriptions
- type ExportManifestResponse
- type Features
- type File
- type FileBlock
- type FileChangeEvent
- type FileCommentAddedEvent
- type FileCommentDeletedEvent
- type FileCommentEditedEvent
- type FileCreatedEvent
- type FileDeletedEvent
- type FileInputBlockElement
- type FilePrivateEvent
- type FilePublicEvent
- type FileSharedEvent
- type FileSummary
- type FileUnsharedEvent
- type FileUploadParameters
- type FunctionCompleteErrorRequest
- type FunctionCompleteSuccessRequest
- type FunctionCompleteSuccessRequestOption
- type GetBillableInfoParams
- type GetBotInfoParameters
- type GetConversationHistoryParameters
- type GetConversationHistoryResponse
- type GetConversationInfoInput
- type GetConversationRepliesParameters
- type GetConversationsForUserParameters
- type GetConversationsParameters
- type GetFilesParameters
- type GetReactionsParameters
- type GetScheduledMessagesParameters
- type GetUserGroupsOption
- type GetUserGroupsParams
- type GetUserProfileParameters
- type GetUsersInConversationParameters
- type GetUsersOption
- type Group
- type GroupArchiveEvent
- type GroupCloseEvent
- type GroupConversation
- type GroupCreatedEvent
- type GroupHistoryChangedEvent
- type GroupJoinedEvent
- type GroupLeftEvent
- type GroupMarkedEvent
- type GroupOpenEvent
- type GroupRenameEvent
- type GroupRenameInfo
- type GroupUnarchiveEvent
- type HeaderBlock
- type HeaderBlockOption
- type HelloEvent
- type History
- type HistoryParameters
- type HomeTabViewRequest
- type IDGenerator
- type IM
- type IMCloseEvent
- type IMCreatedEvent
- type IMHistoryChangedEvent
- type IMMarkedEvent
- type IMMarkedHistoryChanged
- type IMOpenEvent
- type Icon
- type Icons
- type ImageBlock
- type ImageBlockElement
- type IncomingEventError
- type Info
- type InputBlock
- type InputType
- type InteractionCallback
- type InteractionType
- type InteractionWorkflowStep
- type Interactivity
- type InvalidAuthEvent
- type InviteSharedToConversationParams
- type Item
- type ItemReaction
- type ItemRef
- type JSONTime
- type LatencyReport
- type ListFilesParameters
- type ListReactionsParameters
- type ListRemoteFilesParameters
- type ListStarsOption
- type ListTeamsParameters
- type Login
- type LoginResponse
- type LookupCanvasSectionsCriteria
- type LookupCanvasSectionsParams
- type LookupCanvasSectionsResponse
- type Manifest
- type ManifestMetadata
- type ManifestResponse
- type ManifestSlashCommand
- type ManifestValidationError
- type ManualPresenceChangeEvent
- type MemberJoinedChannelEvent
- type MemberLeftChannelEvent
- type Message
- type MessageBlockType
- type MessageElementType
- type MessageEvent
- type MessageObjectType
- type MessageTooLongEvent
- type MixedElement
- type MixedElementType
- type MobileInAppNotificationEvent
- type ModalViewRequest
- type Msg
- type MsgOption
- func MsgOptionAsUser(b bool) MsgOption
- func MsgOptionAttachments(attachments ...Attachment) MsgOption
- func MsgOptionBlocks(blocks ...Block) MsgOption
- func MsgOptionBroadcast() MsgOption
- func MsgOptionCompose(options ...MsgOption) MsgOption
- func MsgOptionDelete(timestamp string) MsgOption
- func MsgOptionDeleteOriginal(responseURL string) MsgOption
- func MsgOptionDisableLinkUnfurl() MsgOption
- func MsgOptionDisableMarkdown() MsgOption
- func MsgOptionDisableMediaUnfurl() MsgOption
- func MsgOptionEnableLinkUnfurl() MsgOption
- func MsgOptionIconEmoji(iconEmoji string) MsgOption
- func MsgOptionIconURL(iconURL string) MsgOption
- func MsgOptionLinkNames(linkName bool) MsgOption
- func MsgOptionMeMessage() MsgOption
- func MsgOptionMetadata(metadata SlackMetadata) MsgOption
- func MsgOptionParse(b bool) MsgOption
- func MsgOptionPost() MsgOption
- func MsgOptionPostEphemeral(userID string) MsgOption
- func MsgOptionPostMessageParameters(params PostMessageParameters) MsgOption
- func MsgOptionReplaceOriginal(responseURL string) MsgOption
- func MsgOptionResponseURL(url string, responseType string) MsgOption
- func MsgOptionSchedule(postAt string) MsgOption
- func MsgOptionTS(ts string) MsgOption
- func MsgOptionText(text string, escape bool) MsgOption
- func MsgOptionUnfurl(timestamp string, unfurls map[string]Attachment) MsgOption
- func MsgOptionUnfurlAuthMessage(timestamp string, msg string) MsgOption
- func MsgOptionUnfurlAuthRequired(timestamp string) MsgOption
- func MsgOptionUnfurlAuthURL(timestamp string, userAuthURL string) MsgOption
- func MsgOptionUpdate(timestamp string) MsgOption
- func MsgOptionUser(userID string) MsgOption
- func MsgOptionUsername(username string) MsgOption
- func UnsafeMsgOptionEndpoint(endpoint string, update func(url.Values)) MsgOption
- type MultiSelectBlockElement
- func (s MultiSelectBlockElement) ElementType() MessageElementType
- func (s *MultiSelectBlockElement) WithConfirm(confirm *ConfirmationBlockObject) *MultiSelectBlockElement
- func (s *MultiSelectBlockElement) WithInitialChannels(channels ...string) *MultiSelectBlockElement
- func (s *MultiSelectBlockElement) WithInitialConversations(conversations ...string) *MultiSelectBlockElement
- func (s *MultiSelectBlockElement) WithInitialOptions(options ...*OptionBlockObject) *MultiSelectBlockElement
- func (s *MultiSelectBlockElement) WithInitialUsers(users ...string) *MultiSelectBlockElement
- func (s *MultiSelectBlockElement) WithMaxSelectedItems(maxSelectedItems int) *MultiSelectBlockElement
- func (s *MultiSelectBlockElement) WithMinQueryLength(minQueryLength int) *MultiSelectBlockElement
- type NumberInputBlockElement
- func (s NumberInputBlockElement) ElementType() MessageElementType
- func (s *NumberInputBlockElement) WithDispatchActionConfig(config *DispatchActionConfig) *NumberInputBlockElement
- func (s *NumberInputBlockElement) WithInitialValue(initialValue string) *NumberInputBlockElement
- func (s *NumberInputBlockElement) WithMaxValue(maxValue string) *NumberInputBlockElement
- func (s *NumberInputBlockElement) WithMinValue(minValue string) *NumberInputBlockElement
- type OAuthConfig
- type OAuthResponse
- type OAuthResponseBot
- func GetBotOAuthToken(client httpClient, clientID, clientSecret, code, redirectURI string) (accessToken string, scope string, bot OAuthResponseBot, err error)
- func GetBotOAuthTokenContext(ctx context.Context, client httpClient, ...) (accessToken string, scope string, bot OAuthResponseBot, err error)
- type OAuthResponseIncomingWebhook
- type OAuthScopes
- type OAuthV2Response
- func GetOAuthV2Response(client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OAuthV2Response, err error)
- func GetOAuthV2ResponseContext(ctx context.Context, client httpClient, ...) (resp *OAuthV2Response, err error)
- func RefreshOAuthV2Token(client httpClient, clientID, clientSecret, refreshToken string) (resp *OAuthV2Response, err error)
- func RefreshOAuthV2TokenContext(ctx context.Context, client httpClient, ...) (resp *OAuthV2Response, err error)
- type OAuthV2ResponseAuthedUser
- type OAuthV2ResponseEnterprise
- type OAuthV2ResponseTeam
- type OpenConversationParameters
- type OpenIDConnectResponse
- type Option
- type OptionBlockObject
- type OptionGroupBlockObject
- type OptionGroupsResponse
- type OptionsResponse
- type OutgoingErrorEvent
- type OutgoingMessage
- type OverflowBlockElement
- type Pagination
- type Paging
- type ParamOption
- type PermalinkParameters
- type PinAddedEvent
- type PinRemovedEvent
- type Ping
- type PlainTextInputBlockElement
- func (s PlainTextInputBlockElement) ElementType() MessageElementType
- func (s *PlainTextInputBlockElement) WithDispatchActionConfig(config *DispatchActionConfig) *PlainTextInputBlockElement
- func (s *PlainTextInputBlockElement) WithInitialValue(initialValue string) *PlainTextInputBlockElement
- func (s *PlainTextInputBlockElement) WithMaxLength(maxLength int) *PlainTextInputBlockElement
- func (s *PlainTextInputBlockElement) WithMinLength(minLength int) *PlainTextInputBlockElement
- func (s *PlainTextInputBlockElement) WithMultiline(multiline bool) *PlainTextInputBlockElement
- type Pong
- type PostMessageParameters
- type PrefChangeEvent
- type PresenceChangeEvent
- type Properties
- type Purpose
- type RTM
- func (rtm *RTM) Disconnect() error
- func (rtm *RTM) GetInfo() *Info
- func (rtm *RTM) ManageConnection()
- func (rtm *RTM) NewOutgoingMessage(text string, channelID string, options ...RTMsgOption) *OutgoingMessage
- func (rtm *RTM) NewSubscribeUserPresence(ids []string) *OutgoingMessage
- func (rtm *RTM) NewTypingMessage(channelID string) *OutgoingMessage
- func (rtm *RTM) SendMessage(msg *OutgoingMessage)
- type RTMError
- type RTMEvent
- type RTMOption
- type RTMResponse
- type RTMsgOption
- type RadioButtonsBlockElement
- type RateLimitEvent
- type RateLimitedError
- type ReactedItem
- type ReactionAddedEvent
- type ReactionEvent
- type ReactionItem
- type ReactionRemovedEvent
- type ReconnectUrlEvent
- type Reminder
- type RemoteFile
- type RemoteFileParameters
- type Reply
- type ResponseMetadata
- type RichTextBlock
- type RichTextElement
- type RichTextElementType
- type RichTextInputBlockElement
- type RichTextList
- type RichTextListElementType
- type RichTextPreformatted
- type RichTextQuote
- type RichTextSection
- type RichTextSectionBroadcastElement
- type RichTextSectionChannelElement
- type RichTextSectionColorElement
- type RichTextSectionDateElement
- type RichTextSectionElement
- type RichTextSectionElementType
- type RichTextSectionEmojiElement
- type RichTextSectionLinkElement
- type RichTextSectionTeamElement
- type RichTextSectionTextElement
- type RichTextSectionTextStyle
- type RichTextSectionUnknownElement
- type RichTextSectionUserElement
- type RichTextSectionUserGroupElement
- type RichTextUnknown
- type ScheduledMessage
- type SearchFiles
- type SearchMessage
- type SearchMessages
- type SearchParameters
- type SecretsVerifier
- type SectionBlock
- type SectionBlockOption
- type SelectBlockElement
- func (s SelectBlockElement) ElementType() MessageElementType
- func (s *SelectBlockElement) WithConfirm(confirm *ConfirmationBlockObject) *SelectBlockElement
- func (s *SelectBlockElement) WithInitialChannel(channel string) *SelectBlockElement
- func (s *SelectBlockElement) WithInitialConversation(conversation string) *SelectBlockElement
- func (s *SelectBlockElement) WithInitialOption(option *OptionBlockObject) *SelectBlockElement
- func (s *SelectBlockElement) WithInitialUser(user string) *SelectBlockElement
- type SelectBlockElementFilter
- type SelectDataSource
- type SetCanvasAccessParams
- type Settings
- type Share
- type ShareFileInfo
- type Shortcut
- type ShortcutType
- type SlackErrorResponse
- type SlackFileObject
- type SlackMetadata
- type SlackResponse
- type SlashCommand
- type SnoozeDebug
- type SnoozeInfo
- type SocketModeConnection
- type StarAddedEvent
- type StarRemovedEvent
- type StarredItem
- type StarredItemPagination
- type StarsParameters
- type StatusCodeError
- type Style
- type SubteamCreatedEvent
- type SubteamMembersChangedEvent
- type SubteamSelfAddedEvent
- type SubteamSelfRemovedEvent
- type SubteamUpdatedEvent
- type Team
- type TeamDomainChangeEvent
- type TeamIdentity
- type TeamInfo
- type TeamJoinEvent
- type TeamMigrationStartedEvent
- type TeamPrefChangeEvent
- type TeamProfile
- type TeamProfileField
- type TeamProfileResponse
- type TeamRenameEvent
- type TeamResponse
- type TextBlockObject
- type TextInputElement
- type TextInputOption
- type TextInputSubtype
- type TimePickerBlockElement
- type TokenResponse
- type Topic
- type URLTextInputBlockElement
- type UnknownBlock
- type UnknownBlockElement
- type UnmappedError
- type UnmarshallingErrorEvent
- type UpdateCallParameters
- type UpdateManifestResponse
- type UpdateUserGroupsOption
- func UpdateUserGroupsOptionChannels(channels []string) UpdateUserGroupsOption
- func UpdateUserGroupsOptionDescription(description *string) UpdateUserGroupsOption
- func UpdateUserGroupsOptionEnableSection(enableSection bool) UpdateUserGroupsOption
- func UpdateUserGroupsOptionHandle(handle string) UpdateUserGroupsOption
- func UpdateUserGroupsOptionName(name string) UpdateUserGroupsOption
- type UpdateUserGroupsParams
- type UploadFileV2Parameters
- type User
- type UserChangeEvent
- type UserDetails
- type UserGroup
- type UserGroupPrefs
- type UserIdentity
- type UserIdentityResponse
- type UserPagination
- type UserPrefs
- type UserPrefsCarrier
- type UserPresence
- type UserProfile
- type UserProfileCustomField
- type UserProfileCustomFields
- func (fields *UserProfileCustomFields) Len() int
- func (fields UserProfileCustomFields) MarshalJSON() ([]byte, error)
- func (fields *UserProfileCustomFields) SetMap(m map[string]UserProfileCustomField)
- func (fields *UserProfileCustomFields) ToMap() map[string]UserProfileCustomField
- func (fields *UserProfileCustomFields) UnmarshalJSON(b []byte) error
- type UserProfileStatusEmojiDisplayInfo
- type UserSetPhotoParams
- type UserTypingEvent
- type VideoBlock
- func (s VideoBlock) BlockType() MessageBlockType
- func (s VideoBlock) ID() string
- func (s *VideoBlock) WithAuthorName(authorName string) *VideoBlock
- func (s *VideoBlock) WithDescription(description *TextBlockObject) *VideoBlock
- func (s *VideoBlock) WithProviderIconURL(providerIconURL string) *VideoBlock
- func (s *VideoBlock) WithProviderName(providerName string) *VideoBlock
- func (s *VideoBlock) WithTitleURL(titleURL string) *VideoBlock
- type View
- type ViewClosedCallback
- type ViewResponse
- type ViewResponseAction
- type ViewState
- type ViewSubmissionCallback
- type ViewSubmissionCallbackResponseURL
- type ViewSubmissionResponse
- func NewClearViewSubmissionResponse() *ViewSubmissionResponse
- func NewErrorsViewSubmissionResponse(errors map[string]string) *ViewSubmissionResponse
- func NewPushViewSubmissionResponse(view *ModalViewRequest) *ViewSubmissionResponse
- func NewUpdateViewSubmissionResponse(view *ModalViewRequest) *ViewSubmissionResponse
- type ViewType
- type WebhookMessage
- type WorkflowStep
- type WorkflowStepCompleteResponse
- type WorkflowStepCompletedRequest
- type WorkflowStepCompletedRequestOption
- type WorkflowStepFailedRequest
- type WorkflowStepInputElement
- type WorkflowStepInputs
- type WorkflowStepOutput
Examples ¶
Constants ¶
const ( METCheckboxGroups MessageElementType = "checkboxes" METImage MessageElementType = "image" METButton MessageElementType = "button" METOverflow MessageElementType = "overflow" METDatepicker MessageElementType = "datepicker" METTimepicker MessageElementType = "timepicker" METDatetimepicker MessageElementType = "datetimepicker" METPlainTextInput MessageElementType = "plain_text_input" METRadioButtons MessageElementType = "radio_buttons" METRichTextInput MessageElementType = "rich_text_input" METEmailTextInput MessageElementType = "email_text_input" METURLTextInput MessageElementType = "url_text_input" METNumber MessageElementType = "number_input" METFileInput MessageElementType = "file_input" MixedElementImage MixedElementType = "mixed_image" MixedElementText MixedElementType = "mixed_text" OptTypeStatic string = "static_select" OptTypeExternal string = "external_select" OptTypeUser string = "users_select" OptTypeConversations string = "conversations_select" OptTypeChannels string = "channels_select" MultiOptTypeStatic string = "multi_static_select" MultiOptTypeExternal string = "multi_external_select" MultiOptTypeUser string = "multi_users_select" MultiOptTypeConversations string = "multi_conversations_select" MultiOptTypeChannels string = "multi_channels_select" )
const ( MarkdownType = "mrkdwn" PlainTextType = "plain_text" )
blockObject object types
const ( DEFAULT_MESSAGE_USERNAME = "" DEFAULT_MESSAGE_REPLY_BROADCAST = false DEFAULT_MESSAGE_ASUSER = false DEFAULT_MESSAGE_PARSE = "" DEFAULT_MESSAGE_THREAD_TIMESTAMP = "" DEFAULT_MESSAGE_LINK_NAMES = 0 DEFAULT_MESSAGE_UNFURL_LINKS = false DEFAULT_MESSAGE_UNFURL_MEDIA = true DEFAULT_MESSAGE_ICON_URL = "" DEFAULT_MESSAGE_ICON_EMOJI = "" DEFAULT_MESSAGE_MARKDOWN = true DEFAULT_MESSAGE_ESCAPE_TEXT = true )
const ( ErrAlreadyDisconnected = errorsx.String("Invalid call to Disconnect - Slack API is already disconnected") ErrRTMDisconnected = errorsx.String("disconnect received while trying to connect") ErrRTMGoodbye = errorsx.String("goodbye detected") ErrRTMDeadman = errorsx.String("deadman switch triggered") ErrParametersMissing = errorsx.String("received empty parameters") ErrBlockIDNotUnique = errorsx.String("Block ID needs to be unique") ErrInvalidConfiguration = errorsx.String("invalid configuration") ErrMissingHeaders = errorsx.String("missing headers") ErrExpiredTimestamp = errorsx.String("timestamp is too old") )
Errors returned by various methods.
const ( // Add here the defaults in the site DEFAULT_FILES_USER = "" DEFAULT_FILES_CHANNEL = "" DEFAULT_FILES_TS_FROM = 0 DEFAULT_FILES_TS_TO = -1 DEFAULT_FILES_TYPES = "all" DEFAULT_FILES_COUNT = 100 DEFAULT_FILES_PAGE = 1 DEFAULT_FILES_SHOW_HIDDEN = false )
const ( DEFAULT_HISTORY_LATEST = "" DEFAULT_HISTORY_OLDEST = "0" DEFAULT_HISTORY_COUNT = 100 DEFAULT_HISTORY_INCLUSIVE = false DEFAULT_HISTORY_UNREADS = false )
const ( InteractionTypeDialogCancellation = InteractionType("dialog_cancellation") InteractionTypeDialogSubmission = InteractionType("dialog_submission") InteractionTypeDialogSuggestion = InteractionType("dialog_suggestion") InteractionTypeInteractionMessage = InteractionType("interactive_message") InteractionTypeMessageAction = InteractionType("message_action") InteractionTypeBlockActions = InteractionType("block_actions") InteractionTypeBlockSuggestion = InteractionType("block_suggestion") InteractionTypeViewSubmission = InteractionType("view_submission") InteractionTypeViewClosed = InteractionType("view_closed") InteractionTypeShortcut = InteractionType("shortcut") InteractionTypeWorkflowStepEdit = InteractionType("workflow_step_edit") )
Types of interactions that can be received.
const ( TYPE_MESSAGE = "message" TYPE_FILE = "file" TYPE_FILE_COMMENT = "file_comment" TYPE_CHANNEL = "channel" TYPE_IM = "im" TYPE_GROUP = "group" )
const ( MsgSubTypeBotMessage = "bot_message" // [Events API, RTM] A message was posted by an integration MsgSubTypeMeMessage = "me_message" // [Events API, RTM] A /me message was sent MsgSubTypeMessageChanged = "message_changed" // [Events API, RTM] A message was changed MsgSubTypeMessageDeleted = "message_deleted" // [Events API, RTM] A message was deleted MsgSubTypeMessageReplied = "message_replied" // [Events API, RTM] A message thread received a reply MsgSubTypeReplyBroadcast = "reply_broadcast" // @Deprecated (No longer served) A message thread's reply was broadcast to a channel MsgSubTypeThreadBroadcast = "thread_broadcast" // [Events API, RTM] A message thread's reply was broadcast to a channel MsgSubTypeChannelJoin = "channel_join" // [Events API, RTM] A member joined a channel MsgSubTypeChannelLeave = "channel_leave" // [Events API, RTM] A member left a channel MsgSubTypeChannelTopic = "channel_topic" // [Events API, RTM] A channel topic was updated MsgSubTypeChannelPurpose = "channel_purpose" // [Events API, RTM] A channel purpose was updated MsgSubTypeChannelName = "channel_name" // [Events API, RTM] A channel was renamed MsgSubTypeChannelArchive = "channel_archive" // [Events API, RTM] A channel was archived MsgSubTypeChannelUnarchive = "channel_unarchive" // [Events API, RTM] A channel was unarchived MsgSubTypeGroupJoin = "group_join" // [RTM] A member joined a group MsgSubTypeGroupLeave = "group_leave" // [RTM] A member left a group MsgSubTypeGroupTopic = "group_topic" // [RTM] A group topic was updated MsgSubTypeGroupPurpose = "group_purpose" // [RTM] A group purpose was updated MsgSubTypeGroupName = "group_name" // [RTM] A group was renamed MsgSubTypeGroupArchive = "group_archive" // [RTM] A group was archived MsgSubTypeGroupUnarchive = "group_unarchive" // [RTM] A group was unarchived MsgSubTypeFileComment = "file_comment" // [RTM] A comment was added to a file MsgSubTypeGileMention = "file_mention" // [RTM] A file was mentioned in a channel MsgSubTypePinnedItem = "pinned_item" // [RTM] An item was pinned in a channel MsgSubTypeUnpinnedItem = "unpinned_item" // [RTM] An item was unpinned from a channel MsgSubTypeEkmAccessDenied = "ekm_access_denied" // [Events API, RTM] Message content redacted due to Enterprise Key Management (EKM) MsgSubTypeChannelPostingPermissions = "channel_posting_permissions" // [Events API, RTM] The posting permissions for a channel changed MsgSubTypeAssistantAppThread = "assistant_app_thread" // [Events API, RTM] The message is an app assistant thread )
Msg SubTypes (https://api.slack.com/events/message)
const ( // ResponseTypeInChannel in channel response for slash commands. ResponseTypeInChannel = "in_channel" // ResponseTypeEphemeral ephemeral response for slash commands. ResponseTypeEphemeral = "ephemeral" )
const ( DEFAULT_REACTIONS_USER = "" DEFAULT_REACTIONS_COUNT = 100 DEFAULT_REACTIONS_PAGE = 1 DEFAULT_REACTIONS_FULL = false )
const ( DEFAULT_REMOTE_FILES_CHANNEL = "" DEFAULT_REMOTE_FILES_TS_FROM = 0 DEFAULT_REMOTE_FILES_TS_TO = -1 DEFAULT_REMOTE_FILES_COUNT = 100 )
const ( DEFAULT_SEARCH_SORT = "score" DEFAULT_SEARCH_SORT_DIR = "desc" DEFAULT_SEARCH_HIGHLIGHT = false DEFAULT_SEARCH_COUNT = 20 DEFAULT_SEARCH_PAGE = 1 )
const ( // APIURL of the slack api. APIURL = "https://slack.com/api/" // WEBAPIURLFormat ... WEBAPIURLFormat = "https://%s.slack.com/api/users.admin.%s?t=%d" )
const ( DEFAULT_STARS_USER = "" DEFAULT_STARS_COUNT = 100 DEFAULT_STARS_PAGE = 1 )
const ( DEFAULT_LOGINS_COUNT = 100 DEFAULT_LOGINS_PAGE = 1 )
const ( DEFAULT_USER_PHOTO_CROP_X = -1 DEFAULT_USER_PHOTO_CROP_Y = -1 DEFAULT_USER_PHOTO_CROP_W = -1 )
const ( // MaxMessageTextLength is the current maximum message length in number of characters as defined here // https://api.slack.com/rtm#limits MaxMessageTextLength = 4000 )
Variables ¶
var EventMapping = map[string]interface{}{ "message": MessageEvent{}, "presence_change": PresenceChangeEvent{}, "user_typing": UserTypingEvent{}, "channel_marked": ChannelMarkedEvent{}, "channel_created": ChannelCreatedEvent{}, "channel_joined": ChannelJoinedEvent{}, "channel_left": ChannelLeftEvent{}, "channel_deleted": ChannelDeletedEvent{}, "channel_rename": ChannelRenameEvent{}, "channel_archive": ChannelArchiveEvent{}, "channel_unarchive": ChannelUnarchiveEvent{}, "channel_history_changed": ChannelHistoryChangedEvent{}, "dnd_updated": DNDUpdatedEvent{}, "dnd_updated_user": DNDUpdatedEvent{}, "im_created": IMCreatedEvent{}, "im_open": IMOpenEvent{}, "im_close": IMCloseEvent{}, "im_marked": IMMarkedEvent{}, "im_history_changed": IMHistoryChangedEvent{}, "group_marked": GroupMarkedEvent{}, "group_open": GroupOpenEvent{}, "group_joined": GroupJoinedEvent{}, "group_left": GroupLeftEvent{}, "group_close": GroupCloseEvent{}, "group_rename": GroupRenameEvent{}, "group_archive": GroupArchiveEvent{}, "group_unarchive": GroupUnarchiveEvent{}, "group_history_changed": GroupHistoryChangedEvent{}, "file_created": FileCreatedEvent{}, "file_shared": FileSharedEvent{}, "file_unshared": FileUnsharedEvent{}, "file_public": FilePublicEvent{}, "file_private": FilePrivateEvent{}, "file_change": FileChangeEvent{}, "file_deleted": FileDeletedEvent{}, "file_comment_added": FileCommentAddedEvent{}, "file_comment_edited": FileCommentEditedEvent{}, "file_comment_deleted": FileCommentDeletedEvent{}, "pin_added": PinAddedEvent{}, "pin_removed": PinRemovedEvent{}, "star_added": StarAddedEvent{}, "star_removed": StarRemovedEvent{}, "reaction_added": ReactionAddedEvent{}, "reaction_removed": ReactionRemovedEvent{}, "pref_change": PrefChangeEvent{}, "team_join": TeamJoinEvent{}, "team_rename": TeamRenameEvent{}, "team_pref_change": TeamPrefChangeEvent{}, "team_domain_change": TeamDomainChangeEvent{}, "team_migration_started": TeamMigrationStartedEvent{}, "manual_presence_change": ManualPresenceChangeEvent{}, "user_change": UserChangeEvent{}, "emoji_changed": EmojiChangedEvent{}, "commands_changed": CommandsChangedEvent{}, "email_domain_changed": EmailDomainChangedEvent{}, "bot_added": BotAddedEvent{}, "bot_changed": BotChangedEvent{}, "accounts_changed": AccountsChangedEvent{}, "reconnect_url": ReconnectUrlEvent{}, "member_joined_channel": MemberJoinedChannelEvent{}, "member_left_channel": MemberLeftChannelEvent{}, "subteam_created": SubteamCreatedEvent{}, "subteam_members_changed": SubteamMembersChangedEvent{}, "subteam_self_added": SubteamSelfAddedEvent{}, "subteam_self_removed": SubteamSelfRemovedEvent{}, "subteam_updated": SubteamUpdatedEvent{}, "desktop_notification": DesktopNotificationEvent{}, "mobile_in_app_notification": MobileInAppNotificationEvent{}, }
EventMapping holds a mapping of event names to their corresponding struct implementations. The structs should be instances of the unmarshalling target for the matching event type.
Functions ¶
func GetOAuthToken ¶
func GetOAuthToken(client httpClient, clientID, clientSecret, code, redirectURI string) (accessToken string, scope string, err error)
GetOAuthToken retrieves an AccessToken. For more details, see GetOAuthTokenContext documentation.
func GetOAuthTokenContext ¶ added in v0.2.0
func GetOAuthTokenContext(ctx context.Context, client httpClient, clientID, clientSecret, code, redirectURI string) (accessToken string, scope string, err error)
GetOAuthTokenContext retrieves an AccessToken with a custom context. For more details, see GetOAuthResponseContext documentation.
func OptionAPIURL ¶ added in v0.6.1
OptionAPIURL set the url for the client. only useful for testing.
func OptionAppLevelToken ¶ added in v0.7.2
OptionAppLevelToken sets an app-level token for the client.
func OptionConfigRefreshToken ¶ added in v0.12.3
OptionConfigRefreshToken sets a configuration refresh token for the client.
func OptionConfigToken ¶ added in v0.12.3
OptionConfigToken sets a configuration token for the client.
func OptionDebug ¶ added in v0.5.0
OptionDebug enable debugging for the client
func OptionHTTPClient ¶ added in v0.2.0
func OptionHTTPClient(client httpClient) func(*Client)
OptionHTTPClient - provide a custom http client to the slack client.
func OptionLog ¶ added in v0.5.0
func OptionLog(l logger) func(*Client)
OptionLog set logging for client.
func PostWebhook ¶ added in v0.4.0
func PostWebhook(url string, msg *WebhookMessage) error
func PostWebhookContext ¶ added in v0.6.3
func PostWebhookContext(ctx context.Context, url string, msg *WebhookMessage) error
func PostWebhookCustomHTTP ¶ added in v0.6.1
func PostWebhookCustomHTTP(url string, httpClient *http.Client, msg *WebhookMessage) error
func PostWebhookCustomHTTPContext ¶ added in v0.6.3
func UnsafeApplyMsgOptions ¶ added in v0.4.0
func UnsafeApplyMsgOptions(token, channel, apiurl string, options ...MsgOption) (string, url.Values, error)
UnsafeApplyMsgOptions utility function for debugging/testing chat requests. NOTE: USE AT YOUR OWN RISK: No issues relating to the use of this function will be supported by the library.
func ValidateUniqueBlockID ¶ added in v0.6.6
func ValidateUniqueBlockID(view ModalViewRequest) bool
ValidateUniqueBlockID will verify if each input block has a unique block ID if set
Types ¶
type AccessLogParameters ¶ added in v0.1.0
AccessLogParameters contains all the parameters necessary (including the optional ones) for a GetAccessLogs() request
func NewAccessLogParameters ¶ added in v0.1.0
func NewAccessLogParameters() AccessLogParameters
NewAccessLogParameters provides an instance of AccessLogParameters with all the sane default values set
type Accessory ¶ added in v0.6.1
type Accessory struct { ImageElement *ImageBlockElement ButtonElement *ButtonBlockElement OverflowElement *OverflowBlockElement DatePickerElement *DatePickerBlockElement TimePickerElement *TimePickerBlockElement PlainTextInputElement *PlainTextInputBlockElement RichTextInputElement *RichTextInputBlockElement RadioButtonsElement *RadioButtonsBlockElement SelectElement *SelectBlockElement MultiSelectElement *MultiSelectBlockElement CheckboxGroupsBlockElement *CheckboxGroupsBlockElement UnknownElement *UnknownBlockElement }
func NewAccessory ¶ added in v0.6.1
func NewAccessory(element BlockElement) *Accessory
NewAccessory returns a new Accessory for a given block element
func (*Accessory) MarshalJSON ¶ added in v0.6.1
MarshalJSON implements the Marshaller interface for Accessory so that any JSON marshalling is delegated and proper type determination can be made before marshal
func (*Accessory) UnmarshalJSON ¶ added in v0.6.1
UnmarshalJSON implements the Unmarshaller interface for Accessory, so that any JSON unmarshalling is delegated and proper type determination can be made before unmarshal Note: datetimepicker is not supported in Accessory
type AccountsChangedEvent ¶
type AccountsChangedEvent struct {
Type string `json:"type"`
}
AccountsChangedEvent represents the accounts changed event
type AckErrorEvent ¶ added in v0.1.0
AckErrorEvent i
func (*AckErrorEvent) Error ¶ added in v0.1.0
func (a *AckErrorEvent) Error() string
type AckMessage ¶
type AckMessage struct { ReplyTo int `json:"reply_to"` Timestamp string `json:"ts"` Text string `json:"text"` RTMResponse }
AckMessage is used for messages received in reply to other messages
type ActionBlock ¶ added in v0.6.1
type ActionBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` Elements *BlockElements `json:"elements"` }
ActionBlock defines data that is used to hold interactive elements.
More Information: https://api.slack.com/reference/messaging/blocks#actions
func NewActionBlock ¶ added in v0.6.1
func NewActionBlock(blockID string, elements ...BlockElement) *ActionBlock
NewActionBlock returns a new instance of an Action Block
func (ActionBlock) BlockType ¶ added in v0.6.1
func (s ActionBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (ActionBlock) ID ¶ added in v0.16.0
func (s ActionBlock) ID() string
ID returns the ID of the block
type ActionCallbacks ¶ added in v0.6.1
type ActionCallbacks struct { AttachmentActions []*AttachmentAction BlockActions []*BlockAction }
ActionCallback is a convenience struct defined to allow dynamic unmarshalling of the "actions" value in Slack's JSON response, which varies depending on block type
func (ActionCallbacks) MarshalJSON ¶ added in v0.6.1
func (a ActionCallbacks) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaller interface in order to combine both action callback types back into a single array, like how the api responds. This makes Marshaling and Unmarshaling an InteractionCallback symmetrical
func (*ActionCallbacks) UnmarshalJSON ¶ added in v0.6.1
func (a *ActionCallbacks) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Marshaller interface in order to delegate marshalling and allow for proper type assertion when decoding the response
type ActionType ¶ added in v0.9.0
type ActionType string
ActionType type represents the type of action (attachment, block, etc.)
type AddBookmarkParameters ¶ added in v0.11.0
type AddCallParameters ¶ added in v0.15.0
type AppHome ¶ added in v0.12.3
type AppHome struct { HomeTabEnabled bool `json:"home_tab_enabled,omitempty" yaml:"home_tab_enabled,omitempty"` MessagesTabEnabled bool `json:"messages_tab_enabled,omitempty" yaml:"messages_tab_enabled,omitempty"` MessagesTabReadOnlyEnabled bool `json:"messages_tab_read_only_enabled,omitempty" yaml:"messages_tab_read_only_enabled,omitempty"` }
AppHome is a group of settings that describe the App Home configuration
type AssistantThreadsPrompt ¶ added in v0.16.0
AssistantThreadPrompt is a suggested prompt for a thread
type AssistantThreadsSetStatusParameters ¶ added in v0.16.0
type AssistantThreadsSetStatusParameters struct { ChannelID string `json:"channel_id"` Status string `json:"status"` ThreadTS string `json:"thread_ts"` }
AssistantThreadSetStatusParameters are the parameters for AssistantThreadSetStatus
type AssistantThreadsSetSuggestedPromptsParameters ¶ added in v0.16.0
type AssistantThreadsSetSuggestedPromptsParameters struct { Title string `json:"title"` ChannelID string `json:"channel_id"` ThreadTS string `json:"thread_ts"` Prompts []AssistantThreadsPrompt `json:"prompts"` }
AssistantThreadSetSuggestedPromptsParameters are the parameters for AssistantThreadSetSuggestedPrompts
func (*AssistantThreadsSetSuggestedPromptsParameters) AddPrompt ¶ added in v0.16.0
func (p *AssistantThreadsSetSuggestedPromptsParameters) AddPrompt(title, message string)
AssistantThreadSetSuggestedPrompts sets the suggested prompts for a thread
type AssistantThreadsSetTitleParameters ¶ added in v0.16.0
type AssistantThreadsSetTitleParameters struct { ChannelID string `json:"channel_id"` ThreadTS string `json:"thread_ts"` Title string `json:"title"` }
AssistantThreadSetTitleParameters are the parameters for AssistantThreadSetTitle
type Attachment ¶
type Attachment struct { Color string `json:"color,omitempty"` Fallback string `json:"fallback,omitempty"` CallbackID string `json:"callback_id,omitempty"` ID int `json:"id,omitempty"` AuthorID string `json:"author_id,omitempty"` AuthorName string `json:"author_name,omitempty"` AuthorSubname string `json:"author_subname,omitempty"` AuthorLink string `json:"author_link,omitempty"` AuthorIcon string `json:"author_icon,omitempty"` Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` Pretext string `json:"pretext,omitempty"` Text string `json:"text,omitempty"` ImageURL string `json:"image_url,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` ServiceName string `json:"service_name,omitempty"` ServiceIcon string `json:"service_icon,omitempty"` FromURL string `json:"from_url,omitempty"` OriginalURL string `json:"original_url,omitempty"` Fields []AttachmentField `json:"fields,omitempty"` Actions []AttachmentAction `json:"actions,omitempty"` MarkdownIn []string `json:"mrkdwn_in,omitempty"` Blocks Blocks `json:"blocks,omitempty"` Ts json.Number `json:"ts,omitempty"` }
Attachment contains all the information for an attachment
type AttachmentAction ¶ added in v0.1.0
type AttachmentAction struct { Name string `json:"name"` // Required. Text string `json:"text"` // Required. Style string `json:"style,omitempty"` // Optional. Allowed values: "default", "primary", "danger". Type ActionType `json:"type"` // Required. Must be set to "button" or "select". Value string `json:"value,omitempty"` // Optional. DataSource string `json:"data_source,omitempty"` // Optional. MinQueryLength int `json:"min_query_length,omitempty"` // Optional. Default value is 1. Options []AttachmentActionOption `json:"options,omitempty"` // Optional. Maximum of 100 options can be provided in each menu. SelectedOptions []AttachmentActionOption `json:"selected_options,omitempty"` // Optional. The first element of this array will be set as the pre-selected option for this menu. OptionGroups []AttachmentActionOptionGroup `json:"option_groups,omitempty"` // Optional. Confirm *ConfirmationField `json:"confirm,omitempty"` // Optional. URL string `json:"url,omitempty"` // Optional. }
AttachmentAction is a button or menu to be included in the attachment. Required when using message buttons or menus and otherwise not useful. A maximum of 5 actions may be provided per attachment.
type AttachmentActionCallback ¶ added in v0.1.0
type AttachmentActionCallback InteractionCallback
AttachmentActionCallback is sent from Slack when a user clicks a button in an interactive message (aka AttachmentAction) DEPRECATED: use InteractionCallback
type AttachmentActionOption ¶ added in v0.1.0
type AttachmentActionOption struct { Text string `json:"text"` // Required. Value string `json:"value"` // Required. Description string `json:"description,omitempty"` // Optional. Up to 30 characters. }
AttachmentActionOption the individual option to appear in action menu.
type AttachmentActionOptionGroup ¶ added in v0.1.0
type AttachmentActionOptionGroup struct { Text string `json:"text"` // Required. Options []AttachmentActionOption `json:"options"` // Required. }
AttachmentActionOptionGroup is a semi-hierarchal way to list available options to appear in action menu.
type AttachmentField ¶
type AttachmentField struct { Title string `json:"title"` Value string `json:"value"` Short bool `json:"short"` }
AttachmentField contains information for an attachment field An Attachment can contain multiple of these
type AuditChannel ¶ added in v0.9.2
type AuditEnterprise ¶ added in v0.9.2
type AuditEntry ¶ added in v0.9.2
type AuditEntry struct { ID string `json:"id"` DateCreate int `json:"date_create"` Action string `json:"action"` Actor struct { Type string `json:"type"` User AuditUser `json:"user"` } `json:"actor"` Entity struct { Type string `json:"type"` // Only one of the below will be completed, based on the value of Type a user, a channel, a file, an app, a workspace, or an enterprise User AuditUser `json:"user"` Channel AuditChannel `json:"channel"` File AuditFile `json:"file"` App AuditApp `json:"app"` Workspace AuditWorkspace `json:"workspace"` Enterprise AuditEnterprise `json:"enterprise"` } `json:"entity"` Context struct { Location struct { Type string `json:"type"` ID string `json:"id"` Name string `json:"name"` Domain string `json:"domain"` } `json:"location"` UA string `json:"ua"` IPAddress string `json:"ip_address"` } `json:"context"` Details struct { NewValue interface{} `json:"new_value"` PreviousValue interface{} `json:"previous_value"` MobileOnly bool `json:"mobile_only"` WebOnly bool `json:"web_only"` NonSSOOnly bool `json:"non_sso_only"` ExportType string `json:"export_type"` ExportStart string `json:"export_start_ts"` ExportEnd string `json:"export_end_ts"` } `json:"details"` }
type AuditLogParameters ¶ added in v0.9.2
type AuditLogParameters struct { Limit int Cursor string Latest int Oldest int Action string Actor string Entity string }
AuditLogParameters contains all the parameters necessary (including the optional ones) for a GetAuditLogs() request
type AuditLogResponse ¶ added in v0.9.2
type AuditLogResponse struct { Entries []AuditEntry `json:"entries"` SlackResponse }
type AuditWorkspace ¶ added in v0.9.2
type AuthRevokeResponse ¶ added in v0.5.0
type AuthRevokeResponse struct { SlackResponse // Contains the "ok", and "Error", if any Revoked bool `json:"revoked,omitempty"` }
AuthRevokeResponse contains our Auth response from the auth.revoke endpoint
type AuthTestResponse ¶
type AuthTestResponse struct { URL string `json:"url"` Team string `json:"team"` User string `json:"user"` TeamID string `json:"team_id"` UserID string `json:"user_id"` // EnterpriseID is only returned when an enterprise id present EnterpriseID string `json:"enterprise_id,omitempty"` BotID string `json:"bot_id"` }
AuthTestResponse ...
type BillableInfoResponse ¶ added in v0.1.0
type BillableInfoResponse struct { BillableInfo map[string]BillingActive `json:"billable_info"` SlackResponse }
type BillingActive ¶ added in v0.1.0
type BillingActive struct {
BillingActive bool `json:"billing_active"`
}
type Block ¶ added in v0.6.1
type Block interface { BlockType() MessageBlockType ID() string }
Block defines an interface all block types should implement to ensure consistency between blocks.
type BlockAction ¶ added in v0.6.1
type BlockAction struct { ActionID string `json:"action_id"` BlockID string `json:"block_id"` Type ActionType `json:"type"` Text TextBlockObject `json:"text"` Value string `json:"value"` Files []File `json:"files"` ActionTs string `json:"action_ts"` SelectedOption OptionBlockObject `json:"selected_option"` SelectedOptions []OptionBlockObject `json:"selected_options"` SelectedUser string `json:"selected_user"` SelectedUsers []string `json:"selected_users"` SelectedChannel string `json:"selected_channel"` SelectedChannels []string `json:"selected_channels"` SelectedConversation string `json:"selected_conversation"` SelectedConversations []string `json:"selected_conversations"` SelectedDate string `json:"selected_date"` SelectedTime string `json:"selected_time"` SelectedDateTime int64 `json:"selected_date_time"` InitialOption OptionBlockObject `json:"initial_option"` InitialUser string `json:"initial_user"` InitialChannel string `json:"initial_channel"` InitialConversation string `json:"initial_conversation"` InitialDate string `json:"initial_date"` InitialTime string `json:"initial_time"` }
BlockAction is the action callback sent when a block is interacted with
type BlockActionStates ¶ added in v0.7.1
type BlockActionStates struct {
Values map[string]map[string]BlockAction `json:"values"`
}
type BlockElement ¶ added in v0.6.1
type BlockElement interface {
ElementType() MessageElementType
}
BlockElement defines an interface that all block element types should implement.
type BlockElements ¶ added in v0.6.1
type BlockElements struct {
ElementSet []BlockElement `json:"elements,omitempty"`
}
BlockElements is a convenience struct defined to allow dynamic unmarshalling of the "elements" value in Slack's JSON response, which varies depending on BlockElement type
func (*BlockElements) MarshalJSON ¶ added in v0.6.1
func (b *BlockElements) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaller interface for BlockElements so that any JSON marshalling is delegated and proper type determination can be made before marshal
func (*BlockElements) UnmarshalJSON ¶ added in v0.6.1
func (b *BlockElements) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaller interface for BlockElements, so that any JSON unmarshalling is delegated and proper type determination can be made before unmarshal
type BlockObjects ¶ added in v0.6.1
type BlockObjects struct { TextObjects []*TextBlockObject ConfirmationObjects []*ConfirmationBlockObject OptionObjects []*OptionBlockObject OptionGroupObjects []*OptionGroupBlockObject }
func (*BlockObjects) UnmarshalJSON ¶ added in v0.6.1
func (b *BlockObjects) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaller interface for BlockObjects, so that any JSON unmarshalling is delegated and proper type determination can be made before unmarshal
type Blocks ¶ added in v0.6.1
type Blocks struct {
BlockSet []Block `json:"blocks,omitempty"`
}
Blocks is a convenience struct defined to allow dynamic unmarshalling of the "blocks" value in Slack's JSON response, which varies depending on block type
func (Blocks) MarshalJSON ¶ added in v0.6.1
MarshalJSON implements the Marshaller interface for Blocks so that any JSON marshalling is delegated and proper type determination can be made before marshal
func (*Blocks) UnmarshalJSON ¶ added in v0.6.1
UnmarshalJSON implements the Unmarshaller interface for Blocks, so that any JSON unmarshalling is delegated and proper type determination can be made before unmarshal
type Bookmark ¶ added in v0.11.0
type Bookmark struct { ID string `json:"id"` ChannelID string `json:"channel_id"` Title string `json:"title"` Link string `json:"link"` Emoji string `json:"emoji"` IconURL string `json:"icon_url"` Type string `json:"type"` Created JSONTime `json:"date_created"` Updated JSONTime `json:"date_updated"` Rank string `json:"rank"` LastUpdatedByUserID string `json:"last_updated_by_user_id"` LastUpdatedByTeamID string `json:"last_updated_by_team_id"` ShortcutID string `json:"shortcut_id"` EntityID string `json:"entity_id"` AppID string `json:"app_id"` }
type Bot ¶
type Bot struct { ID string `json:"id"` Name string `json:"name"` Deleted bool `json:"deleted"` UserID string `json:"user_id"` AppID string `json:"app_id"` Updated JSONTime `json:"updated"` Icons Icons `json:"icons"` }
Bot contains information about a bot
type BotAddedEvent ¶
BotAddedEvent represents the bot added event
type BotChangedEvent ¶
BotChangedEvent represents the bot changed event
type BotProfile ¶ added in v0.7.0
type BotProfile struct { AppID string `json:"app_id,omitempty"` Deleted bool `json:"deleted,omitempty"` Icons *Icons `json:"icons,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` TeamID string `json:"team_id,omitempty"` Updated int64 `json:"updated,omitempty"` }
BotProfile contains information about a bot
type BotUser ¶ added in v0.12.3
type BotUser struct { DisplayName string `json:"display_name" yaml:"display_name"` AlwaysOnline bool `json:"always_online,omitempty" yaml:"always_online,omitempty"` }
BotUser is a group of settings that describe bot user configuration
type ButtonBlockElement ¶ added in v0.6.1
type ButtonBlockElement struct { Type MessageElementType `json:"type,omitempty"` Text *TextBlockObject `json:"text"` ActionID string `json:"action_id,omitempty"` URL string `json:"url,omitempty"` Value string `json:"value,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` Style Style `json:"style,omitempty"` }
ButtonBlockElement defines an interactive element that inserts a button. The button can be a trigger for anything from opening a simple link to starting a complex workflow.
More Information: https://api.slack.com/reference/messaging/block-elements#button
func NewButtonBlockElement ¶ added in v0.6.1
func NewButtonBlockElement(actionID, value string, text *TextBlockObject) *ButtonBlockElement
NewButtonBlockElement returns an instance of a new button element to be used within a block
func (ButtonBlockElement) ElementType ¶ added in v0.6.1
func (s ButtonBlockElement) ElementType() MessageElementType
ElementType returns the type of the element
func (*ButtonBlockElement) WithConfirm ¶ added in v0.10.3
func (s *ButtonBlockElement) WithConfirm(confirm *ConfirmationBlockObject) *ButtonBlockElement
WithConfirm adds a confirmation dialogue to the button object and returns the modified ButtonBlockElement
func (*ButtonBlockElement) WithStyle ¶ added in v0.6.1
func (s *ButtonBlockElement) WithStyle(style Style) *ButtonBlockElement
WithStyle adds styling to the button object and returns the modified ButtonBlockElement
func (*ButtonBlockElement) WithURL ¶ added in v0.12.4
func (s *ButtonBlockElement) WithURL(url string) *ButtonBlockElement
WithURL adds a URL for the button to link to and returns the modified ButtonBlockElement
type Call ¶ added in v0.15.0
type Call struct { ID string `json:"id"` Title string `json:"title"` DateStart JSONTime `json:"date_start"` DateEnd JSONTime `json:"date_end"` ExternalUniqueID string `json:"external_unique_id"` JoinURL string `json:"join_url"` DesktopAppJoinURL string `json:"desktop_app_join_url"` ExternalDisplayID string `json:"external_display_id"` Participants []CallParticipant `json:"users"` Channels []string `json:"channels"` }
type CallBlock ¶ added in v0.15.0
type CallBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` CallID string `json:"call_id"` }
CallBlock defines data that is used to display a call in slack.
More Information: https://api.slack.com/apis/calls#post_to_channel
func NewCallBlock ¶ added in v0.15.0
NewCallBlock returns a new instance of a call block
func (CallBlock) BlockType ¶ added in v0.15.0
func (s CallBlock) BlockType() MessageBlockType
BlockType returns the type of the block
type CallParticipant ¶ added in v0.15.0
type CallParticipant struct { SlackID string `json:"slack_id,omitempty"` ExternalID string `json:"external_id,omitempty"` DisplayName string `json:"display_name,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` }
CallParticipant is a thin user representation which has a SlackID, ExternalID, or both.
See: https://api.slack.com/apis/calls#users
func (CallParticipant) Valid ¶ added in v0.15.0
func (u CallParticipant) Valid() bool
Valid checks if the CallUser has a is valid with a SlackID or ExternalID or both.
type CanvasChange ¶ added in v0.15.0
type CanvasChange struct { Operation string `json:"operation"` SectionID string `json:"section_id,omitempty"` DocumentContent DocumentContent `json:"document_content"` }
type CanvasDetails ¶ added in v0.15.0
type CanvasDetails struct {
CanvasID string `json:"canvas_id"`
}
type CanvasSection ¶ added in v0.15.0
type CanvasSection struct {
ID string `json:"id"`
}
type Channel ¶
type Channel struct { GroupConversation IsChannel bool `json:"is_channel"` IsGeneral bool `json:"is_general"` IsMember bool `json:"is_member"` Locale string `json:"locale"` Properties *Properties `json:"properties"` }
Channel contains information about the channel
type ChannelArchiveEvent ¶
type ChannelArchiveEvent ChannelInfoEvent
ChannelArchiveEvent represents the Channel archive event
type ChannelCreatedEvent ¶
type ChannelCreatedEvent struct { Type string `json:"type"` Channel ChannelCreatedInfo `json:"channel"` EventTimestamp string `json:"event_ts"` }
ChannelCreatedEvent represents the Channel created event
type ChannelCreatedInfo ¶
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 ¶
type ChannelDeletedEvent ChannelInfoEvent
ChannelDeletedEvent represents the Channel deleted event
type ChannelHistoryChangedEvent ¶
type ChannelHistoryChangedEvent struct { Type string `json:"type"` Latest string `json:"latest"` Timestamp string `json:"ts"` EventTimestamp string `json:"event_ts"` }
ChannelHistoryChangedEvent represents the Channel history changed event
type ChannelInfoEvent ¶
type ChannelInfoEvent struct { // channel_left // channel_deleted // channel_archive // channel_unarchive Type string `json:"type"` Channel string `json:"channel"` User string `json:"user,omitempty"` Timestamp string `json:"ts,omitempty"` }
ChannelInfoEvent represents the Channel info event
type ChannelJoinedEvent ¶
ChannelJoinedEvent represents the Channel joined event
type ChannelLeftEvent ¶
type ChannelLeftEvent ChannelInfoEvent
ChannelLeftEvent represents the Channel left event
type ChannelMarkedEvent ¶
type ChannelMarkedEvent ChannelInfoEvent
ChannelMarkedEvent represents the Channel marked event
type ChannelRenameEvent ¶
type ChannelRenameEvent struct { Type string `json:"type"` Channel ChannelRenameInfo `json:"channel"` Timestamp string `json:"event_ts"` }
ChannelRenameEvent represents the Channel rename event
type ChannelRenameInfo ¶
type ChannelRenameInfo struct { ID string `json:"id"` Name string `json:"name"` Created int `json:"created"` }
ChannelRenameInfo represents the information associated with a Channel rename event
type ChannelUnarchiveEvent ¶
type ChannelUnarchiveEvent ChannelInfoEvent
ChannelUnarchiveEvent represents the Channel unarchive event
type CheckboxGroupsBlockElement ¶ added in v0.6.4
type CheckboxGroupsBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Options []*OptionBlockObject `json:"options"` InitialOptions []*OptionBlockObject `json:"initial_options,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
CheckboxGroupsBlockElement defines an element which allows users to choose one or more items from a list of possible options.
More Information: https://api.slack.com/reference/block-kit/block-elements#checkboxes
func NewCheckboxGroupsBlockElement ¶ added in v0.6.4
func NewCheckboxGroupsBlockElement(actionID string, options ...*OptionBlockObject) *CheckboxGroupsBlockElement
NewCheckboxGroupsBlockElement returns an instance of a checkbox-group block element
func (CheckboxGroupsBlockElement) ElementType ¶ added in v0.6.4
func (c CheckboxGroupsBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type Client ¶ added in v0.1.0
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddBookmark ¶ added in v0.11.0
func (api *Client) AddBookmark(channelID string, params AddBookmarkParameters) (Bookmark, error)
AddBookmark adds a bookmark in a channel. For more details, see AddBookmarkContext documentation.
func (*Client) AddBookmarkContext ¶ added in v0.11.0
func (api *Client) AddBookmarkContext(ctx context.Context, channelID string, params AddBookmarkParameters) (Bookmark, error)
AddBookmarkContext adds a bookmark in a channel with a custom context. Slack API docs: https://api.slack.com/methods/bookmarks.add
func (*Client) AddCall ¶ added in v0.15.0
func (api *Client) AddCall(params AddCallParameters) (Call, error)
AddCall adds a new Call to the Slack API.
func (*Client) AddCallContext ¶ added in v0.15.0
AddCallContext adds a new Call to the Slack API.
func (*Client) AddChannelReminder ¶ added in v0.5.0
AddChannelReminder adds a reminder for a channel. For more details, see AddChannelReminderContext documentation.
func (*Client) AddChannelReminderContext ¶ added in v0.10.3
func (api *Client) AddChannelReminderContext(ctx context.Context, channelID, text, time string) (*Reminder, error)
AddChannelReminderContext adds a reminder for a channel with a custom context NOTE: the ability to set reminders on a channel is currently undocumented but has been tested to work. Slack API docs: https://api.slack.com/methods/reminders.add
func (*Client) AddPin ¶ added in v0.1.0
AddPin pins an item in a channel. For more details, see AddPinContext documentation.
func (*Client) AddPinContext ¶ added in v0.2.0
AddPinContext pins an item in a channel with a custom context. Slack API docs: https://api.slack.com/methods/pins.add
func (*Client) AddReaction ¶ added in v0.1.0
AddReaction adds a reaction emoji to a message, file or file comment. For more details, see AddReactionContext documentation.
func (*Client) AddReactionContext ¶ added in v0.2.0
AddReactionContext adds a reaction emoji to a message, file or file comment with a custom context. Slack API docs: https://api.slack.com/methods/reactions.add
func (*Client) AddRemoteFile ¶ added in v0.11.0
func (api *Client) AddRemoteFile(params RemoteFileParameters) (*RemoteFile, error)
AddRemoteFile adds a remote file. Unlike regular files, remote files must be explicitly shared. For more details see the AddRemoteFileContext documentation.
func (*Client) AddRemoteFileContext ¶ added in v0.11.0
func (api *Client) AddRemoteFileContext(ctx context.Context, params RemoteFileParameters) (remotefile *RemoteFile, err error)
AddRemoteFileContext adds a remote file and setting a custom context Slack API docs: https://api.slack.com/methods/files.remote.add
func (*Client) AddStar ¶ added in v0.1.0
AddStar stars an item in a channel. For more information see the AddStarContext documentation.
func (*Client) AddStarContext ¶ added in v0.2.0
AddStarContext stars an item in a channel with a custom context. Slack API docs: https://api.slack.com/methods/stars.add
func (*Client) AddUserReminder ¶ added in v0.5.0
AddUserReminder adds a reminder for a user. For more details, see AddUserReminderContext documentation.
func (*Client) AddUserReminderContext ¶ added in v0.10.3
func (api *Client) AddUserReminderContext(ctx context.Context, userID, text, time string) (*Reminder, error)
AddUserReminderContext adds a reminder for a user with a custom context Slack API docs: https://api.slack.com/methods/reminders.add
func (*Client) ArchiveConversation ¶ added in v0.2.0
ArchiveConversation archives a conversation. For more details, see ArchiveConversationContext documentation.
func (*Client) ArchiveConversationContext ¶ added in v0.2.0
ArchiveConversationContext archives a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.archive
func (*Client) AuthTest ¶ added in v0.1.0
func (api *Client) AuthTest() (response *AuthTestResponse, error error)
AuthTest tests if the user is able to do authenticated requests or not
func (*Client) AuthTestContext ¶ added in v0.2.0
func (api *Client) AuthTestContext(ctx context.Context) (response *AuthTestResponse, err error)
AuthTestContext tests if the user is able to do authenticated requests or not with a custom context
func (*Client) CallAddParticipants ¶ added in v0.15.0
func (api *Client) CallAddParticipants(callID string, participants []CallParticipant) error
CallAddParticipants adds users to a Call.
func (*Client) CallAddParticipantsContext ¶ added in v0.15.0
func (api *Client) CallAddParticipantsContext(ctx context.Context, callID string, participants []CallParticipant) error
CallAddParticipantsContext adds users to a Call.
func (*Client) CallRemoveParticipants ¶ added in v0.15.0
func (api *Client) CallRemoveParticipants(callID string, participants []CallParticipant) error
CallRemoveParticipants removes users from a Call.
func (*Client) CallRemoveParticipantsContext ¶ added in v0.15.0
func (api *Client) CallRemoveParticipantsContext(ctx context.Context, callID string, participants []CallParticipant) error
CallRemoveParticipantsContext removes users from a Call.
func (*Client) CloseConversation ¶ added in v0.2.0
CloseConversation closes a direct message or multi-person direct message. For more details, see CloseConversationContext documentation.
func (*Client) CloseConversationContext ¶ added in v0.2.0
func (api *Client) CloseConversationContext(ctx context.Context, channelID string) (noOp bool, alreadyClosed bool, err error)
CloseConversationContext closes a direct message or multi-person direct message with a custom context. Slack API docs: https://api.slack.com/methods/conversations.close
func (*Client) ConnectRTM ¶ added in v0.1.0
ConnectRTM calls the "rtm.connect" endpoint and returns the provided URL and the compact Info block.
To have a fully managed Websocket connection, use `NewRTM`, and call `ManageConnection()` on it.
func (*Client) ConnectRTMContext ¶ added in v0.2.0
func (api *Client) ConnectRTMContext(ctx context.Context) (info *Info, websocketURL string, err error)
ConnectRTMContext calls the "rtm.connect" endpoint and returns the provided URL and the compact Info block with a custom context.
To have a fully managed Websocket connection, use `NewRTM`, and call `ManageConnection()` on it.
func (*Client) CreateCanvas ¶ added in v0.15.0
func (api *Client) CreateCanvas(title string, documentContent DocumentContent) (string, error)
CreateCanvas creates a new canvas. For more details, see CreateCanvasContext documentation.
func (*Client) CreateCanvasContext ¶ added in v0.15.0
func (api *Client) CreateCanvasContext(ctx context.Context, title string, documentContent DocumentContent) (string, error)
CreateCanvasContext creates a new canvas with a custom context. Slack API docs: https://api.slack.com/methods/canvases.create
func (*Client) CreateChannelCanvas ¶ added in v0.15.0
func (api *Client) CreateChannelCanvas(channel string, documentContent DocumentContent) (string, error)
CreateChannelCanvas creates a new canvas in a channel. For more details, see CreateChannelCanvasContext documentation.
func (*Client) CreateChannelCanvasContext ¶ added in v0.15.0
func (api *Client) CreateChannelCanvasContext(ctx context.Context, channel string, documentContent DocumentContent) (string, error)
CreateChannelCanvasContext creates a new canvas in a channel with a custom context. Slack API docs: https://api.slack.com/methods/conversations.canvases.create
func (*Client) CreateConversation ¶ added in v0.2.0
func (api *Client) CreateConversation(params CreateConversationParams) (*Channel, error)
CreateConversation initiates a public or private channel-based conversation. For more details, see CreateConversationContext documentation.
func (*Client) CreateConversationContext ¶ added in v0.2.0
func (api *Client) CreateConversationContext(ctx context.Context, params CreateConversationParams) (*Channel, error)
CreateConversationContext initiates a public or private channel-based conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.create
func (*Client) CreateManifest ¶ added in v0.12.3
func (api *Client) CreateManifest(manifest *Manifest, token string) (*ManifestResponse, error)
CreateManifest creates an app from an app manifest. For more details, see CreateManifestContext documentation.
func (*Client) CreateManifestContext ¶ added in v0.12.3
func (api *Client) CreateManifestContext(ctx context.Context, manifest *Manifest, token string) (*ManifestResponse, error)
CreateManifestContext creates an app from an app manifest with a custom context. Slack API docs: https://api.slack.com/methods/apps.manifest.create
func (*Client) CreateUserGroup ¶ added in v0.1.0
func (api *Client) CreateUserGroup(userGroup UserGroup, options ...CreateUserGroupOption) (UserGroup, error)
CreateUserGroup creates a new user group. For more information see the CreateUserGroupContext documentation.
func (*Client) CreateUserGroupContext ¶ added in v0.2.0
func (api *Client) CreateUserGroupContext(ctx context.Context, userGroup UserGroup, options ...CreateUserGroupOption) (UserGroup, error)
CreateUserGroupContext creates a new user group with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.create
func (*Client) Debugln ¶ added in v0.1.0
func (api *Client) Debugln(v ...interface{})
Debugln print a debug line.
func (*Client) DeleteCanvas ¶ added in v0.15.0
DeleteCanvas deletes an existing canvas. For more details, see DeleteCanvasContext documentation.
func (*Client) DeleteCanvasAccess ¶ added in v0.15.0
func (api *Client) DeleteCanvasAccess(params DeleteCanvasAccessParams) error
DeleteCanvasAccess removes access to a canvas for specified entities. For more details, see DeleteCanvasAccessContext documentation.
func (*Client) DeleteCanvasAccessContext ¶ added in v0.15.0
func (api *Client) DeleteCanvasAccessContext(ctx context.Context, params DeleteCanvasAccessParams) error
DeleteCanvasAccessContext removes access to a canvas for specified entities with a custom context. Slack API docs: https://api.slack.com/methods/canvases.access.delete
func (*Client) DeleteCanvasContext ¶ added in v0.15.0
DeleteCanvasContext deletes an existing canvas with a custom context. Slack API docs: https://api.slack.com/methods/canvases.delete
func (*Client) DeleteFile ¶ added in v0.1.0
DeleteFile deletes a file. For more details, see DeleteFileContext documentation.
func (*Client) DeleteFileComment ¶ added in v0.2.0
DeleteFileComment deletes a file's comment. For more details, see DeleteFileCommentContext documentation.
func (*Client) DeleteFileCommentContext ¶ added in v0.2.0
func (api *Client) DeleteFileCommentContext(ctx context.Context, fileID, commentID string) (err error)
DeleteFileCommentContext deletes a file's comment with a custom context. Slack API docs: https://api.slack.com/methods/files.comments.delete
func (*Client) DeleteFileContext ¶ added in v0.2.0
DeleteFileContext deletes a file with a custom context. Slack API docs: https://api.slack.com/methods/files.delete
func (*Client) DeleteManifest ¶ added in v0.12.3
func (api *Client) DeleteManifest(token string, appId string) (*SlackResponse, error)
DeleteManifest permanently deletes an app created through app manifests. For more details, see DeleteManifestContext documentation.
func (*Client) DeleteManifestContext ¶ added in v0.12.3
func (api *Client) DeleteManifestContext(ctx context.Context, token string, appId string) (*SlackResponse, error)
DeleteManifestContext permanently deletes an app created through app manifests with a custom context. Slack API docs: https://api.slack.com/methods/apps.manifest.delete
func (*Client) DeleteMessage ¶ added in v0.1.0
DeleteMessage deletes a message in a channel. For more details, see DeleteMessageContext documentation.
func (*Client) DeleteMessageContext ¶ added in v0.2.0
func (api *Client) DeleteMessageContext(ctx context.Context, channel, messageTimestamp string) (string, string, error)
DeleteMessageContext deletes a message in a channel with a custom context. Slack API docs: https://api.slack.com/methods/chat.delete
func (*Client) DeleteReminder ¶ added in v0.5.0
DeleteReminder deletes an existing reminder. For more details, see DeleteReminderContext documentation.
func (*Client) DeleteReminderContext ¶ added in v0.10.3
DeleteReminderContext deletes an existing reminder with a custom context Slack API docs: https://api.slack.com/methods/reminders.delete
func (*Client) DeleteScheduledMessage ¶ added in v0.6.3
func (api *Client) DeleteScheduledMessage(params *DeleteScheduledMessageParameters) (bool, error)
DeleteScheduledMessage deletes a pending scheduled message. For more details, see DeleteScheduledMessageContext documentation.
func (*Client) DeleteScheduledMessageContext ¶ added in v0.6.3
func (api *Client) DeleteScheduledMessageContext(ctx context.Context, params *DeleteScheduledMessageParameters) (bool, error)
DeleteScheduledMessageContext deletes a pending scheduled message with a custom context. Slack API docs: https://api.slack.com/methods/chat.deleteScheduledMessage
func (*Client) DeleteUserPhoto ¶ added in v0.1.0
DeleteUserPhoto deletes the current authenticated user's profile image. For more information see the DeleteUserPhotoContext documentation.
func (*Client) DeleteUserPhotoContext ¶ added in v0.2.0
DeleteUserPhotoContext deletes the current authenticated user's profile image with a custom context. Slack API docs: https://api.slack.com/methods/users.deletePhoto
func (*Client) DisableUser ¶ added in v0.1.0
DisableUser disabled a user account, given a user ID
func (*Client) DisableUserContext ¶ added in v0.2.0
DisableUserContext disabled a user account, given a user ID with a custom context
func (*Client) DisableUserGroup ¶ added in v0.1.0
DisableUserGroup disables an existing user group. For more information see the DisableUserGroupContext documentation.
func (*Client) DisableUserGroupContext ¶ added in v0.2.0
func (api *Client) DisableUserGroupContext(ctx context.Context, userGroup string) (UserGroup, error)
DisableUserGroupContext disables an existing user group with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.disable
func (*Client) EditBookmark ¶ added in v0.11.0
func (api *Client) EditBookmark(channelID, bookmarkID string, params EditBookmarkParameters) (Bookmark, error)
EditBookmark edits a bookmark in a channel. For more details, see EditBookmarkContext documentation.
func (*Client) EditBookmarkContext ¶ added in v0.11.0
func (api *Client) EditBookmarkContext(ctx context.Context, channelID, bookmarkID string, params EditBookmarkParameters) (Bookmark, error)
EditBookmarkContext edits a bookmark in a channel with a custom context. Slack API docs: https://api.slack.com/methods/bookmarks.edit
func (*Client) EditCanvas ¶ added in v0.15.0
func (api *Client) EditCanvas(params EditCanvasParams) error
EditCanvas edits an existing canvas. For more details, see EditCanvasContext documentation.
func (*Client) EditCanvasContext ¶ added in v0.15.0
func (api *Client) EditCanvasContext(ctx context.Context, params EditCanvasParams) error
EditCanvasContext edits an existing canvas with a custom context. Slack API docs: https://api.slack.com/methods/canvases.edit
func (*Client) EnableUserGroup ¶ added in v0.1.0
EnableUserGroup enables an existing user group. For more information see the EnableUserGroupContext documentation.
func (*Client) EnableUserGroupContext ¶ added in v0.2.0
EnableUserGroupContext enables an existing user group with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.enable
func (*Client) EndCall ¶ added in v0.15.0
func (api *Client) EndCall(callID string, params EndCallParameters) error
EndCall ends a Call.
func (*Client) EndCallContext ¶ added in v0.15.0
func (api *Client) EndCallContext(ctx context.Context, callID string, params EndCallParameters) error
EndCallContext ends a Call.
func (*Client) EndDND ¶ added in v0.1.0
EndDND ends the user's scheduled Do Not Disturb session. For more information see the EndDNDContext documentation.
func (*Client) EndDNDContext ¶ added in v0.2.0
EndDNDContext ends the user's scheduled Do Not Disturb session with a custom context. Slack API docs: https://api.slack.com/methods/dnd.endDnd
func (*Client) EndSnooze ¶ added in v0.1.0
EndSnooze ends the current user's snooze mode. For more information see the EndSnoozeContext documentation.
func (*Client) EndSnoozeContext ¶ added in v0.2.0
EndSnoozeContext ends the current user's snooze mode with a custom context. Slack API docs: https://api.slack.com/methods/dnd.endSnooze
func (*Client) ExportManifest ¶ added in v0.12.3
ExportManifest exports an app manifest from an existing app. For more details, see ExportManifestContext documentation.
func (*Client) ExportManifestContext ¶ added in v0.12.3
func (api *Client) ExportManifestContext(ctx context.Context, token string, appId string) (*Manifest, error)
ExportManifestContext exports an app manifest from an existing app with a custom context. Slack API docs: https://api.slack.com/methods/apps.manifest.export
func (*Client) FunctionCompleteError ¶ added in v0.15.0
FunctionCompleteError indicates function is completed with error
func (*Client) FunctionCompleteErrorContext ¶ added in v0.15.0
func (api *Client) FunctionCompleteErrorContext(ctx context.Context, functionExecutionID string, errorMessage string) error
FunctionCompleteErrorContext indicates function is completed with error
func (*Client) FunctionCompleteSuccess ¶ added in v0.15.0
func (api *Client) FunctionCompleteSuccess(functionExecutionId string, options ...FunctionCompleteSuccessRequestOption) error
FunctionCompleteSuccess indicates function is completed
func (*Client) FunctionCompleteSuccessContext ¶ added in v0.15.0
func (api *Client) FunctionCompleteSuccessContext(ctx context.Context, functionExecutionId string, options ...FunctionCompleteSuccessRequestOption) error
FunctionCompleteSuccess indicates function is completed
func (*Client) GetAccessLogs ¶ added in v0.1.0
func (api *Client) GetAccessLogs(params AccessLogParameters) ([]Login, *Paging, error)
GetAccessLogs retrieves a page of logins according to the parameters given. For more information see the GetAccessLogsContext documentation.
func (*Client) GetAccessLogsContext ¶ added in v0.2.0
func (api *Client) GetAccessLogsContext(ctx context.Context, params AccessLogParameters) ([]Login, *Paging, error)
GetAccessLogsContext retrieves a page of logins according to the parameters given with a custom context. Slack API docs: https://api.slack.com/methods/team.accessLogs
func (*Client) GetAuditLogs ¶ added in v0.9.2
func (api *Client) GetAuditLogs(params AuditLogParameters) (entries []AuditEntry, nextCursor string, err error)
GetAuditLogs retrieves a page of audit entires according to the parameters given
func (*Client) GetAuditLogsContext ¶ added in v0.9.2
func (api *Client) GetAuditLogsContext(ctx context.Context, params AuditLogParameters) (entries []AuditEntry, nextCursor string, err error)
GetAuditLogsContext retrieves a page of audit entries according to the parameters given with a custom context
func (*Client) GetBillableInfo ¶ added in v0.1.0
func (api *Client) GetBillableInfo(params GetBillableInfoParams) (map[string]BillingActive, error)
GetBillableInfo gets the billable users information of the team. For more information see the GetBillableInfoContext documentation.
func (*Client) GetBillableInfoContext ¶ added in v0.2.0
func (api *Client) GetBillableInfoContext(ctx context.Context, params GetBillableInfoParams) (map[string]BillingActive, error)
GetBillableInfoContext gets the billable users information of the team with a custom context. Slack API docs: https://api.slack.com/methods/team.billableInfo
func (*Client) GetBotInfo ¶ added in v0.1.0
func (api *Client) GetBotInfo(parameters GetBotInfoParameters) (*Bot, error)
GetBotInfo will retrieve the complete bot information. For more details, see GetBotInfoContext documentation.
func (*Client) GetBotInfoContext ¶ added in v0.2.0
func (api *Client) GetBotInfoContext(ctx context.Context, parameters GetBotInfoParameters) (*Bot, error)
GetBotInfoContext will retrieve the complete bot information using a custom context. Slack API docs: https://api.slack.com/methods/bots.info
func (*Client) GetCallContext ¶ added in v0.15.0
GetCallInfoContext returns information about a Call.
func (*Client) GetConversationHistory ¶ added in v0.2.0
func (api *Client) GetConversationHistory(params *GetConversationHistoryParameters) (*GetConversationHistoryResponse, error)
GetConversationHistory joins an existing conversation. For more details, see GetConversationHistoryContext documentation.
func (*Client) GetConversationHistoryContext ¶ added in v0.2.0
func (api *Client) GetConversationHistoryContext(ctx context.Context, params *GetConversationHistoryParameters) (*GetConversationHistoryResponse, error)
GetConversationHistoryContext joins an existing conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.history
func (*Client) GetConversationInfo ¶ added in v0.2.0
func (api *Client) GetConversationInfo(input *GetConversationInfoInput) (*Channel, error)
GetConversationInfo retrieves information about a conversation. For more details, see GetConversationInfoContext documentation.
func (*Client) GetConversationInfoContext ¶ added in v0.2.0
func (api *Client) GetConversationInfoContext(ctx context.Context, input *GetConversationInfoInput) (*Channel, error)
GetConversationInfoContext retrieves information about a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.info
func (*Client) GetConversationReplies ¶ added in v0.2.0
func (api *Client) GetConversationReplies(params *GetConversationRepliesParameters) (msgs []Message, hasMore bool, nextCursor string, err error)
GetConversationReplies retrieves a thread of messages posted to a conversation. For more details, see GetConversationRepliesContext documentation.
func (*Client) GetConversationRepliesContext ¶ added in v0.2.0
func (api *Client) GetConversationRepliesContext(ctx context.Context, params *GetConversationRepliesParameters) (msgs []Message, hasMore bool, nextCursor string, err error)
GetConversationRepliesContext retrieves a thread of messages posted to a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.replies
func (*Client) GetConversations ¶ added in v0.2.0
func (api *Client) GetConversations(params *GetConversationsParameters) (channels []Channel, nextCursor string, err error)
GetConversations returns the list of channels in a Slack team. For more details, see GetConversationsContext documentation.
func (*Client) GetConversationsContext ¶ added in v0.2.0
func (api *Client) GetConversationsContext(ctx context.Context, params *GetConversationsParameters) (channels []Channel, nextCursor string, err error)
GetConversationsContext returns the list of channels in a Slack team with a custom context. Slack API docs: https://api.slack.com/methods/conversations.list
func (*Client) GetConversationsForUser ¶ added in v0.4.0
func (api *Client) GetConversationsForUser(params *GetConversationsForUserParameters) (channels []Channel, nextCursor string, err error)
GetConversationsForUser returns the list conversations for a given user. For more details, see GetConversationsForUserContext documentation.
func (*Client) GetConversationsForUserContext ¶ added in v0.4.0
func (api *Client) GetConversationsForUserContext(ctx context.Context, params *GetConversationsForUserParameters) (channels []Channel, nextCursor string, err error)
GetConversationsForUserContext returns the list conversations for a given user with a custom context Slack API docs: https://api.slack.com/methods/users.conversations
func (*Client) GetDNDInfo ¶ added in v0.1.0
GetDNDInfo provides information about a user's current Do Not Disturb settings. For more information see the GetDNDInfoContext documentation.
func (*Client) GetDNDInfoContext ¶ added in v0.2.0
GetDNDInfoContext provides information about a user's current Do Not Disturb settings with a custom context. Slack API docs: https://api.slack.com/methods/dnd.info
func (*Client) GetDNDTeamInfo ¶ added in v0.1.0
GetDNDTeamInfo provides information about a user's current Do Not Disturb settings. For more information see the GetDNDTeamInfoContext documentation.
func (*Client) GetDNDTeamInfoContext ¶ added in v0.2.0
func (api *Client) GetDNDTeamInfoContext(ctx context.Context, users []string) (map[string]DNDStatus, error)
GetDNDTeamInfoContext provides information about a user's current Do Not Disturb settings with a custom context. Slack API docs: https://api.slack.com/methods/dnd.teamInfo
func (*Client) GetEmoji ¶ added in v0.1.0
GetEmoji retrieves all the emojis. For more details see GetEmojiContext documentation.
func (*Client) GetEmojiContext ¶ added in v0.2.0
GetEmojiContext retrieves all the emojis with a custom context. Slack API docs: https://api.slack.com/methods/emoji.list
func (*Client) GetFile ¶ added in v0.6.1
GetFile retrieves a given file from its private download URL.
func (*Client) GetFileContext ¶ added in v0.10.3
GetFileContext retrieves a given file from its private download URL with a custom context. For more details, see GetFile documentation.
func (*Client) GetFileInfo ¶ added in v0.1.0
GetFileInfo retrieves a file and related comments. For more details, see GetFileInfoContext documentation.
func (*Client) GetFileInfoContext ¶ added in v0.2.0
func (api *Client) GetFileInfoContext(ctx context.Context, fileID string, count, page int) (*File, []Comment, *Paging, error)
GetFileInfoContext retrieves a file and related comments with a custom context. Slack API docs: https://api.slack.com/methods/files.info
func (*Client) GetFiles ¶ added in v0.1.0
func (api *Client) GetFiles(params GetFilesParameters) ([]File, *Paging, error)
GetFiles retrieves all files according to the parameters given. For more details, see GetFilesContext documentation.
func (*Client) GetFilesContext ¶ added in v0.2.0
func (api *Client) GetFilesContext(ctx context.Context, params GetFilesParameters) ([]File, *Paging, error)
GetFilesContext retrieves all files according to the parameters given with a custom context. Slack API docs: https://api.slack.com/methods/files.list
func (*Client) GetOtherTeamInfo ¶ added in v0.12.0
GetOtherTeamInfo gets Team information for any team. For more information see the GetOtherTeamInfoContext documentation.
func (*Client) GetOtherTeamInfoContext ¶ added in v0.12.0
GetOtherTeamInfoContext gets Team information for any team with a custom context. Slack API docs: https://api.slack.com/methods/team.info
func (*Client) GetPermalink ¶ added in v0.5.0
func (api *Client) GetPermalink(params *PermalinkParameters) (string, error)
GetPermalink returns the permalink for a message. It takes PermalinkParameters and returns a string containing the permalink. It returns an error if unable to retrieve the permalink. For more details, see GetPermalinkContext documentation.
func (*Client) GetPermalinkContext ¶ added in v0.5.0
func (api *Client) GetPermalinkContext(ctx context.Context, params *PermalinkParameters) (string, error)
GetPermalinkContext returns the permalink for a message using a custom context. Slack API docs: https://api.slack.com/methods/chat.getPermalink
func (*Client) GetReactions ¶ added in v0.1.0
func (api *Client) GetReactions(item ItemRef, params GetReactionsParameters) ([]ItemReaction, error)
GetReactions returns details about the reactions on an item. For more details, see GetReactionsContext documentation.
func (*Client) GetReactionsContext ¶ added in v0.2.0
func (api *Client) GetReactionsContext(ctx context.Context, item ItemRef, params GetReactionsParameters) ([]ItemReaction, error)
GetReactionsContext returns details about the reactions on an item with a custom context. Slack API docs: https://api.slack.com/methods/reactions.get
func (*Client) GetRemoteFileInfo ¶ added in v0.11.0
func (api *Client) GetRemoteFileInfo(externalID, fileID string) (remotefile *RemoteFile, err error)
GetRemoteFileInfo retrieves the complete remote file information. For more details see the GetRemoteFileInfoContext documentation.
func (*Client) GetRemoteFileInfoContext ¶ added in v0.11.0
func (api *Client) GetRemoteFileInfoContext(ctx context.Context, externalID, fileID string) (remotefile *RemoteFile, err error)
GetRemoteFileInfoContext retrieves the complete remote file information given with a custom context. Slack API docs: https://api.slack.com/methods/files.remote.info
func (*Client) GetScheduledMessages ¶ added in v0.6.3
func (api *Client) GetScheduledMessages(params *GetScheduledMessagesParameters) (channels []ScheduledMessage, nextCursor string, err error)
GetScheduledMessages returns the list of scheduled messages based on params. For more details, see GetScheduledMessagesContext documentation.
func (*Client) GetScheduledMessagesContext ¶ added in v0.6.3
func (api *Client) GetScheduledMessagesContext(ctx context.Context, params *GetScheduledMessagesParameters) (channels []ScheduledMessage, nextCursor string, err error)
GetScheduledMessagesContext returns the list of scheduled messages based on params with a custom context. Slack API docs: https://api.slack.com/methods/chat.getScheduledMessages.list
func (*Client) GetStarred ¶ added in v0.1.0
func (api *Client) GetStarred(params StarsParameters) ([]StarredItem, *Paging, error)
GetStarred returns a list of StarredItem items.
The user then has to iterate over them and figure out what they should be looking at according to what is in the Type:
for _, item := range items { switch c.Type { case "file_comment": log.Println(c.Comment) case "file": ... }
This function still exists to maintain backwards compatibility. I exposed it as returning []StarredItem, so it shall stay as StarredItem.
func (*Client) GetStarredContext ¶ added in v0.2.0
func (api *Client) GetStarredContext(ctx context.Context, params StarsParameters) ([]StarredItem, *Paging, error)
GetStarredContext returns a list of StarredItem items with a custom context For more details see GetStarred
func (*Client) GetTeamInfo ¶ added in v0.1.0
GetTeamInfo gets the Team Information of the user. For more information see the GetTeamInfoContext documentation.
func (*Client) GetTeamInfoContext ¶ added in v0.2.0
GetTeamInfoContext gets the Team Information of the user with a custom context. Slack API docs: https://api.slack.com/methods/team.info
func (*Client) GetTeamProfile ¶ added in v0.12.0
func (api *Client) GetTeamProfile(teamID ...string) (*TeamProfile, error)
GetTeamProfile gets the Team Profile settings of the user. For more information see the GetTeamProfileContext documentation.
func (*Client) GetTeamProfileContext ¶ added in v0.12.0
func (api *Client) GetTeamProfileContext(ctx context.Context, teamID ...string) (*TeamProfile, error)
GetTeamProfileContext gets the Team Profile settings of the user with a custom context. Slack API docs: https://api.slack.com/methods/team.profile.get
func (*Client) GetUserByEmail ¶ added in v0.2.0
GetUserByEmail will retrieve the complete user information by email. For more information see the GetUserByEmailContext documentation.
func (*Client) GetUserByEmailContext ¶ added in v0.2.0
GetUserByEmailContext will retrieve the complete user information by email with a custom context. Slack API docs: https://api.slack.com/methods/users.lookupByEmail
func (*Client) GetUserGroupMembers ¶ added in v0.1.0
GetUserGroupMembers will retrieve the current list of users in a group. For more information see the GetUserGroupMembersContext documentation.
func (*Client) GetUserGroupMembersContext ¶ added in v0.2.0
func (api *Client) GetUserGroupMembersContext(ctx context.Context, userGroup string) ([]string, error)
GetUserGroupMembersContext will retrieve the current list of users in a group with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.users.list
func (*Client) GetUserGroups ¶ added in v0.1.0
func (api *Client) GetUserGroups(options ...GetUserGroupsOption) ([]UserGroup, error)
GetUserGroups returns a list of user groups for the team. For more information see the GetUserGroupsContext documentation.
func (*Client) GetUserGroupsContext ¶ added in v0.2.0
func (api *Client) GetUserGroupsContext(ctx context.Context, options ...GetUserGroupsOption) ([]UserGroup, error)
GetUserGroupsContext returns a list of user groups for the team with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.list
func (*Client) GetUserIdentity ¶ added in v0.1.0
func (api *Client) GetUserIdentity() (*UserIdentityResponse, error)
GetUserIdentity will retrieve user info available per identity scopes. For more information see the GetUserIdentityContext documentation.
func (*Client) GetUserIdentityContext ¶ added in v0.2.0
func (api *Client) GetUserIdentityContext(ctx context.Context) (response *UserIdentityResponse, err error)
GetUserIdentityContext will retrieve user info available per identity scopes with a custom context. Slack API docs: https://api.slack.com/methods/users.identity
func (*Client) GetUserInfo ¶ added in v0.1.0
GetUserInfo will retrieve the complete user information. For more information see the GetUserInfoContext documentation.
func (*Client) GetUserInfoContext ¶ added in v0.2.0
GetUserInfoContext will retrieve the complete user information with a custom context. Slack API docs: https://api.slack.com/methods/users.info
func (*Client) GetUserPrefs ¶ added in v0.6.3
func (api *Client) GetUserPrefs() (*UserPrefsCarrier, error)
func (*Client) GetUserPrefsContext ¶ added in v0.10.3
func (api *Client) GetUserPrefsContext(ctx context.Context) (*UserPrefsCarrier, error)
func (*Client) GetUserPresence ¶ added in v0.1.0
func (api *Client) GetUserPresence(user string) (*UserPresence, error)
GetUserPresence will retrieve the current presence status of given user. For more information see the GetUserPresenceContext documentation.
func (*Client) GetUserPresenceContext ¶ added in v0.2.0
GetUserPresenceContext will retrieve the current presence status of given user with a custom context. Slack API docs: https://api.slack.com/methods/users.getPresence
func (*Client) GetUserProfile ¶ added in v0.3.0
func (api *Client) GetUserProfile(params *GetUserProfileParameters) (*UserProfile, error)
GetUserProfile retrieves a user's profile information. For more information see the GetUserProfileContext documentation.
func (*Client) GetUserProfileContext ¶ added in v0.3.0
func (api *Client) GetUserProfileContext(ctx context.Context, params *GetUserProfileParameters) (*UserProfile, error)
GetUserProfileContext retrieves a user's profile information with a context. Slack API docs: https://api.slack.com/methods/users.profile.get
func (*Client) GetUsers ¶ added in v0.1.0
func (api *Client) GetUsers(options ...GetUsersOption) ([]User, error)
GetUsers returns the list of users (with their detailed information)
func (*Client) GetUsersContext ¶ added in v0.2.0
func (api *Client) GetUsersContext(ctx context.Context, options ...GetUsersOption) (results []User, err error)
GetUsersContext returns the list of users (with their detailed information) with a custom context
func (*Client) GetUsersInConversation ¶ added in v0.2.0
func (api *Client) GetUsersInConversation(params *GetUsersInConversationParameters) ([]string, string, error)
GetUsersInConversation returns the list of users in a conversation. For more details, see GetUsersInConversationContext documentation.
func (*Client) GetUsersInConversationContext ¶ added in v0.2.0
func (api *Client) GetUsersInConversationContext(ctx context.Context, params *GetUsersInConversationParameters) ([]string, string, error)
GetUsersInConversationContext returns the list of users in a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.members
func (*Client) GetUsersInfo ¶ added in v0.6.4
GetUsersInfo will retrieve the complete multi-users information. For more information see the GetUsersInfoContext documentation.
func (*Client) GetUsersInfoContext ¶ added in v0.6.4
GetUsersInfoContext will retrieve the complete multi-users information with a custom context. Slack API docs: https://api.slack.com/methods/users.info
func (*Client) GetUsersPaginated ¶ added in v0.3.0
func (api *Client) GetUsersPaginated(options ...GetUsersOption) UserPagination
GetUsersPaginated fetches users in a paginated fashion, see GetUsersContext for usage.
func (*Client) InviteGuest ¶ added in v0.1.0
InviteGuest invites a user to Slack as a single-channel guest
func (*Client) InviteGuestContext ¶ added in v0.2.0
func (api *Client) InviteGuestContext(ctx context.Context, teamName, channel, firstName, lastName, emailAddress string) error
InviteGuestContext invites a user to Slack as a single-channel guest with a custom context
func (*Client) InviteRestricted ¶ added in v0.1.0
func (api *Client) InviteRestricted(teamName, channel, firstName, lastName, emailAddress string) error
InviteRestricted invites a user to Slack as a restricted account
func (*Client) InviteRestrictedContext ¶ added in v0.2.0
func (api *Client) InviteRestrictedContext(ctx context.Context, teamName, channel, firstName, lastName, emailAddress string) error
InviteRestrictedContext invites a user to Slack as a restricted account with a custom context
func (*Client) InviteSharedEmailsToConversation ¶ added in v0.12.3
func (api *Client) InviteSharedEmailsToConversation(channelID string, emails ...string) (string, bool, error)
InviteSharedEmailsToConversation invites users to a shared channels by email. For more details, see InviteSharedToConversationContext documentation.
func (*Client) InviteSharedEmailsToConversationContext ¶ added in v0.12.3
func (api *Client) InviteSharedEmailsToConversationContext(ctx context.Context, channelID string, emails ...string) (string, bool, error)
InviteSharedEmailsToConversationContext invites users to a shared channels by email using context. For more details, see InviteSharedToConversationContext documentation.
func (*Client) InviteSharedToConversation ¶ added in v0.15.0
func (api *Client) InviteSharedToConversation(params InviteSharedToConversationParams) (string, bool, error)
InviteSharedToConversation invites emails or userIDs to a channel. For more details, see InviteSharedToConversationContext documentation.
func (*Client) InviteSharedToConversationContext ¶ added in v0.15.0
func (api *Client) InviteSharedToConversationContext(ctx context.Context, params InviteSharedToConversationParams) (string, bool, error)
InviteSharedToConversationContext invites emails or userIDs to a channel with a custom context. This is a helper function for InviteSharedEmailsToConversation and InviteSharedUserIDsToConversation. It accepts either emails or userIDs, but not both. Slack API docs: https://api.slack.com/methods/conversations.inviteShared
func (*Client) InviteSharedUserIDsToConversation ¶ added in v0.12.3
func (api *Client) InviteSharedUserIDsToConversation(channelID string, userIDs ...string) (string, bool, error)
InviteSharedUserIDsToConversation invites users to a shared channels by user id. For more details, see InviteSharedToConversationContext documentation.
func (*Client) InviteSharedUserIDsToConversationContext ¶ added in v0.12.3
func (api *Client) InviteSharedUserIDsToConversationContext(ctx context.Context, channelID string, userIDs ...string) (string, bool, error)
InviteSharedUserIDsToConversationContext invites users to a shared channels by user id with context. For more details, see InviteSharedToConversationContext documentation.
func (*Client) InviteToTeam ¶ added in v0.1.0
InviteToTeam invites a user to a Slack team
func (*Client) InviteToTeamContext ¶ added in v0.2.0
func (api *Client) InviteToTeamContext(ctx context.Context, teamName, firstName, lastName, emailAddress string) error
InviteToTeamContext invites a user to a Slack team with a custom context
func (*Client) InviteUsersToConversation ¶ added in v0.2.0
InviteUsersToConversation invites users to a channel. For more details, see InviteUsersToConversation documentation.
func (*Client) InviteUsersToConversationContext ¶ added in v0.2.0
func (api *Client) InviteUsersToConversationContext(ctx context.Context, channelID string, users ...string) (*Channel, error)
InviteUsersToConversationContext invites users to a channel with a custom context. Slack API docs: https://api.slack.com/methods/conversations.invite
func (*Client) JoinConversation ¶ added in v0.2.0
JoinConversation joins an existing conversation. For more details, see JoinConversationContext documentation.
func (*Client) JoinConversationContext ¶ added in v0.2.0
func (api *Client) JoinConversationContext(ctx context.Context, channelID string) (*Channel, string, []string, error)
JoinConversationContext joins an existing conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.join
func (*Client) KickUserFromConversation ¶ added in v0.2.0
KickUserFromConversation removes a user from a conversation. For more details, see KickUserFromConversationContext documentation.
func (*Client) KickUserFromConversationContext ¶ added in v0.2.0
func (api *Client) KickUserFromConversationContext(ctx context.Context, channelID string, user string) error
KickUserFromConversationContext removes a user from a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.kick
func (*Client) LeaveConversation ¶ added in v0.2.0
LeaveConversation leaves a conversation. For more details, see LeaveConversationContext documentation.
func (*Client) LeaveConversationContext ¶ added in v0.2.0
LeaveConversationContext leaves a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.leave
func (*Client) ListAllStars ¶ added in v0.6.1
ListAllStars returns the complete list of starred items
func (*Client) ListAllStarsContext ¶ added in v0.6.1
ListAllStarsContext returns the list of users (with their detailed information) with a custom context
func (*Client) ListBookmarks ¶ added in v0.11.0
ListBookmarks returns all bookmarks for a channel. For more details, see ListBookmarksContext documentation.
func (*Client) ListBookmarksContext ¶ added in v0.11.0
ListBookmarksContext returns all bookmarks for a channel with a custom context. Slack API docs: https://api.slack.com/methods/bookmarks.edit
func (*Client) ListEventAuthorizations ¶ added in v0.7.2
func (api *Client) ListEventAuthorizations(eventContext string) ([]EventAuthorization, error)
ListEventAuthorizations lists authed users and teams for the given event_context. You must provide an app-level token to the client using OptionAppLevelToken. For more details, see ListEventAuthorizationsContext documentation.
func (*Client) ListEventAuthorizationsContext ¶ added in v0.7.2
func (api *Client) ListEventAuthorizationsContext(ctx context.Context, eventContext string) ([]EventAuthorization, error)
ListEventAuthorizationsContext lists authed users and teams for the given event_context with a custom context. Slack API docs: https://api.slack.com/methods/apps.event.authorizations.list
func (*Client) ListFiles ¶ added in v0.6.1
func (api *Client) ListFiles(params ListFilesParameters) ([]File, *ListFilesParameters, error)
ListFiles retrieves all files according to the parameters given. Uses cursor based pagination. For more details, see ListFilesContext documentation.
func (*Client) ListFilesContext ¶ added in v0.6.1
func (api *Client) ListFilesContext(ctx context.Context, params ListFilesParameters) ([]File, *ListFilesParameters, error)
ListFilesContext retrieves all files according to the parameters given with a custom context. Slack API docs: https://api.slack.com/methods/files.list
func (*Client) ListPins ¶ added in v0.1.0
ListPins returns information about the items a user reacted to. For more details, see ListPinsContext documentation.
func (*Client) ListPinsContext ¶ added in v0.2.0
ListPinsContext returns information about the items a user reacted to with a custom context. Slack API docs: https://api.slack.com/methods/pins.list
func (*Client) ListReactions ¶ added in v0.1.0
func (api *Client) ListReactions(params ListReactionsParameters) ([]ReactedItem, *Paging, error)
ListReactions returns information about the items a user reacted to. For more details, see ListReactionsContext documentation.
func (*Client) ListReactionsContext ¶ added in v0.2.0
func (api *Client) ListReactionsContext(ctx context.Context, params ListReactionsParameters) ([]ReactedItem, *Paging, error)
ListReactionsContext returns information about the items a user reacted to with a custom context. Slack API docs: https://api.slack.com/methods/reactions.list
func (*Client) ListReminders ¶ added in v0.7.2
ListReminders lists all the reminders created by or for the authenticated user For more details, see ListRemindersContext documentation.
func (*Client) ListRemindersContext ¶ added in v0.10.3
ListRemindersContext lists all the reminders created by or for the authenticated user with a custom context. Slack API docs: https://api.slack.com/methods/reminders.list
func (*Client) ListRemoteFiles ¶ added in v0.11.0
func (api *Client) ListRemoteFiles(params ListRemoteFilesParameters) ([]RemoteFile, error)
ListRemoteFiles retrieves all remote files according to the parameters given. Uses cursor based pagination. For more details see the ListRemoteFilesContext documentation.
func (*Client) ListRemoteFilesContext ¶ added in v0.11.0
func (api *Client) ListRemoteFilesContext(ctx context.Context, params ListRemoteFilesParameters) ([]RemoteFile, error)
ListRemoteFilesContext retrieves all remote files according to the parameters given with a custom context. Uses cursor based pagination. Slack API docs: https://api.slack.com/methods/files.remote.list
func (*Client) ListStars ¶ added in v0.1.0
func (api *Client) ListStars(params StarsParameters) ([]Item, *Paging, error)
ListStars returns information about the stars a user added. For more information see the ListStarsContext documentation.
func (*Client) ListStarsContext ¶ added in v0.2.0
func (api *Client) ListStarsContext(ctx context.Context, params StarsParameters) ([]Item, *Paging, error)
ListStarsContext returns information about the stars a user added with a custom context. Slack API docs: https://api.slack.com/methods/stars.list
func (*Client) ListStarsPaginated ¶ added in v0.6.1
func (api *Client) ListStarsPaginated(options ...ListStarsOption) StarredItemPagination
ListStarsPaginated fetches users in a paginated fashion, see ListStarsPaginationContext for usage.
func (*Client) ListTeams ¶ added in v0.12.0
func (api *Client) ListTeams(params ListTeamsParameters) ([]Team, string, error)
ListTeams returns all workspaces a token can access. For more details, see ListTeamsContext documentation.
func (*Client) ListTeamsContext ¶ added in v0.12.0
func (api *Client) ListTeamsContext(ctx context.Context, params ListTeamsParameters) ([]Team, string, error)
ListTeamsContext returns all workspaces a token can access with a custom context. Slack API docs: https://api.slack.com/methods/auth.teams.list
func (*Client) LookupCanvasSections ¶ added in v0.15.0
func (api *Client) LookupCanvasSections(params LookupCanvasSectionsParams) ([]CanvasSection, error)
LookupCanvasSections finds sections matching the provided criteria. For more details, see LookupCanvasSectionsContext documentation.
func (*Client) LookupCanvasSectionsContext ¶ added in v0.15.0
func (api *Client) LookupCanvasSectionsContext(ctx context.Context, params LookupCanvasSectionsParams) ([]CanvasSection, error)
LookupCanvasSectionsContext finds sections matching the provided criteria with a custom context. Slack API docs: https://api.slack.com/methods/canvases.sections.lookup
func (*Client) MarkConversation ¶ added in v0.7.4
MarkConversation sets the read mark of a conversation to a specific point. For more details, see MarkConversationContext documentation.
func (*Client) MarkConversationContext ¶ added in v0.7.4
MarkConversationContext sets the read mark of a conversation to a specific point with a custom context. Slack API docs: https://api.slack.com/methods/conversations.mark
func (*Client) MuteChat ¶ added in v0.6.3
func (api *Client) MuteChat(channelID string) (*UserPrefsCarrier, error)
func (*Client) NewRTM ¶ added in v0.1.0
NewRTM returns a RTM, which provides a fully managed connection to Slack's websocket-based Real-Time Messaging protocol.
func (*Client) OpenConversation ¶ added in v0.2.0
func (api *Client) OpenConversation(params *OpenConversationParameters) (*Channel, bool, bool, error)
OpenConversation opens or resumes a direct message or multi-person direct message. For more details, see OpenConversationContext documentation.
func (*Client) OpenConversationContext ¶ added in v0.2.0
func (api *Client) OpenConversationContext(ctx context.Context, params *OpenConversationParameters) (*Channel, bool, bool, error)
OpenConversationContext opens or resumes a direct message or multi-person direct message with a custom context. Slack API docs: https://api.slack.com/methods/conversations.open
func (*Client) OpenDialog ¶ added in v0.3.0
OpenDialog opens a dialog window where the triggerID originated from. EXPERIMENTAL: dialog functionality is currently experimental, api is not considered stable.
func (*Client) OpenDialogContext ¶ added in v0.3.0
func (api *Client) OpenDialogContext(ctx context.Context, triggerID string, dialog Dialog) (err error)
OpenDialogContext opens a dialog window where the triggerId originated from with a custom context EXPERIMENTAL: dialog functionality is currently experimental, api is not considered stable.
func (*Client) OpenView ¶ added in v0.6.2
func (api *Client) OpenView(triggerID string, view ModalViewRequest) (*ViewResponse, error)
OpenView opens a view for a user. For more information see the OpenViewContext documentation.
func (*Client) OpenViewContext ¶ added in v0.6.2
func (api *Client) OpenViewContext( ctx context.Context, triggerID string, view ModalViewRequest, ) (*ViewResponse, error)
OpenViewContext opens a view for a user with a custom context. Slack API docs: https://api.slack.com/methods/views.open
func (*Client) PostEphemeral ¶ added in v0.2.0
PostEphemeral sends an ephemeral message to a user in a channel. Message is escaped by default according to https://api.slack.com/docs/formatting Use http://davestevens.github.io/slack-message-builder/ to help crafting your message. For more details, see PostEphemeralContext documentation.
func (*Client) PostEphemeralContext ¶ added in v0.2.0
func (api *Client) PostEphemeralContext(ctx context.Context, channelID, userID string, options ...MsgOption) (timestamp string, err error)
PostEphemeralContext sends an ephemeral message to a user in a channel with a custom context. Slack API docs: https://api.slack.com/methods/chat.postEphemeral
func (*Client) PostMessage ¶ added in v0.1.0
PostMessage sends a message to a channel. Message is escaped by default according to https://api.slack.com/docs/formatting Use http://davestevens.github.io/slack-message-builder/ to help crafting your message. For more details, see PostMessageContext documentation.
func (*Client) PostMessageContext ¶ added in v0.2.0
func (api *Client) PostMessageContext(ctx context.Context, channelID string, options ...MsgOption) (string, string, error)
PostMessageContext sends a message to a channel with a custom context. Slack API docs: https://api.slack.com/methods/chat.postMessage
func (*Client) PublishView ¶ added in v0.6.2
func (api *Client) PublishView(userID string, view HomeTabViewRequest, hash string) (*ViewResponse, error)
PublishView publishes a static view for a user. For more information see the PublishViewContext documentation.
func (*Client) PublishViewContext ¶ added in v0.6.2
func (api *Client) PublishViewContext( ctx context.Context, userID string, view HomeTabViewRequest, hash string, ) (*ViewResponse, error)
PublishViewContext publishes a static view for a user with a custom context. Slack API docs: https://api.slack.com/methods/views.publish
func (*Client) PushView ¶ added in v0.6.2
func (api *Client) PushView(triggerID string, view ModalViewRequest) (*ViewResponse, error)
PushView pushes a view onto the stack of a root view. For more information see the PushViewContext documentation.
func (*Client) PushViewContext ¶ added in v0.6.2
func (api *Client) PushViewContext( ctx context.Context, triggerID string, view ModalViewRequest, ) (*ViewResponse, error)
PushViewContext pushes a view onto the stack of a root view with a custom context. Slack API docs: https://api.slack.com/methods/views.push
func (*Client) RemoveBookmark ¶ added in v0.11.0
RemoveBookmark removes a bookmark from a channel. For more details, see RemoveBookmarkContext documentation.
func (*Client) RemoveBookmarkContext ¶ added in v0.11.0
RemoveBookmarkContext removes a bookmark from a channel with a custom context. Slack API docs: https://api.slack.com/methods/bookmarks.remove
func (*Client) RemovePin ¶ added in v0.1.0
RemovePin un-pins an item from a channel. For more details, see RemovePinContext documentation.
func (*Client) RemovePinContext ¶ added in v0.2.0
RemovePinContext un-pins an item from a channel with a custom context. Slack API docs: https://api.slack.com/methods/pins.remove
func (*Client) RemoveReaction ¶ added in v0.1.0
RemoveReaction removes a reaction emoji from a message, file or file comment. For more details, see RemoveReactionContext documentation.
func (*Client) RemoveReactionContext ¶ added in v0.2.0
RemoveReactionContext removes a reaction emoji from a message, file or file comment with a custom context. Slack API docs: https://api.slack.com/methods/reactions.remove
func (*Client) RemoveRemoteFile ¶ added in v0.11.0
RemoveRemoteFile removes a remote file. For more information see the RemoveRemoteFileContext documentation.
func (*Client) RemoveRemoteFileContext ¶ added in v0.11.0
func (api *Client) RemoveRemoteFileContext(ctx context.Context, externalID, fileID string) (err error)
RemoveRemoteFileContext removes a remote file with a custom context Slack API docs: https://api.slack.com/methods/files.remote.remove
func (*Client) RemoveStar ¶ added in v0.1.0
RemoveStar removes a starred item from a channel. For more information see the RemoveStarContext documentation.
func (*Client) RemoveStarContext ¶ added in v0.2.0
RemoveStarContext removes a starred item from a channel with a custom context. Slack API docs: https://api.slack.com/methods/stars.remove
func (*Client) RenameConversation ¶ added in v0.2.0
RenameConversation renames a conversation. For more details, see RenameConversationContext documentation.
func (*Client) RenameConversationContext ¶ added in v0.2.0
func (api *Client) RenameConversationContext(ctx context.Context, channelID, channelName string) (*Channel, error)
RenameConversationContext renames a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.rename
func (*Client) RevokeFilePublicURL ¶ added in v0.1.0
RevokeFilePublicURL disables public/external sharing for a file. For more details, see RevokeFilePublicURLContext documentation.
func (*Client) RevokeFilePublicURLContext ¶ added in v0.2.0
RevokeFilePublicURLContext disables public/external sharing for a file with a custom context. Slack API docs: https://api.slack.com/methods/files.revokePublicURL
func (*Client) RotateTokens ¶ added in v0.12.3
func (api *Client) RotateTokens(configToken string, refreshToken string) (*TokenResponse, error)
RotateTokens exchanges a refresh token for a new app configuration token. For more information see the RotateTokensContext documentation.
func (*Client) RotateTokensContext ¶ added in v0.12.3
func (api *Client) RotateTokensContext(ctx context.Context, configToken string, refreshToken string) (*TokenResponse, error)
RotateTokensContext exchanges a refresh token for a new app configuration token with a custom context. Slack API docs: https://api.slack.com/methods/tooling.tokens.rotate
func (*Client) SaveWorkflowStepConfiguration ¶ added in v0.10.3
func (api *Client) SaveWorkflowStepConfiguration(workflowStepEditID string, inputs *WorkflowStepInputs, outputs *[]WorkflowStepOutput) error
SaveWorkflowStepConfiguration opens a configuration modal for a workflow step. For more information see the SaveWorkflowStepConfigurationContext documentation.
func (*Client) SaveWorkflowStepConfigurationContext ¶ added in v0.10.3
func (api *Client) SaveWorkflowStepConfigurationContext(ctx context.Context, workflowStepEditID string, inputs *WorkflowStepInputs, outputs *[]WorkflowStepOutput) error
SaveWorkflowStepConfigurationContext saves the configuration of a workflow step with a custom context. Slack API docs: https://api.slack.com/methods/workflows.updateStep
func (*Client) ScheduleMessage ¶ added in v0.6.3
func (api *Client) ScheduleMessage(channelID, postAt string, options ...MsgOption) (string, string, error)
ScheduleMessage sends a message to a channel. Message is escaped by default according to https://api.slack.com/docs/formatting Use http://davestevens.github.io/slack-message-builder/ to help crafting your message. For more details, see ScheduleMessageContext documentation.
func (*Client) ScheduleMessageContext ¶ added in v0.10.3
func (api *Client) ScheduleMessageContext(ctx context.Context, channelID, postAt string, options ...MsgOption) (string, string, error)
ScheduleMessageContext sends a message to a channel with a custom context. Slack API docs: https://api.slack.com/methods/chat.scheduleMessage
func (*Client) Search ¶ added in v0.1.0
func (api *Client) Search(query string, params SearchParameters) (*SearchMessages, *SearchFiles, error)
func (*Client) SearchContext ¶ added in v0.2.0
func (api *Client) SearchContext(ctx context.Context, query string, params SearchParameters) (*SearchMessages, *SearchFiles, error)
func (*Client) SearchFiles ¶ added in v0.1.0
func (api *Client) SearchFiles(query string, params SearchParameters) (*SearchFiles, error)
func (*Client) SearchFilesContext ¶ added in v0.2.0
func (api *Client) SearchFilesContext(ctx context.Context, query string, params SearchParameters) (*SearchFiles, error)
func (*Client) SearchMessages ¶ added in v0.1.0
func (api *Client) SearchMessages(query string, params SearchParameters) (*SearchMessages, error)
func (*Client) SearchMessagesContext ¶ added in v0.2.0
func (api *Client) SearchMessagesContext(ctx context.Context, query string, params SearchParameters) (*SearchMessages, error)
func (*Client) SendAuthRevoke ¶ added in v0.5.0
func (api *Client) SendAuthRevoke(token string) (*AuthRevokeResponse, error)
SendAuthRevoke will send a revocation for our token. For more details, see SendAuthRevokeContext documentation.
func (*Client) SendAuthRevokeContext ¶ added in v0.5.0
func (api *Client) SendAuthRevokeContext(ctx context.Context, token string) (*AuthRevokeResponse, error)
SendAuthRevokeContext will send a revocation request for our token to api.revoke with a custom context. Slack API docs: https://api.slack.com/methods/auth.revoke
func (*Client) SendMessage ¶ added in v0.1.0
func (api *Client) SendMessage(channel string, options ...MsgOption) (string, string, string, error)
SendMessage more flexible method for configuring messages. For more details, see SendMessageContext documentation.
func (*Client) SendMessageContext ¶ added in v0.2.0
func (api *Client) SendMessageContext(ctx context.Context, channelID string, options ...MsgOption) (_channel string, _timestampOrScheduledMessageId string, _text string, err error)
SendMessageContext more flexible method for configuring messages with a custom context. Slack API docs: https://api.slack.com/methods/chat.postMessage
func (*Client) SendSSOBindingEmail ¶ added in v0.1.0
SendSSOBindingEmail sends an SSO binding email to the specified user
func (*Client) SendSSOBindingEmailContext ¶ added in v0.2.0
SendSSOBindingEmailContext sends an SSO binding email to the specified user with a custom context
func (*Client) SetAssistantThreadsStatus ¶ added in v0.16.0
func (api *Client) SetAssistantThreadsStatus(params AssistantThreadsSetStatusParameters) (err error)
SetAssistantThreadStatus sets the status of a thread @see https://api.slack.com/methods/assistant.threads.setStatus
func (*Client) SetAssistantThreadsStatusContext ¶ added in v0.16.0
func (api *Client) SetAssistantThreadsStatusContext(ctx context.Context, params AssistantThreadsSetStatusParameters) (err error)
SetAssistantThreadStatusContext sets the status of a thread with a custom context @see https://api.slack.com/methods/assistant.threads.setStatus
func (*Client) SetAssistantThreadsSuggestedPrompts ¶ added in v0.16.0
func (api *Client) SetAssistantThreadsSuggestedPrompts(params AssistantThreadsSetSuggestedPromptsParameters) (err error)
SetAssistantThreadsSugesstedPrompts sets the suggested prompts for a thread @see https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
func (*Client) SetAssistantThreadsSuggestedPromptsContext ¶ added in v0.16.0
func (api *Client) SetAssistantThreadsSuggestedPromptsContext(ctx context.Context, params AssistantThreadsSetSuggestedPromptsParameters) (err error)
SetAssistantThreadSuggestedPromptsContext sets the suggested prompts for a thread with a custom context @see https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
func (*Client) SetAssistantThreadsTitle ¶ added in v0.16.0
func (api *Client) SetAssistantThreadsTitle(params AssistantThreadsSetTitleParameters) (err error)
SetAssistantThreadsTitle sets the title of a thread @see https://api.slack.com/methods/assistant.threads.setTitle
func (*Client) SetAssistantThreadsTitleContext ¶ added in v0.16.0
func (api *Client) SetAssistantThreadsTitleContext(ctx context.Context, params AssistantThreadsSetTitleParameters) (err error)
SetAssistantThreadsTitleContext sets the title of a thread with a custom context @see https://api.slack.com/methods/assistant.threads.setTitle
func (*Client) SetCanvasAccess ¶ added in v0.15.0
func (api *Client) SetCanvasAccess(params SetCanvasAccessParams) error
SetCanvasAccess sets the access level to a canvas for specified entities. For more details, see SetCanvasAccessContext documentation.
func (*Client) SetCanvasAccessContext ¶ added in v0.15.0
func (api *Client) SetCanvasAccessContext(ctx context.Context, params SetCanvasAccessParams) error
SetCanvasAccessContext sets the access level to a canvas for specified entities with a custom context. Slack API docs: https://api.slack.com/methods/canvases.access.set
func (*Client) SetPurposeOfConversation ¶ added in v0.2.0
SetPurposeOfConversation sets the purpose for a conversation. For more details, see SetPurposeOfConversationContext documentation.
func (*Client) SetPurposeOfConversationContext ¶ added in v0.2.0
func (api *Client) SetPurposeOfConversationContext(ctx context.Context, channelID, purpose string) (*Channel, error)
SetPurposeOfConversationContext sets the purpose for a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.setPurpose
func (*Client) SetRegular ¶ added in v0.1.0
SetRegular enables the specified user
func (*Client) SetRegularContext ¶ added in v0.2.0
SetRegularContext enables the specified user with a custom context
func (*Client) SetRestricted ¶ added in v0.1.0
SetRestricted converts a user into a restricted account
func (*Client) SetRestrictedContext ¶ added in v0.2.0
func (api *Client) SetRestrictedContext(ctx context.Context, teamName, uid string, channelIds ...string) error
SetRestrictedContext converts a user into a restricted account with a custom context
func (*Client) SetSnooze ¶ added in v0.1.0
SetSnooze adjusts the snooze duration for a user's Do Not Disturb settings. For more information see the SetSnoozeContext documentation.
func (*Client) SetSnoozeContext ¶ added in v0.2.0
SetSnoozeContext adjusts the snooze duration for a user's Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration. Slack API docs: https://api.slack.com/methods/dnd.setSnooze
func (*Client) SetTopicOfConversation ¶ added in v0.2.0
SetTopicOfConversation sets the topic for a conversation. For more details, see SetTopicOfConversationContext documentation.
func (*Client) SetTopicOfConversationContext ¶ added in v0.2.0
func (api *Client) SetTopicOfConversationContext(ctx context.Context, channelID, topic string) (*Channel, error)
SetTopicOfConversationContext sets the topic for a conversation with a custom context. Slack API docs: https://api.slack.com/methods/conversations.setTopic
func (*Client) SetUltraRestricted ¶ added in v0.1.0
SetUltraRestricted converts a user into a single-channel guest
func (*Client) SetUltraRestrictedContext ¶ added in v0.2.0
func (api *Client) SetUltraRestrictedContext(ctx context.Context, teamName, uid, channel string) error
SetUltraRestrictedContext converts a user into a single-channel guest with a custom context
func (*Client) SetUserAsActive ¶ added in v0.1.0
SetUserAsActive marks the currently authenticated user as active. For more information see the SetUserAsActiveContext documentation.
func (*Client) SetUserAsActiveContext ¶ added in v0.2.0
SetUserAsActiveContext marks the currently authenticated user as active with a custom context. Slack API docs: https://api.slack.com/methods/users.setActive
func (*Client) SetUserCustomFields ¶ added in v0.12.0
func (api *Client) SetUserCustomFields(userID string, customFields map[string]UserProfileCustomField) error
SetUserCustomFields sets Custom Profile fields on the provided users account. For more information see the SetUserCustomFieldsContext documentation.
func (*Client) SetUserCustomFieldsContext ¶ added in v0.12.0
func (api *Client) SetUserCustomFieldsContext(ctx context.Context, userID string, customFields map[string]UserProfileCustomField) error
SetUserCustomFieldsContext sets Custom Profile fields on the provided users account. Due to the non-repeating elements within the request, a map fields is required. The key in the map signifies the field that will be updated.
Note: You may need to change the way the custom field is populated within the Profile section of the Admin Console from SCIM or User Entered to API.
See GetTeamProfile for information to retrieve possible fields for your account.
Slack API docs: https://api.slack.com/methods/users.profile.set
func (*Client) SetUserCustomStatus ¶ added in v0.1.0
func (api *Client) SetUserCustomStatus(statusText, statusEmoji string, statusExpiration int64) error
SetUserCustomStatus will set a custom status and emoji for the currently authenticated user. For more information see the SetUserCustomStatusContext documentation.
func (*Client) SetUserCustomStatusContext ¶ added in v0.2.0
func (api *Client) SetUserCustomStatusContext(ctx context.Context, statusText, statusEmoji string, statusExpiration int64) error
SetUserCustomStatusContext will set a custom status and emoji for the currently authenticated user with a custom context. For more information see the SetUserCustomStatusContextWithUser documentation.
func (*Client) SetUserCustomStatusContextWithUser ¶ added in v0.6.1
func (api *Client) SetUserCustomStatusContextWithUser(ctx context.Context, user, statusText, statusEmoji string, statusExpiration int64) error
SetUserCustomStatusContextWithUser will set a custom status and emoji for the currently authenticated user. If statusEmoji is "" and statusText is not, the Slack API will automatically set it to ":speech_balloon:". Otherwise, if both are "" the Slack API will unset the custom status/emoji. If statusExpiration is set to 0 the status will not expire.
Slack API docs: https://api.slack.com/methods/users.profile.set
func (*Client) SetUserCustomStatusWithUser ¶ added in v0.6.1
func (api *Client) SetUserCustomStatusWithUser(user, statusText, statusEmoji string, statusExpiration int64) error
SetUserCustomStatusWithUser will set a custom status and emoji for the provided user. For more information see the SetUserCustomStatusContextWithUser documentation.
func (*Client) SetUserPhoto ¶ added in v0.1.0
func (api *Client) SetUserPhoto(image string, params UserSetPhotoParams) error
SetUserPhoto changes the currently authenticated user's profile image. For more information see the SetUserPhotoContext documentation.
func (*Client) SetUserPhotoContext ¶ added in v0.2.0
func (api *Client) SetUserPhotoContext(ctx context.Context, image string, params UserSetPhotoParams) (err error)
SetUserPhotoContext changes the currently authenticated user's profile image using a custom context. Slack API docs: https://api.slack.com/methods/users.setPhoto
func (*Client) SetUserPresence ¶ added in v0.1.0
SetUserPresence changes the currently authenticated user presence. For more information see the SetUserPresenceContext documentation.
func (*Client) SetUserPresenceContext ¶ added in v0.2.0
SetUserPresenceContext changes the currently authenticated user presence with a custom context. Slack API docs: https://api.slack.com/methods/users.setPresence
func (*Client) SetUserRealName ¶ added in v0.7.0
SetUserRealName changes the currently authenticated user's realName For more information see the SetUserRealNameContextWithUser documentation.
func (*Client) SetUserRealNameContextWithUser ¶ added in v0.7.0
SetUserRealNameContextWithUser will set a real name for the provided user with a custom context. Slack API docs: https://api.slack.com/methods/users.profile.set
func (*Client) ShareFilePublicURL ¶ added in v0.1.0
ShareFilePublicURL enabled public/external sharing for a file. For more details, see ShareFilePublicURLContext documentation.
func (*Client) ShareFilePublicURLContext ¶ added in v0.2.0
func (api *Client) ShareFilePublicURLContext(ctx context.Context, fileID string) (*File, []Comment, *Paging, error)
ShareFilePublicURLContext enabled public/external sharing for a file with a custom context. Slack API docs: https://api.slack.com/methods/files.sharedPublicURL
func (*Client) ShareRemoteFile ¶ added in v0.11.0
func (api *Client) ShareRemoteFile(channels []string, externalID, fileID string) (file *RemoteFile, err error)
ShareRemoteFile shares a remote file to channels. For more details see the ShareRemoteFileContext documentation.
func (*Client) ShareRemoteFileContext ¶ added in v0.11.0
func (api *Client) ShareRemoteFileContext(ctx context.Context, channels []string, externalID, fileID string) (file *RemoteFile, err error)
ShareRemoteFileContext shares a remote file to channels with a custom context. Slack API docs: https://api.slack.com/methods/files.remote.share
func (*Client) StartRTM
deprecated
added in
v0.1.0
StartRTM calls the "rtm.start" endpoint and returns the provided URL and the full Info block.
To have a fully managed Websocket connection, use `NewRTM`, and call `ManageConnection()` on it.
Deprecated: Use [ConnectRTM] instead. For more details, see: https://api.slack.com/changelog/2021-10-rtm-start-to-stop
func (*Client) StartRTMContext
deprecated
added in
v0.2.0
func (api *Client) StartRTMContext(ctx context.Context) (info *Info, websocketURL string, err error)
StartRTMContext calls the "rtm.start" endpoint and returns the provided URL and the full Info block with a custom context.
To have a fully managed Websocket connection, use `NewRTM`, and call `ManageConnection()` on it.
Deprecated: Use [ConnectRTMContext] instead. For more details, see: https://api.slack.com/changelog/2021-10-rtm-start-to-stop
func (*Client) StartSocketModeContext ¶ added in v0.8.0
func (api *Client) StartSocketModeContext(ctx context.Context) (info *SocketModeConnection, websocketURL string, err error)
StartSocketModeContext calls the "apps.connections.open" endpoint and returns the provided URL and the full Info block with a custom context.
To have a fully managed Socket Mode connection, use `socketmode.New()`, and call `Run()` on it.
func (*Client) UnArchiveConversation ¶ added in v0.2.0
UnArchiveConversation reverses conversation archival. For more details, see UnArchiveConversationContext documentation.
func (*Client) UnArchiveConversationContext ¶ added in v0.2.0
UnArchiveConversationContext reverses conversation archival with a custom context. Slack API docs: https://api.slack.com/methods/conversations.unarchive
func (*Client) UnMuteChat ¶ added in v0.6.3
func (api *Client) UnMuteChat(channelID string) (*UserPrefsCarrier, error)
func (*Client) UnfurlMessage ¶ added in v0.5.0
func (api *Client) UnfurlMessage(channelID, timestamp string, unfurls map[string]Attachment, options ...MsgOption) (string, string, string, error)
UnfurlMessage unfurls a message in a channel. For more details, see UnfurlMessageContext documentation.
func (*Client) UnfurlMessageContext ¶ added in v0.10.0
func (api *Client) UnfurlMessageContext(ctx context.Context, channelID, timestamp string, unfurls map[string]Attachment, options ...MsgOption) (string, string, string, error)
UnfurlMessageContext unfurls a message in a channel with a custom context. Slack API docs: https://api.slack.com/methods/chat.unfurl
func (*Client) UnfurlMessageWithAuthURL ¶ added in v0.8.0
func (api *Client) UnfurlMessageWithAuthURL(channelID, timestamp string, userAuthURL string, options ...MsgOption) (string, string, string, error)
UnfurlMessageWithAuthURL sends an unfurl request containing an authentication URL. For more details, see UnfurlMessageWithAuthURLContext documentation.
func (*Client) UnfurlMessageWithAuthURLContext ¶ added in v0.8.0
func (api *Client) UnfurlMessageWithAuthURLContext(ctx context.Context, channelID, timestamp string, userAuthURL string, options ...MsgOption) (string, string, string, error)
UnfurlMessageWithAuthURLContext sends an unfurl request containing an authentication URL with a custom context. For more details see: https://api.slack.com/reference/messaging/link-unfurling#authenticated_unfurls
func (*Client) UninstallApp ¶ added in v0.8.0
UninstallApp uninstalls your app from a workspace. For more details, see UninstallAppContext documentation.
func (*Client) UninstallAppContext ¶ added in v0.10.3
UninstallAppContext uninstalls your app from a workspace with a custom context. Slack API docs: https://api.slack.com/methods/apps.uninstall
func (*Client) UnsetUserCustomStatus ¶ added in v0.1.0
UnsetUserCustomStatus removes the custom status message for the currently authenticated user. This is a convenience method that wraps (*Client).SetUserCustomStatus().
func (*Client) UnsetUserCustomStatusContext ¶ added in v0.2.0
UnsetUserCustomStatusContext removes the custom status message for the currently authenticated user with a custom context. This is a convenience method that wraps (*Client).SetUserCustomStatus().
func (*Client) UpdateCall ¶ added in v0.15.0
func (api *Client) UpdateCall(callID string, params UpdateCallParameters) (Call, error)
func (*Client) UpdateCallContext ¶ added in v0.15.0
func (api *Client) UpdateCallContext(ctx context.Context, callID string, params UpdateCallParameters) (Call, error)
UpdateCallContext updates a Call with the given parameters.
func (*Client) UpdateConfigTokens ¶ added in v0.12.3
func (api *Client) UpdateConfigTokens(response *TokenResponse)
UpdateConfigTokens replaces the configuration tokens in the client with those returned by the API
func (*Client) UpdateManifest ¶ added in v0.12.3
func (api *Client) UpdateManifest(manifest *Manifest, token string, appId string) (*UpdateManifestResponse, error)
UpdateManifest updates an app from an app manifest. For more details, see UpdateManifestContext documentation.
func (*Client) UpdateManifestContext ¶ added in v0.12.3
func (api *Client) UpdateManifestContext(ctx context.Context, manifest *Manifest, token string, appId string) (*UpdateManifestResponse, error)
UpdateManifestContext updates an app from an app manifest with a custom context. Slack API docs: https://api.slack.com/methods/apps.manifest.update
func (*Client) UpdateMessage ¶ added in v0.1.0
func (api *Client) UpdateMessage(channelID, timestamp string, options ...MsgOption) (string, string, string, error)
UpdateMessage updates a message in a channel. For more details, see UpdateMessageContext documentation.
func (*Client) UpdateMessageContext ¶ added in v0.2.0
func (api *Client) UpdateMessageContext(ctx context.Context, channelID, timestamp string, options ...MsgOption) (string, string, string, error)
UpdateMessageContext updates a message in a channel with a custom context. Slack API docs: https://api.slack.com/methods/chat.update
func (*Client) UpdateRemoteFile ¶ added in v0.11.0
func (api *Client) UpdateRemoteFile(fileID string, params RemoteFileParameters) (remotefile *RemoteFile, err error)
UpdateRemoteFile updates a remote file. For more details see the UpdateRemoteFileContext documentation.
func (*Client) UpdateRemoteFileContext ¶ added in v0.11.0
func (api *Client) UpdateRemoteFileContext(ctx context.Context, fileID string, params RemoteFileParameters) (remotefile *RemoteFile, err error)
UpdateRemoteFileContext updates a remote file with a custom context. Slack API docs: https://api.slack.com/methods/files.remote.update
func (*Client) UpdateUserGroup ¶ added in v0.1.0
func (api *Client) UpdateUserGroup(userGroupID string, options ...UpdateUserGroupsOption) (UserGroup, error)
UpdateUserGroup will update an existing user group. For more information see the UpdateUserGroupContext documentation.
func (*Client) UpdateUserGroupContext ¶ added in v0.2.0
func (api *Client) UpdateUserGroupContext(ctx context.Context, userGroupID string, options ...UpdateUserGroupsOption) (UserGroup, error)
UpdateUserGroupContext will update an existing user group with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.update
func (*Client) UpdateUserGroupMembers ¶ added in v0.1.0
UpdateUserGroupMembers will update the members of an existing user group. For more information see the UpdateUserGroupMembersContext documentation.
func (*Client) UpdateUserGroupMembersContext ¶ added in v0.2.0
func (api *Client) UpdateUserGroupMembersContext(ctx context.Context, userGroup string, members string) (UserGroup, error)
UpdateUserGroupMembersContext will update the members of an existing user group with a custom context. Slack API docs: https://api.slack.com/methods/usergroups.update
func (*Client) UpdateView ¶ added in v0.6.2
func (api *Client) UpdateView(view ModalViewRequest, externalID, hash, viewID string) (*ViewResponse, error)
UpdateView updates an existing view. For more information see the UpdateViewContext documentation.
func (*Client) UpdateViewContext ¶ added in v0.6.2
func (api *Client) UpdateViewContext( ctx context.Context, view ModalViewRequest, externalID, hash, viewID string, ) (*ViewResponse, error)
UpdateViewContext updates an existing view with a custom context. Slack API docs: https://api.slack.com/methods/views.update
func (*Client) UploadFile
deprecated
added in
v0.1.0
func (api *Client) UploadFile(params FileUploadParameters) (file *File, err error)
UploadFile uploads a file.
Deprecated: Use Client.UploadFileV2 instead. This will stop functioning on March 11, 2025. For more details, see: https://api.slack.com/methods/files.upload#markdown
func (*Client) UploadFileContext
deprecated
added in
v0.2.0
func (api *Client) UploadFileContext(ctx context.Context, params FileUploadParameters) (file *File, err error)
UploadFileContext uploads a file and setting a custom context.
Deprecated: Use Client.UploadFileV2Context instead. This will stop functioning on March 11, 2025. For more details, see: https://api.slack.com/methods/files.upload#markdown
func (*Client) UploadFileV2 ¶ added in v0.12.1
func (api *Client) UploadFileV2(params UploadFileV2Parameters) (*FileSummary, error)
UploadFileV2 uploads file to a given slack channel using 3 steps. For more details, see UploadFileV2Context documentation.
func (*Client) UploadFileV2Context ¶ added in v0.12.1
func (api *Client) UploadFileV2Context(ctx context.Context, params UploadFileV2Parameters) (file *FileSummary, err error)
UploadFileV2Context uploads file to a given slack channel using 3 steps -
- Get an upload URL using files.getUploadURLExternal API
- Send the file as a post to the URL provided by slack
- Complete the upload and share it to the specified channel using files.completeUploadExternal
Slack Docs: https://api.slack.com/messaging/files#uploading_files
func (*Client) ValidateManifest ¶ added in v0.12.3
func (api *Client) ValidateManifest(manifest *Manifest, token string, appId string) (*ManifestResponse, error)
ValidateManifest sends a request to apps.manifest.validate to validate your app manifest. For more details, see ValidateManifestContext documentation.
func (*Client) ValidateManifestContext ¶ added in v0.12.3
func (api *Client) ValidateManifestContext(ctx context.Context, manifest *Manifest, token string, appId string) (*ManifestResponse, error)
ValidateManifestContext sends a request to apps.manifest.validate to validate your app manifest with a custom context. Slack API docs: https://api.slack.com/methods/apps.manifest.validate
func (*Client) WorkflowStepCompleted ¶ added in v0.11.2
func (api *Client) WorkflowStepCompleted(workflowStepExecuteID string, options ...WorkflowStepCompletedRequestOption) error
WorkflowStepCompleted indicates step is completed
type CommandsChangedEvent ¶
type CommandsChangedEvent struct { Type string `json:"type"` EventTimestamp string `json:"event_ts"` }
CommandsChangedEvent represents the commands changed event
type Comment ¶
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 ConfigurationModalRequest ¶ added in v0.10.3
type ConfigurationModalRequest struct {
ModalViewRequest
}
func NewConfigurationModalRequest ¶ added in v0.10.3
func NewConfigurationModalRequest(blocks Blocks, privateMetaData string, externalID string) *ConfigurationModalRequest
type ConfirmationBlockObject ¶ added in v0.6.1
type ConfirmationBlockObject struct { Title *TextBlockObject `json:"title"` Text *TextBlockObject `json:"text"` Confirm *TextBlockObject `json:"confirm"` Deny *TextBlockObject `json:"deny,omitempty"` Style Style `json:"style,omitempty"` }
ConfirmationBlockObject defines a dialog that provides a confirmation step to any interactive element. This dialog will ask the user to confirm their action by offering a confirm and deny buttons.
More Information: https://api.slack.com/reference/messaging/composition-objects#confirm
func NewConfirmationBlockObject ¶ added in v0.6.1
func NewConfirmationBlockObject(title, text, confirm, deny *TextBlockObject) *ConfirmationBlockObject
NewConfirmationBlockObject returns an instance of a new Confirmation Block Object
func (*ConfirmationBlockObject) WithStyle ¶ added in v0.6.5
func (s *ConfirmationBlockObject) WithStyle(style Style) *ConfirmationBlockObject
WithStyle add styling to confirmation object
type ConfirmationField ¶ added in v0.1.0
type ConfirmationField struct { Title string `json:"title,omitempty"` // Optional. Text string `json:"text"` // Required. OkText string `json:"ok_text,omitempty"` // Optional. Defaults to "Okay" DismissText string `json:"dismiss_text,omitempty"` // Optional. Defaults to "Cancel" }
ConfirmationField are used to ask users to confirm actions
type ConnectedEvent ¶ added in v0.1.0
ConnectedEvent is used for when we connect to Slack
type ConnectingEvent ¶ added in v0.1.0
type ConnectingEvent struct { Attempt int // 1 = first attempt, 2 = second attempt ConnectionCount int }
ConnectingEvent contains information about our connection attempt
type ConnectionErrorEvent ¶ added in v0.1.0
type ConnectionErrorEvent struct { Attempt int Backoff time.Duration // how long we'll wait before the next attempt ErrorObj error }
ConnectionErrorEvent contains information about a connection error
func (*ConnectionErrorEvent) Error ¶ added in v0.1.0
func (c *ConnectionErrorEvent) Error() string
type Container ¶ added in v0.6.3
type Container struct { Type string `json:"type"` ViewID string `json:"view_id"` MessageTs string `json:"message_ts"` ThreadTs string `json:"thread_ts,omitempty"` AttachmentID json.Number `json:"attachment_id"` ChannelID string `json:"channel_id"` IsEphemeral bool `json:"is_ephemeral"` IsAppUnfurl bool `json:"is_app_unfurl"` }
type ContextBlock ¶ added in v0.6.1
type ContextBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` ContextElements ContextElements `json:"elements"` }
ContextBlock defines data that is used to display message context, which can include both images and text.
More Information: https://api.slack.com/reference/messaging/blocks#context
func NewContextBlock ¶ added in v0.6.1
func NewContextBlock(blockID string, mixedElements ...MixedElement) *ContextBlock
NewContextBlock returns a new instance of a context block
func (ContextBlock) BlockType ¶ added in v0.6.1
func (s ContextBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (ContextBlock) ID ¶ added in v0.16.0
func (s ContextBlock) ID() string
ID returns the ID of the block
type ContextElements ¶ added in v0.6.1
type ContextElements struct {
Elements []MixedElement
}
func (*ContextElements) MarshalJSON ¶ added in v0.6.1
func (e *ContextElements) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaller interface for ContextElements so that any JSON marshalling is delegated and proper type determination can be made before marshal
func (*ContextElements) UnmarshalJSON ¶ added in v0.6.1
func (e *ContextElements) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaller interface for ContextElements, so that any JSON unmarshalling is delegated and proper type determination can be made before unmarshal
type Conversation ¶ added in v0.6.1
type Conversation struct { ID string `json:"id"` Created JSONTime `json:"created"` IsOpen bool `json:"is_open"` LastRead string `json:"last_read,omitempty"` Latest *Message `json:"latest,omitempty"` UnreadCount int `json:"unread_count,omitempty"` UnreadCountDisplay int `json:"unread_count_display,omitempty"` IsGroup bool `json:"is_group"` IsIM bool `json:"is_im"` IsPrivate bool `json:"is_private"` IsReadOnly bool `json:"is_read_only"` IsMpIM bool `json:"is_mpim"` Unlinked int `json:"unlinked"` NameNormalized string `json:"name_normalized"` NumMembers int `json:"num_members"` Priority float64 `json:"priority"` User string `json:"user"` ConnectedTeamIDs []string `json:"connected_team_ids,omitempty"` InternalTeamIDs []string `json:"internal_team_ids,omitempty"` ContextTeamID string `json:"context_team_id,omitempty"` ConversationHostID string `json:"conversation_host_id,omitempty"` }
Conversation is the foundation for IM and BaseGroupConversation
type CreateConversationParams ¶ added in v0.12.0
type CreateUserGroupOption ¶ added in v0.16.0
type CreateUserGroupOption func(*createUserGroupParams)
CreateUserGroupOption options for the CreateUserGroup method call.
func CreateUserGroupOptionEnableSection ¶ added in v0.16.0
func CreateUserGroupOptionEnableSection(enableSection bool) CreateUserGroupOption
CreateUserGroupOptionEnableSection enable the section for the user group (default: false)
type CtxChannel ¶
type CtxMessage ¶
type DNDStatus ¶ added in v0.1.0
type DNDStatus struct { Enabled bool `json:"dnd_enabled"` NextStartTimestamp int `json:"next_dnd_start_ts"` NextEndTimestamp int `json:"next_dnd_end_ts"` SnoozeInfo }
type DNDUpdatedEvent ¶ added in v0.1.0
type DNDUpdatedEvent struct { Type string `json:"type"` User string `json:"user"` Status DNDStatus `json:"dnd_status"` }
DNDUpdatedEvent represents the update event for Do Not Disturb
type DatePickerBlockElement ¶ added in v0.6.1
type DatePickerBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialDate string `json:"initial_date,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
DatePickerBlockElement defines an element which lets users easily select a date from a calendar style UI. Date picker elements can be used inside of section and actions blocks.
More Information: https://api.slack.com/reference/messaging/block-elements#datepicker
func NewDatePickerBlockElement ¶ added in v0.6.1
func NewDatePickerBlockElement(actionID string) *DatePickerBlockElement
NewDatePickerBlockElement returns an instance of a date picker element
func (DatePickerBlockElement) ElementType ¶ added in v0.6.1
func (s DatePickerBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type DateTimePickerBlockElement ¶ added in v0.12.2
type DateTimePickerBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` InitialDateTime int64 `json:"initial_date_time,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
DateTimePickerBlockElement defines an element that allows the selection of both a date and a time of day formatted as a UNIX timestamp. More Information: https://api.slack.com/reference/messaging/block-elements#datetimepicker
func NewDateTimePickerBlockElement ¶ added in v0.12.2
func NewDateTimePickerBlockElement(actionID string) *DateTimePickerBlockElement
NewDatePickerBlockElement returns an instance of a datetime picker element
func (DateTimePickerBlockElement) ElementType ¶ added in v0.12.2
func (s DateTimePickerBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type DeleteCanvasAccessParams ¶ added in v0.15.0
type DeleteScheduledMessageParameters ¶ added in v0.6.3
type DesktopNotificationEvent ¶ added in v0.6.1
type DesktopNotificationEvent struct { Type string `json:"type"` Title string `json:"title"` Subtitle string `json:"subtitle"` Message string `json:"msg"` Timestamp string `json:"ts"` Content string `json:"content"` Channel string `json:"channel"` LaunchURI string `json:"launchUri"` AvatarImage string `json:"avatarImage"` SsbFilename string `json:"ssbFilename"` ImageURI string `json:"imageUri"` IsChannelInvite bool `json:"is_channel_invite"` EventTimestamp string `json:"event_ts"` }
DesktopNotificationEvent represents the update event for Desktop Notification.
type Dialog ¶ added in v0.3.0
type Dialog struct { TriggerID string `json:"trigger_id"` // Required CallbackID string `json:"callback_id"` // Required State string `json:"state,omitempty"` // Optional Title string `json:"title"` SubmitLabel string `json:"submit_label,omitempty"` NotifyOnCancel bool `json:"notify_on_cancel"` Elements []DialogElement `json:"elements"` }
Dialog as in Slack dialogs https://api.slack.com/dialogs#option_element_attributes#top-level_dialog_attributes
Example ¶
dialog := _mocDialog() fmt.Println(*dialog)
Output: {trigger_xyz callback_xyz Dialog_title Send false []}
type DialogCallback ¶ added in v0.3.0
type DialogCallback InteractionCallback
DialogCallback DEPRECATED use InteractionCallback
type DialogElement ¶ added in v0.3.0
type DialogElement interface{}
DialogElement abstract type for dialogs.
type DialogInput ¶ added in v0.4.0
type DialogInput struct { Type InputType `json:"type"` Label string `json:"label"` Name string `json:"name"` Placeholder string `json:"placeholder"` Optional bool `json:"optional"` Hint string `json:"hint"` }
DialogInput for dialogs input type text or menu
type DialogInputSelect ¶ added in v0.4.0
type DialogInputSelect struct { DialogInput Value string `json:"value,omitempty"` //Optional. DataSource SelectDataSource `json:"data_source,omitempty"` //Optional. Allowed values: "users", "channels", "conversations", "external". SelectedOptions []DialogSelectOption `json:"selected_options,omitempty"` //Optional. May hold at most one element, for use with "external" only. Options []DialogSelectOption `json:"options,omitempty"` //One of options or option_groups is required. OptionGroups []DialogOptionGroup `json:"option_groups,omitempty"` //Provide up to 100 options. MinQueryLength int `json:"min_query_length,omitempty"` //Optional. minimum characters before query is sent. Hint string `json:"hint,omitempty"` //Optional. Additional hint text. }
DialogInputSelect dialog support for select boxes.
func NewChannelsSelect ¶ added in v0.4.0
func NewChannelsSelect(name, label string) *DialogInputSelect
NewChannelsSelect returns a `Channels` select
func NewConversationsSelect ¶ added in v0.4.0
func NewConversationsSelect(name, label string) *DialogInputSelect
NewConversationsSelect returns a `Conversations` select
func NewExternalSelectDialogInput ¶ added in v0.9.2
func NewExternalSelectDialogInput(name, label string, options []DialogSelectOption) *DialogInputSelect
NewExternalSelectDialogInput constructor for a `external` datasource menu input
func NewGroupedSelectDialogInput ¶ added in v0.4.0
func NewGroupedSelectDialogInput(name, label string, options []DialogOptionGroup) *DialogInputSelect
NewGroupedSelectDialogInput creates grouped options select input for Dialogs.
func NewStaticSelectDialogInput ¶ added in v0.4.0
func NewStaticSelectDialogInput(name, label string, options []DialogSelectOption) *DialogInputSelect
NewStaticSelectDialogInput constructor for a `static` datasource menu input
func NewUsersSelect ¶ added in v0.4.0
func NewUsersSelect(name, label string) *DialogInputSelect
NewUsersSelect returns a `Users` select
type DialogInputValidationError ¶ added in v0.5.0
DialogInputValidationError is an error when user inputs incorrect value to form from within a dialog
type DialogInputValidationErrors ¶ added in v0.5.0
type DialogInputValidationErrors struct {
Errors []DialogInputValidationError `json:"errors"`
}
DialogInputValidationErrors lists the name of field and that error messages
type DialogOpenResponse ¶ added in v0.4.0
type DialogOpenResponse struct { SlackResponse DialogResponseMetadata DialogResponseMetadata `json:"response_metadata"` }
DialogOpenResponse response from `dialog.open`
type DialogOptionGroup ¶ added in v0.4.0
type DialogOptionGroup struct { Label string `json:"label"` Options []DialogSelectOption `json:"options"` }
DialogOptionGroup is a collection of options for creating a segmented table
func NewDialogOptionGroup ¶ added in v0.6.1
func NewDialogOptionGroup(label string, options ...DialogSelectOption) DialogOptionGroup
NewDialogOptionGroup creates a DialogOptionGroup from several select options
type DialogResponseMetadata ¶ added in v0.4.0
type DialogResponseMetadata struct {
Messages []string `json:"messages"`
}
DialogResponseMetadata lists the error messages
type DialogSelectOption ¶ added in v0.4.0
DialogSelectOption is an option for the user to select from the menu
type DialogSubmissionCallback ¶ added in v0.5.0
type DialogSubmissionCallback struct { // NOTE: State is only used with the dialog_submission type. // You should use InteractionCallback.BlockActionsState for block_actions type. State string `json:"-"` Submission map[string]string `json:"submission"` }
DialogSubmissionCallback is sent from Slack when a user submits a form from within a dialog
type DialogTrigger ¶ added in v0.3.0
type DialogTrigger struct { TriggerID string `json:"trigger_id"` //Required. Must respond within 3 seconds. Dialog Dialog `json:"dialog"` //Required. }
DialogTrigger ...
type DisconnectedEvent ¶ added in v0.1.0
DisconnectedEvent contains information about how we disconnected
type DispatchActionConfig ¶ added in v0.10.0
type DispatchActionConfig struct {
TriggerActionsOn []string `json:"trigger_actions_on,omitempty"`
}
type Display ¶ added in v0.12.3
type Display struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` LongDescription string `json:"long_description,omitempty" yaml:"long_description,omitempty"` BackgroundColor string `json:"background_color,omitempty" yaml:"background_color,omitempty"` }
Display is a group of settings that describe parts of an app's appearance within Slack
type DividerBlock ¶ added in v0.6.1
type DividerBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` }
DividerBlock for displaying a divider line between blocks (similar to <hr> tag in html)
More Information: https://api.slack.com/reference/messaging/blocks#divider
func NewDividerBlock ¶ added in v0.6.1
func NewDividerBlock() *DividerBlock
NewDividerBlock returns a new instance of a divider block
func (DividerBlock) BlockType ¶ added in v0.6.1
func (s DividerBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (DividerBlock) ID ¶ added in v0.16.0
func (s DividerBlock) ID() string
ID returns the ID of the block
type DocumentContent ¶ added in v0.15.0
type EditBookmarkParameters ¶ added in v0.11.0
type EditCanvasParams ¶ added in v0.15.0
type EditCanvasParams struct { CanvasID string `json:"canvas_id"` Changes []CanvasChange `json:"changes"` }
type EmailDomainChangedEvent ¶
type EmailDomainChangedEvent struct { Type string `json:"type"` EventTimestamp string `json:"event_ts"` EmailDomain string `json:"email_domain"` }
EmailDomainChangedEvent represents the email domain changed event
type EmailFileUserInfo ¶ added in v0.16.0
type EmailTextInputBlockElement ¶ added in v0.12.0
type EmailTextInputBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialValue string `json:"initial_value,omitempty"` DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` FocusOnLoad bool `json:"focus_on_load,omitempty"` }
EmailTextInputBlockElement creates a field where a user can enter email data. email-text-input elements are currently only available in modals.
More Information: https://api.slack.com/reference/block-kit/block-elements#email
func NewEmailTextInputBlockElement ¶ added in v0.12.0
func NewEmailTextInputBlockElement(placeholder *TextBlockObject, actionID string) *EmailTextInputBlockElement
NewEmailTextInputBlockElement returns an instance of a plain-text input element
func (EmailTextInputBlockElement) ElementType ¶ added in v0.12.0
func (s EmailTextInputBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type EmojiChangedEvent ¶
type EmojiChangedEvent struct { Type string `json:"type"` SubType string `json:"subtype"` Name string `json:"name"` Names []string `json:"names"` Value string `json:"value"` EventTimestamp string `json:"event_ts"` }
EmojiChangedEvent represents the emoji changed event
type EndCallParameters ¶ added in v0.15.0
type Enterprise ¶ added in v0.9.5
type EnterpriseUser ¶ added in v0.6.1
type EnterpriseUser struct { ID string `json:"id"` EnterpriseID string `json:"enterprise_id"` EnterpriseName string `json:"enterprise_name"` IsAdmin bool `json:"is_admin"` IsOwner bool `json:"is_owner"` Teams []string `json:"teams"` }
EnterpriseUser is present when a user is part of Slack Enterprise Grid https://api.slack.com/types/user#enterprise_grid_user_objects
type Event ¶
type Event struct {
Type string `json:"type,omitempty"`
}
Event contains the event type
type EventAuthorization ¶ added in v0.7.2
type EventSubscriptions ¶ added in v0.12.3
type EventSubscriptions struct { RequestUrl string `json:"request_url,omitempty" yaml:"request_url,omitempty"` BotEvents []string `json:"bot_events,omitempty" yaml:"bot_events,omitempty"` UserEvents []string `json:"user_events,omitempty" yaml:"user_events,omitempty"` }
EventSubscriptions is a group of settings that describe the Events API configuration
type ExportManifestResponse ¶ added in v0.12.3
type ExportManifestResponse struct { Manifest Manifest `json:"manifest,omitempty"` SlackResponse }
type Features ¶ added in v0.12.3
type Features struct { AppHome AppHome `json:"app_home,omitempty" yaml:"app_home,omitempty"` BotUser BotUser `json:"bot_user,omitempty" yaml:"bot_user,omitempty"` Shortcuts []Shortcut `json:"shortcuts,omitempty" yaml:"shortcuts,omitempty"` SlashCommands []ManifestSlashCommand `json:"slash_commands,omitempty" yaml:"slash_commands,omitempty"` WorkflowSteps []WorkflowStep `json:"workflow_steps,omitempty" yaml:"workflow_steps,omitempty"` }
Features is a group of settings corresponding to the Features section of the app config pages
type File ¶
type File struct { ID string `json:"id"` Created JSONTime `json:"created"` Timestamp JSONTime `json:"timestamp"` Name string `json:"name"` Title string `json:"title"` Mimetype string `json:"mimetype"` ImageExifRotation int `json:"image_exif_rotation"` Filetype string `json:"filetype"` PrettyType string `json:"pretty_type"` User string `json:"user"` Mode string `json:"mode"` Editable bool `json:"editable"` IsExternal bool `json:"is_external"` ExternalType string `json:"external_type"` Size int `json:"size"` URL string `json:"url"` // Deprecated - never set URLDownload string `json:"url_download"` // Deprecated - never set URLPrivate string `json:"url_private"` URLPrivateDownload string `json:"url_private_download"` OriginalH int `json:"original_h"` OriginalW int `json:"original_w"` Thumb64 string `json:"thumb_64"` Thumb80 string `json:"thumb_80"` Thumb160 string `json:"thumb_160"` Thumb360 string `json:"thumb_360"` Thumb360Gif string `json:"thumb_360_gif"` 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"` Thumb720 string `json:"thumb_720"` Thumb720W int `json:"thumb_720_w"` Thumb720H int `json:"thumb_720_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"` Permalink string `json:"permalink"` PermalinkPublic string `json:"permalink_public"` EditLink string `json:"edit_link"` Preview string `json:"preview"` PreviewHighlight string `json:"preview_highlight"` Lines int `json:"lines"` LinesMore int `json:"lines_more"` IsPublic bool `json:"is_public"` Channels []string `json:"channels"` Groups []string `json:"groups"` IMs []string `json:"ims"` InitialComment Comment `json:"initial_comment"` CommentsCount int `json:"comments_count"` NumStars int `json:"num_stars"` IsStarred bool `json:"is_starred"` Subject string `json:"subject"` To []EmailFileUserInfo `json:"to"` From []EmailFileUserInfo `json:"from"` Cc []EmailFileUserInfo `json:"cc"` }
File contains all the information for a file
type FileBlock ¶ added in v0.6.3
type FileBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` ExternalID string `json:"external_id"` Source string `json:"source"` }
FileBlock defines data that is used to display a remote file.
More Information: https://api.slack.com/reference/block-kit/blocks#file
func NewFileBlock ¶ added in v0.6.3
NewFileBlock returns a new instance of a file block
func (FileBlock) BlockType ¶ added in v0.6.3
func (s FileBlock) BlockType() MessageBlockType
BlockType returns the type of the block
type FileChangeEvent ¶
type FileChangeEvent fileActionEvent
FileChangeEvent represents the File change event
type FileCommentAddedEvent ¶
type FileCommentAddedEvent struct { Comment Comment `json:"comment"` // contains filtered or unexported fields }
FileCommentAddedEvent represents the File comment added event
type FileCommentDeletedEvent ¶
type FileCommentDeletedEvent struct { Comment string `json:"comment"` // contains filtered or unexported fields }
FileCommentDeletedEvent represents the File comment deleted event
type FileCommentEditedEvent ¶
type FileCommentEditedEvent struct { Comment Comment `json:"comment"` // contains filtered or unexported fields }
FileCommentEditedEvent represents the File comment edited event
type FileCreatedEvent ¶
type FileCreatedEvent fileActionEvent
FileCreatedEvent represents the File created event
type FileDeletedEvent ¶
type FileDeletedEvent fileActionEvent
FileDeletedEvent represents the File deleted event
type FileInputBlockElement ¶ added in v0.12.4
type FileInputBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` FileTypes []string `json:"filetypes,omitempty"` MaxFiles int `json:"max_files,omitempty"` }
FileInputBlockElement creates a field where a user can upload a file.
File input elements are currently only available in modals.
More Information: https://api.slack.com/reference/block-kit/block-elements#file_input
func NewFileInputBlockElement ¶ added in v0.12.4
func NewFileInputBlockElement(actionID string) *FileInputBlockElement
NewFileInputBlockElement returns an instance of a file input element
func (FileInputBlockElement) ElementType ¶ added in v0.12.4
func (s FileInputBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (*FileInputBlockElement) WithFileTypes ¶ added in v0.12.4
func (s *FileInputBlockElement) WithFileTypes(fileTypes ...string) *FileInputBlockElement
WithFileTypes sets the file types that can be uploaded
func (*FileInputBlockElement) WithMaxFiles ¶ added in v0.12.4
func (s *FileInputBlockElement) WithMaxFiles(maxFiles int) *FileInputBlockElement
WithMaxFiles sets the maximum number of files that can be uploaded
type FilePrivateEvent ¶
type FilePrivateEvent fileActionEvent
FilePrivateEvent represents the File private event
type FilePublicEvent ¶
type FilePublicEvent fileActionEvent
FilePublicEvent represents the File public event
type FileSharedEvent ¶
type FileSharedEvent fileActionEvent
FileSharedEvent represents the File shared event
type FileSummary ¶ added in v0.12.1
type FileUnsharedEvent ¶
type FileUnsharedEvent fileActionEvent
FileUnsharedEvent represents the File unshared event
type FileUploadParameters ¶
type FileUploadParameters struct { File string Content string Reader io.Reader Filetype string Filename string Title string InitialComment string Channels []string ThreadTimestamp string }
FileUploadParameters contains all the parameters necessary (including the optional ones) for an UploadFile() request.
There are three ways to upload a file. You can either set Content if file is small, set Reader if file is large, or provide a local file path in File to upload it from your filesystem.
Note that when using the Reader option, you *must* specify the Filename, otherwise the Slack API isn't happy.
type FunctionCompleteErrorRequest ¶ added in v0.15.0
type FunctionCompleteSuccessRequest ¶ added in v0.15.0
type FunctionCompleteSuccessRequestOption ¶ added in v0.15.0
type FunctionCompleteSuccessRequestOption func(opt *FunctionCompleteSuccessRequest) error
func FunctionCompleteSuccessRequestOptionOutput ¶ added in v0.15.0
func FunctionCompleteSuccessRequestOptionOutput(outputs map[string]string) FunctionCompleteSuccessRequestOption
type GetBillableInfoParams ¶ added in v0.13.0
type GetBotInfoParameters ¶ added in v0.13.0
type GetConversationHistoryParameters ¶ added in v0.2.0
type GetConversationHistoryResponse ¶ added in v0.2.0
type GetConversationInfoInput ¶ added in v0.12.0
GetConversationInfoInput Defines the parameters of a GetConversationInfo and GetConversationInfoContext function
type GetConversationRepliesParameters ¶ added in v0.2.0
type GetConversationsForUserParameters ¶ added in v0.4.0
type GetConversationsParameters ¶ added in v0.2.0
type GetFilesParameters ¶
type GetFilesParameters struct { User string Channel string TeamID string TimestampFrom JSONTime TimestampTo JSONTime Types string Count int Page int ShowHidden bool }
GetFilesParameters contains all the parameters necessary (including the optional ones) for a GetFiles() request
func NewGetFilesParameters ¶
func NewGetFilesParameters() GetFilesParameters
NewGetFilesParameters provides an instance of GetFilesParameters with all the sane default values set
type GetReactionsParameters ¶
type GetReactionsParameters struct {
Full bool
}
GetReactionsParameters is the inputs to get reactions to an item.
func NewGetReactionsParameters ¶
func NewGetReactionsParameters() GetReactionsParameters
NewGetReactionsParameters initializes the inputs to get reactions to an item.
type GetScheduledMessagesParameters ¶ added in v0.6.3
type GetUserGroupsOption ¶ added in v0.4.0
type GetUserGroupsOption func(*GetUserGroupsParams)
GetUserGroupsOption options for the GetUserGroups method call.
func GetUserGroupsOptionIncludeCount ¶ added in v0.4.0
func GetUserGroupsOptionIncludeCount(b bool) GetUserGroupsOption
GetUserGroupsOptionIncludeCount include the number of users in each User Group (default: false)
func GetUserGroupsOptionIncludeDisabled ¶ added in v0.4.0
func GetUserGroupsOptionIncludeDisabled(b bool) GetUserGroupsOption
GetUserGroupsOptionIncludeDisabled include disabled User Groups (default: false)
func GetUserGroupsOptionIncludeUsers ¶ added in v0.4.0
func GetUserGroupsOptionIncludeUsers(b bool) GetUserGroupsOption
GetUserGroupsOptionIncludeUsers include the list of users for each User Group (default: false)
func GetUserGroupsOptionWithTeamID ¶ added in v0.13.0
func GetUserGroupsOptionWithTeamID(teamID string) GetUserGroupsOption
type GetUserGroupsParams ¶ added in v0.4.0
type GetUserGroupsParams struct { TeamID string IncludeCount bool IncludeDisabled bool IncludeUsers bool }
GetUserGroupsParams contains arguments for GetUserGroups method call
type GetUserProfileParameters ¶ added in v0.9.0
GetUserProfileParameters are the parameters required to get user profile
type GetUsersInConversationParameters ¶ added in v0.2.0
type GetUsersOption ¶ added in v0.3.0
type GetUsersOption func(*UserPagination)
GetUsersOption options for the GetUsers method call.
func GetUsersOptionLimit ¶ added in v0.3.0
func GetUsersOptionLimit(n int) GetUsersOption
GetUsersOptionLimit limit the number of users returned
func GetUsersOptionPresence ¶ added in v0.3.0
func GetUsersOptionPresence(n bool) GetUsersOption
GetUsersOptionPresence include user presence
func GetUsersOptionTeamID ¶ added in v0.11.1
func GetUsersOptionTeamID(teamId string) GetUsersOption
GetUsersOptionTeamID include team Id
type Group ¶
type Group struct { GroupConversation IsGroup bool `json:"is_group"` }
Group contains all the information for a group
type GroupArchiveEvent ¶
type GroupArchiveEvent ChannelInfoEvent
GroupArchiveEvent represents the Group archive event
type GroupCloseEvent ¶
type GroupCloseEvent ChannelInfoEvent
GroupCloseEvent represents the Group close event
type GroupConversation ¶ added in v0.6.1
type GroupConversation struct { Conversation Name string `json:"name"` Creator string `json:"creator"` IsArchived bool `json:"is_archived"` Members []string `json:"members"` Topic Topic `json:"topic"` Purpose Purpose `json:"purpose"` }
GroupConversation is the foundation for Group and Channel
type GroupCreatedEvent ¶
type GroupCreatedEvent struct { Type string `json:"type"` User string `json:"user"` Channel ChannelCreatedInfo `json:"channel"` }
GroupCreatedEvent represents the Group created event
type GroupHistoryChangedEvent ¶
type GroupHistoryChangedEvent ChannelHistoryChangedEvent
GroupHistoryChangedEvent represents the Group history changed event
type GroupJoinedEvent ¶
type GroupJoinedEvent ChannelJoinedEvent
GroupJoinedEvent represents the Group joined event
type GroupLeftEvent ¶
type GroupLeftEvent ChannelInfoEvent
GroupLeftEvent represents the Group left event
type GroupMarkedEvent ¶
type GroupMarkedEvent ChannelInfoEvent
GroupMarkedEvent represents the Group marked event
type GroupOpenEvent ¶
type GroupOpenEvent ChannelInfoEvent
GroupOpenEvent represents the Group open event
type GroupRenameEvent ¶
type GroupRenameEvent struct { Type string `json:"type"` Group GroupRenameInfo `json:"channel"` Timestamp string `json:"ts"` }
GroupRenameEvent represents the Group rename event
type GroupRenameInfo ¶ added in v0.1.0
type GroupRenameInfo struct { ID string `json:"id"` Name string `json:"name"` Created string `json:"created"` }
GroupRenameInfo represents the group info related to the renamed group
type GroupUnarchiveEvent ¶
type GroupUnarchiveEvent ChannelInfoEvent
GroupUnarchiveEvent represents the Group unarchive event
type HeaderBlock ¶ added in v0.6.6
type HeaderBlock struct { Type MessageBlockType `json:"type"` Text *TextBlockObject `json:"text,omitempty"` BlockID string `json:"block_id,omitempty"` }
HeaderBlock defines a new block of type header
More Information: https://api.slack.com/reference/messaging/blocks#header
func NewHeaderBlock ¶ added in v0.6.6
func NewHeaderBlock(textObj *TextBlockObject, options ...HeaderBlockOption) *HeaderBlock
NewHeaderBlock returns a new instance of a header block to be rendered
func (HeaderBlock) BlockType ¶ added in v0.6.6
func (s HeaderBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (HeaderBlock) ID ¶ added in v0.16.0
func (s HeaderBlock) ID() string
ID returns the ID of the block
type HeaderBlockOption ¶ added in v0.6.6
type HeaderBlockOption func(*HeaderBlock)
HeaderBlockOption allows configuration of options for a new header block
func HeaderBlockOptionBlockID ¶ added in v0.6.6
func HeaderBlockOptionBlockID(blockID string) HeaderBlockOption
type History ¶
type History struct { Latest string `json:"latest"` Messages []Message `json:"messages"` HasMore bool `json:"has_more"` Unread int `json:"unread_count_display"` }
History contains message history information needed to navigate a Channel / Group / DM history
type HistoryParameters ¶
HistoryParameters contains all the necessary information to help in the retrieval of history for Channels/Groups/DMs
func NewHistoryParameters ¶
func NewHistoryParameters() HistoryParameters
NewHistoryParameters provides an instance of HistoryParameters with all the sane default values set
type HomeTabViewRequest ¶ added in v0.6.2
type HomeTabViewRequest struct { Type ViewType `json:"type"` Blocks Blocks `json:"blocks"` PrivateMetadata string `json:"private_metadata,omitempty"` CallbackID string `json:"callback_id,omitempty"` ExternalID string `json:"external_id,omitempty"` }
func (*HomeTabViewRequest) ViewType ¶ added in v0.6.2
func (v *HomeTabViewRequest) ViewType() ViewType
type IDGenerator ¶ added in v0.1.0
type IDGenerator interface {
Next() int
}
IDGenerator provides an interface for generating integer ID values.
func NewSafeID ¶ added in v0.1.0
func NewSafeID(startID int) IDGenerator
NewSafeID returns a new instance of an IDGenerator which is safe for concurrent use by multiple goroutines.
type IM ¶
type IM struct { Conversation IsUserDeleted bool `json:"is_user_deleted"` }
IM contains information related to the Direct Message channel
type IMCreatedEvent ¶
type IMCreatedEvent struct { Type string `json:"type"` User string `json:"user"` Channel ChannelCreatedInfo `json:"channel"` }
IMCreatedEvent represents the IM created event
type IMHistoryChangedEvent ¶
type IMHistoryChangedEvent ChannelHistoryChangedEvent
IMHistoryChangedEvent represents the IM history changed event
type IMMarkedEvent ¶
type IMMarkedEvent ChannelInfoEvent
IMMarkedEvent represents the IM marked event
type IMMarkedHistoryChanged ¶
type IMMarkedHistoryChanged ChannelInfoEvent
IMMarkedHistoryChanged represents the IM marked history changed event
type Icon ¶ added in v0.1.0
type Icon struct { IconURL string `json:"icon_url,omitempty"` IconEmoji string `json:"icon_emoji,omitempty"` }
Icon is used for bot messages
type Icons ¶
type Icons struct { Image36 string `json:"image_36,omitempty"` Image48 string `json:"image_48,omitempty"` Image72 string `json:"image_72,omitempty"` }
Icons XXX: needs further investigation
type ImageBlock ¶ added in v0.6.1
type ImageBlock struct { Type MessageBlockType `json:"type"` ImageURL string `json:"image_url,omitempty"` AltText string `json:"alt_text"` BlockID string `json:"block_id,omitempty"` Title *TextBlockObject `json:"title,omitempty"` SlackFile *SlackFileObject `json:"slack_file,omitempty"` }
ImageBlock defines data required to display an image as a block element
More Information: https://api.slack.com/reference/messaging/blocks#image
func NewImageBlock ¶ added in v0.6.1
func NewImageBlock(imageURL, altText, blockID string, title *TextBlockObject) *ImageBlock
NewImageBlock returns an instance of a new Image Block type
func (ImageBlock) BlockType ¶ added in v0.6.1
func (s ImageBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (ImageBlock) ID ¶ added in v0.16.0
func (s ImageBlock) ID() string
ID returns the ID of the block
type ImageBlockElement ¶ added in v0.6.1
type ImageBlockElement struct { Type MessageElementType `json:"type"` ImageURL string `json:"image_url"` AltText string `json:"alt_text"` }
ImageBlockElement An element to insert an image - this element can be used in section and context blocks only. If you want a block with only an image in it, you're looking for the image block.
More Information: https://api.slack.com/reference/messaging/block-elements#image
func NewImageBlockElement ¶ added in v0.6.1
func NewImageBlockElement(imageURL, altText string) *ImageBlockElement
NewImageBlockElement returns a new instance of an image block element
func (ImageBlockElement) ElementType ¶ added in v0.6.1
func (s ImageBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (ImageBlockElement) MixedElementType ¶ added in v0.6.1
func (s ImageBlockElement) MixedElementType() MixedElementType
type IncomingEventError ¶ added in v0.1.0
type IncomingEventError struct {
ErrorObj error
}
IncomingEventError contains information about an unexpected error receiving a websocket event
func (*IncomingEventError) Error ¶ added in v0.1.0
func (i *IncomingEventError) Error() string
type Info ¶
type Info struct { URL string `json:"url,omitempty"` User *UserDetails `json:"self,omitempty"` Team *Team `json:"team,omitempty"` }
Info contains various details about the authenticated user and team. It is returned by StartRTM or included in the "ConnectedEvent" RTM event.
func (Info) GetBotByID ¶ added in v0.1.0
GetBotByID is deprecated and returns nil
func (Info) GetChannelByID ¶ added in v0.1.0
GetChannelByID is deprecated and returns nil
func (Info) GetGroupByID ¶ added in v0.1.0
GetGroupByID is deprecated and returns nil
func (Info) GetUserByID ¶ added in v0.1.0
GetUserByID is deprecated and returns nil
type InputBlock ¶ added in v0.6.1
type InputBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` Label *TextBlockObject `json:"label"` Element BlockElement `json:"element"` Hint *TextBlockObject `json:"hint,omitempty"` Optional bool `json:"optional,omitempty"` DispatchAction bool `json:"dispatch_action,omitempty"` }
InputBlock defines data that is used to display user input fields.
More Information: https://api.slack.com/reference/block-kit/blocks#input
func NewInputBlock ¶ added in v0.6.1
func NewInputBlock(blockID string, label, hint *TextBlockObject, element BlockElement) *InputBlock
NewInputBlock returns a new instance of an input block
func (InputBlock) BlockType ¶ added in v0.6.1
func (s InputBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (InputBlock) ID ¶ added in v0.16.0
func (s InputBlock) ID() string
ID returns the ID of the block
func (*InputBlock) UnmarshalJSON ¶ added in v0.6.1
func (b *InputBlock) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaller interface for InputBlock, so that any JSON unmarshalling is delegated and proper type determination can be made before unmarshal
func (*InputBlock) WithDispatchAction ¶ added in v0.15.0
func (s *InputBlock) WithDispatchAction(dispatchAction bool) *InputBlock
WithDispatchAction sets the dispatch action flag on the input block
func (*InputBlock) WithOptional ¶ added in v0.15.0
func (s *InputBlock) WithOptional(optional bool) *InputBlock
WithOptional sets the optional flag on the input block
type InputType ¶ added in v0.4.0
type InputType string
InputType is the type of the dialog input type
type InteractionCallback ¶ added in v0.5.0
type InteractionCallback struct { Type InteractionType `json:"type"` Token string `json:"token"` CallbackID string `json:"callback_id"` ResponseURL string `json:"response_url"` TriggerID string `json:"trigger_id"` ActionTs string `json:"action_ts"` Team Team `json:"team"` Channel Channel `json:"channel"` User User `json:"user"` OriginalMessage Message `json:"original_message"` Message Message `json:"message"` Name string `json:"name"` Value string `json:"value"` MessageTs string `json:"message_ts"` AttachmentID string `json:"attachment_id"` ActionCallback ActionCallbacks `json:"actions"` View View `json:"view"` ActionID string `json:"action_id"` APIAppID string `json:"api_app_id"` BlockID string `json:"block_id"` Container Container `json:"container"` Enterprise Enterprise `json:"enterprise"` IsEnterpriseInstall bool `json:"is_enterprise_install"` WorkflowStep InteractionWorkflowStep `json:"workflow_step"` DialogSubmissionCallback ViewSubmissionCallback ViewClosedCallback // FIXME(kanata2): just workaround for backward-compatibility. // See also https://github.com/slack-go/slack/issues/816 RawState json.RawMessage `json:"state,omitempty"` // BlockActionState stands for the `state` field in block_actions type. // NOTE: InteractionCallback.State has a role for the state of dialog_submission type, // so we cannot use this field for backward-compatibility for now. BlockActionState *BlockActionStates `json:"-"` }
InteractionCallback is sent from slack when a user interactions with a button or dialog.
func (*InteractionCallback) MarshalJSON ¶ added in v0.7.1
func (ic *InteractionCallback) MarshalJSON() ([]byte, error)
func (*InteractionCallback) UnmarshalJSON ¶ added in v0.7.1
func (ic *InteractionCallback) UnmarshalJSON(b []byte) error
type InteractionType ¶ added in v0.5.0
type InteractionType string
InteractionType type of interactions
type InteractionWorkflowStep ¶ added in v0.10.3
type InteractionWorkflowStep struct { WorkflowStepEditID string `json:"workflow_step_edit_id,omitempty"` WorkflowID string `json:"workflow_id"` StepID string `json:"step_id"` Inputs *WorkflowStepInputs `json:"inputs,omitempty"` Outputs *[]WorkflowStepOutput `json:"outputs,omitempty"` }
type Interactivity ¶ added in v0.12.3
type Interactivity struct { IsEnabled bool `json:"is_enabled" yaml:"is_enabled"` RequestUrl string `json:"request_url,omitempty" yaml:"request_url,omitempty"` MessageMenuOptionsUrl string `json:"message_menu_options_url,omitempty" yaml:"message_menu_options_url,omitempty"` }
Interactivity is a group of settings that describe the interactivity configuration
type InvalidAuthEvent ¶ added in v0.1.0
type InvalidAuthEvent struct{}
InvalidAuthEvent is used in case we can't even authenticate with the API
type InviteSharedToConversationParams ¶ added in v0.15.0
type InviteSharedToConversationParams struct {}
InviteSharedToConversationParams defines the parameters for the InviteSharedToConversation and InviteSharedToConversationContext functions.
type Item ¶
type Item struct { Type string `json:"type"` Channel string `json:"channel,omitempty"` Message *Message `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.
func NewChannelItem ¶
NewChannelItem turns a channel id into a typed channel struct.
func NewFileCommentItem ¶
NewFileCommentItem turns a file and comment into a typed file_comment struct.
func NewFileItem ¶
NewFileItem turns a file into a typed file struct.
func NewGroupItem ¶
NewGroupItem turns a channel id into a typed group struct.
func NewMessageItem ¶
NewMessageItem turns a message on a channel into a typed message struct.
type ItemReaction ¶
type ItemReaction struct { Name string `json:"name"` Count int `json:"count"` Users []string `json:"users"` }
ItemReaction is the reactions that have happened on an item.
type ItemRef ¶
type ItemRef struct { Channel string `json:"channel"` Timestamp string `json:"timestamp"` File string `json:"file"` Comment string `json:"file_comment"` }
ItemRef is a reference to a message of any type. One of FileID, CommentId, or the combination of ChannelId and Timestamp must be specified.
func NewRefToComment ¶
NewRefToComment initializes a reference to a file comment.
func NewRefToFile ¶
NewRefToFile initializes a reference to a file.
func NewRefToMessage ¶
NewRefToMessage initializes a reference to to a message.
type JSONTime ¶
type JSONTime int64
JSONTime exists so that we can have a String method converting the date
func (*JSONTime) UnmarshalJSON ¶ added in v0.3.0
UnmarshalJSON will unmarshal both string and int JSON values
type LatencyReport ¶
LatencyReport contains information about connection latency
type ListFilesParameters ¶ added in v0.6.1
type ListFilesParameters struct { Limit int User string Channel string TeamID string Types string Cursor string }
ListFilesParameters contains all the parameters necessary (including the optional ones) for a ListFiles() request
type ListReactionsParameters ¶
ListReactionsParameters is the inputs to find all reactions by a user.
func NewListReactionsParameters ¶
func NewListReactionsParameters() ListReactionsParameters
NewListReactionsParameters initializes the inputs to find all reactions performed by a user.
type ListRemoteFilesParameters ¶ added in v0.11.0
type ListRemoteFilesParameters struct { Channel string Cursor string Limit int TimestampFrom JSONTime TimestampTo JSONTime }
ListRemoteFilesParameters contains arguments for the ListRemoteFiles method. For more details: https://api.slack.com/methods/files.remote.list
type ListStarsOption ¶ added in v0.6.1
type ListStarsOption func(*StarredItemPagination)
ListStarsOption options for the GetUsers method call.
type ListTeamsParameters ¶ added in v0.12.0
type Login ¶ added in v0.1.0
type Login struct { UserID string `json:"user_id"` Username string `json:"username"` DateFirst int `json:"date_first"` DateLast int `json:"date_last"` Count int `json:"count"` IP string `json:"ip"` UserAgent string `json:"user_agent"` ISP string `json:"isp"` Country string `json:"country"` Region string `json:"region"` }
type LoginResponse ¶ added in v0.1.0
type LoginResponse struct { Logins []Login `json:"logins"` Paging `json:"paging"` SlackResponse }
type LookupCanvasSectionsCriteria ¶ added in v0.15.0
type LookupCanvasSectionsParams ¶ added in v0.15.0
type LookupCanvasSectionsParams struct { CanvasID string `json:"canvas_id"` Criteria LookupCanvasSectionsCriteria `json:"criteria"` }
type LookupCanvasSectionsResponse ¶ added in v0.15.0
type LookupCanvasSectionsResponse struct { SlackResponse Sections []CanvasSection `json:"sections"` }
type Manifest ¶ added in v0.12.3
type Manifest struct { Metadata ManifestMetadata `json:"_metadata,omitempty" yaml:"_metadata,omitempty"` Display Display `json:"display_information" yaml:"display_information"` Settings Settings `json:"settings,omitempty" yaml:"settings,omitempty"` Features Features `json:"features,omitempty" yaml:"features,omitempty"` OAuthConfig OAuthConfig `json:"oauth_config,omitempty" yaml:"oauth_config,omitempty"` }
Manifest is an application manifest schema
type ManifestMetadata ¶ added in v0.12.3
type ManifestMetadata struct { MajorVersion int `json:"major_version,omitempty" yaml:"major_version,omitempty"` MinorVersion int `json:"minor_version,omitempty" yaml:"minor_version,omitempty"` }
ManifestMetadata is a group of settings that describe the manifest
type ManifestResponse ¶ added in v0.12.3
type ManifestResponse struct { Errors []ManifestValidationError `json:"errors,omitempty"` SlackResponse }
ManifestResponse is the response returned by the API for apps.manifest.x endpoints
type ManifestSlashCommand ¶ added in v0.12.3
type ManifestSlashCommand struct { Command string `json:"command" yaml:"command"` Description string `json:"description" yaml:"description"` ShouldEscape bool `json:"should_escape,omitempty" yaml:"should_escape,omitempty"` Url string `json:"url,omitempty" yaml:"url,omitempty"` UsageHint string `json:"usage_hint,omitempty" yaml:"usage_hint,omitempty"` }
ManifestSlashCommand is a group of settings that describes slash command configuration
type ManifestValidationError ¶ added in v0.12.3
type ManifestValidationError struct { Message string `json:"message"` Pointer string `json:"pointer"` }
ManifestValidationError is an error message returned for invalid manifests
type ManualPresenceChangeEvent ¶
type ManualPresenceChangeEvent struct { Type string `json:"type"` Presence string `json:"presence"` }
ManualPresenceChangeEvent represents the manual presence change event
type MemberJoinedChannelEvent ¶ added in v0.3.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"` }
MemberJoinedChannelEvent, a user joined a public or private channel
type MemberLeftChannelEvent ¶ added in v0.3.0
type MemberLeftChannelEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` ChannelType string `json:"channel_type"` Team string `json:"team"` }
MemberLeftChannelEvent a user left a public or private channel
type Message ¶
type Message struct { Msg SubMessage *Msg `json:"message,omitempty"` PreviousMessage *Msg `json:"previous_message,omitempty"` }
Message is an auxiliary type to allow us to have a message containing sub messages
func AddBlockMessage ¶ added in v0.6.1
AddBlockMessage appends a block to the end of the existing list of blocks
func NewBlockMessage ¶ added in v0.6.1
NewBlockMessage creates a new Message that contains one or more blocks to be displayed
type MessageBlockType ¶ added in v0.6.1
type MessageBlockType string
MessageBlockType defines a named string type to define each block type as a constant for use within the package.
const ( MBTSection MessageBlockType = "section" MBTDivider MessageBlockType = "divider" MBTImage MessageBlockType = "image" MBTAction MessageBlockType = "actions" MBTContext MessageBlockType = "context" MBTFile MessageBlockType = "file" MBTInput MessageBlockType = "input" MBTHeader MessageBlockType = "header" MBTRichText MessageBlockType = "rich_text" MBTCall MessageBlockType = "call" MBTVideo MessageBlockType = "video" )
type MessageElementType ¶ added in v0.6.1
type MessageElementType string
type MessageEvent ¶
type MessageEvent Message
MessageEvent represents a Slack Message (used as the event type for an incoming message)
type MessageObjectType ¶ added in v0.6.1
type MessageObjectType string
type MessageTooLongEvent ¶ added in v0.1.0
type MessageTooLongEvent struct { Message OutgoingMessage MaxLength int }
MessageTooLongEvent is used when sending a message that is too long
func (*MessageTooLongEvent) Error ¶ added in v0.1.0
func (m *MessageTooLongEvent) Error() string
type MixedElement ¶ added in v0.6.1
type MixedElement interface {
MixedElementType() MixedElementType
}
type MixedElementType ¶ added in v0.6.1
type MixedElementType string
type MobileInAppNotificationEvent ¶ added in v0.6.3
type MobileInAppNotificationEvent struct { Type string `json:"type"` Title string `json:"title"` Subtitle string `json:"subtitle"` Timestamp string `json:"ts"` Channel string `json:"channel"` AvatarImage string `json:"avatarImage"` ChannelName string `json:"channel_name"` AuthorID string `json:"author_id"` AuthorDisplayName string `json:"author_display_name"` MessageText string `json:"msg_text"` PushID string `json:"push_id"` NotifcationID string `json:"notif_id"` MobileLaunchURI string `json:"mobileLaunchUri"` EventTimestamp string `json:"event_ts"` }
MobileInAppNotificationEvent represents the update event for Mobile App Notification.
type ModalViewRequest ¶ added in v0.6.2
type ModalViewRequest struct { Type ViewType `json:"type"` Title *TextBlockObject `json:"title,omitempty"` Blocks Blocks `json:"blocks"` Close *TextBlockObject `json:"close,omitempty"` Submit *TextBlockObject `json:"submit,omitempty"` PrivateMetadata string `json:"private_metadata,omitempty"` CallbackID string `json:"callback_id,omitempty"` ClearOnClose bool `json:"clear_on_close,omitempty"` NotifyOnClose bool `json:"notify_on_close,omitempty"` ExternalID string `json:"external_id,omitempty"` }
func (*ModalViewRequest) ViewType ¶ added in v0.6.2
func (v *ModalViewRequest) ViewType() ViewType
type Msg ¶
type Msg struct { // Basic Message ClientMsgID string `json:"client_msg_id,omitempty"` Type string `json:"type,omitempty"` Channel string `json:"channel,omitempty"` User string `json:"user,omitempty"` Text string `json:"text,omitempty"` Timestamp string `json:"ts,omitempty"` ThreadTimestamp string `json:"thread_ts,omitempty"` IsStarred bool `json:"is_starred,omitempty"` PinnedTo []string `json:"pinned_to,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` Edited *Edited `json:"edited,omitempty"` LastRead string `json:"last_read,omitempty"` Subscribed bool `json:"subscribed,omitempty"` UnreadCount int `json:"unread_count,omitempty"` // Message Subtypes SubType string `json:"subtype,omitempty"` // Hidden Subtypes Hidden bool `json:"hidden,omitempty"` // message_changed, message_deleted, unpinned_item DeletedTimestamp string `json:"deleted_ts,omitempty"` // message_deleted EventTimestamp string `json:"event_ts,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"` BotProfile *BotProfile `json:"bot_profile,omitempty"` // channel_join, group_join Inviter string `json:"inviter,omitempty"` // channel_topic, group_topic Topic string `json:"topic,omitempty"` // channel_purpose, group_purpose Purpose string `json:"purpose,omitempty"` // channel_name, group_name Name string `json:"name,omitempty"` OldName string `json:"old_name,omitempty"` // channel_archive, group_archive Members []string `json:"members,omitempty"` // channels.replies, groups.replies, im.replies, mpim.replies ReplyCount int `json:"reply_count,omitempty"` ReplyUsers []string `json:"reply_users,omitempty"` Replies []Reply `json:"replies,omitempty"` ParentUserId string `json:"parent_user_id,omitempty"` LatestReply string `json:"latest_reply,omitempty"` // file_share, file_comment, file_mention Files []File `json:"files,omitempty"` // file_share Upload bool `json:"upload,omitempty"` // file_comment Comment *Comment `json:"comment,omitempty"` // pinned_item ItemType string `json:"item_type,omitempty"` // https://api.slack.com/rtm ReplyTo int `json:"reply_to,omitempty"` Team string `json:"team,omitempty"` // reactions Reactions []ItemReaction `json:"reactions,omitempty"` // slash commands and interactive messages ResponseType string `json:"response_type,omitempty"` ReplaceOriginal bool `json:"replace_original"` DeleteOriginal bool `json:"delete_original"` // metadata Metadata SlackMetadata `json:"metadata,omitempty"` // Block type Message Blocks Blocks `json:"blocks,omitempty"` // permalink Permalink string `json:"permalink,omitempty"` }
Msg contains information about a slack message
type MsgOption ¶ added in v0.1.0
type MsgOption func(*sendConfig) error
MsgOption option provided when sending a message.
func MsgOptionAsUser ¶ added in v0.1.0
MsgOptionAsUser whether or not to send the message as the user.
func MsgOptionAttachments ¶ added in v0.1.0
func MsgOptionAttachments(attachments ...Attachment) MsgOption
MsgOptionAttachments provide attachments for the message.
func MsgOptionBlocks ¶ added in v0.6.1
MsgOptionBlocks sets blocks for the message
func MsgOptionBroadcast ¶ added in v0.3.0
func MsgOptionBroadcast() MsgOption
MsgOptionBroadcast sets reply_broadcast to true
func MsgOptionCompose ¶ added in v0.3.0
MsgOptionCompose combines multiple options into a single option.
func MsgOptionDelete ¶ added in v0.1.0
MsgOptionDelete deletes a message based on the timestamp.
func MsgOptionDeleteOriginal ¶ added in v0.6.4
MsgOptionDeleteOriginal deletes original message with response url
func MsgOptionDisableLinkUnfurl ¶ added in v0.2.0
func MsgOptionDisableLinkUnfurl() MsgOption
MsgOptionDisableLinkUnfurl disables link unfurling
func MsgOptionDisableMarkdown ¶ added in v0.1.0
func MsgOptionDisableMarkdown() MsgOption
MsgOptionDisableMarkdown disables markdown.
func MsgOptionDisableMediaUnfurl ¶ added in v0.1.0
func MsgOptionDisableMediaUnfurl() MsgOption
MsgOptionDisableMediaUnfurl disables media unfurling.
func MsgOptionEnableLinkUnfurl ¶ added in v0.1.0
func MsgOptionEnableLinkUnfurl() MsgOption
MsgOptionEnableLinkUnfurl enables link unfurling
func MsgOptionIconEmoji ¶ added in v0.6.1
MsgOptionIconEmoji sets an icon emoji
func MsgOptionIconURL ¶ added in v0.6.1
MsgOptionIconURL sets an icon URL
func MsgOptionLinkNames ¶ added in v0.13.0
MsgOptionLinkNames finds and links user groups. Does not support linking individual users
func MsgOptionMeMessage ¶ added in v0.3.0
func MsgOptionMeMessage() MsgOption
MsgOptionMeMessage posts a "me message" type from the calling user
func MsgOptionMetadata ¶ added in v0.11.1
func MsgOptionMetadata(metadata SlackMetadata) MsgOption
MsgOptionMetadata sets message metadata
func MsgOptionParse ¶ added in v0.3.0
MsgOptionParse set parse option.
func MsgOptionPost ¶ added in v0.1.0
func MsgOptionPost() MsgOption
MsgOptionPost posts a messages, this is the default.
func MsgOptionPostEphemeral ¶ added in v0.2.0
MsgOptionPostEphemeral - posts an ephemeral message to the provided user.
func MsgOptionPostMessageParameters ¶ added in v0.1.0
func MsgOptionPostMessageParameters(params PostMessageParameters) MsgOption
MsgOptionPostMessageParameters maintain backwards compatibility.
func MsgOptionReplaceOriginal ¶ added in v0.6.4
MsgOptionReplaceOriginal replaces original message with response url
func MsgOptionResponseURL ¶ added in v0.6.1
MsgOptionResponseURL supplies a url to use as the endpoint.
func MsgOptionSchedule ¶ added in v0.6.3
MsgOptionSchedule schedules a messages.
func MsgOptionTS ¶ added in v0.3.0
MsgOptionTS sets the thread TS of the message to enable creating or replying to a thread
func MsgOptionText ¶ added in v0.1.0
MsgOptionText provide the text for the message, optionally escape the provided text.
func MsgOptionUnfurl ¶ added in v0.5.0
func MsgOptionUnfurl(timestamp string, unfurls map[string]Attachment) MsgOption
MsgOptionUnfurl unfurls a message based on the timestamp.
func MsgOptionUnfurlAuthMessage ¶ added in v0.8.0
MsgOptionUnfurlAuthMessage attaches a message inviting the user to authenticate.
func MsgOptionUnfurlAuthRequired ¶ added in v0.8.0
MsgOptionUnfurlAuthRequired requests that the user installs the Slack app for unfurling.
func MsgOptionUnfurlAuthURL ¶ added in v0.8.0
MsgOptionUnfurlAuthURL unfurls a message using an auth url based on the timestamp.
func MsgOptionUpdate ¶ added in v0.1.0
MsgOptionUpdate updates a message based on the timestamp.
func MsgOptionUser ¶ added in v0.3.0
MsgOptionUser set the user for the message.
func MsgOptionUsername ¶ added in v0.5.0
MsgOptionUsername set the username for the message.
func UnsafeMsgOptionEndpoint ¶ added in v0.4.0
UnsafeMsgOptionEndpoint deliver the message to the specified endpoint. NOTE: USE AT YOUR OWN RISK: No issues relating to the use of this Option will be supported by the library, it is subject to change without notice that may result in compilation errors or runtime behaviour changes.
type MultiSelectBlockElement ¶ added in v0.6.3
type MultiSelectBlockElement struct { Type string `json:"type,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` ActionID string `json:"action_id,omitempty"` Options []*OptionBlockObject `json:"options,omitempty"` OptionGroups []*OptionGroupBlockObject `json:"option_groups,omitempty"` InitialOptions []*OptionBlockObject `json:"initial_options,omitempty"` InitialUsers []string `json:"initial_users,omitempty"` InitialConversations []string `json:"initial_conversations,omitempty"` InitialChannels []string `json:"initial_channels,omitempty"` MinQueryLength *int `json:"min_query_length,omitempty"` MaxSelectedItems *int `json:"max_selected_items,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
MultiSelectBlockElement defines a multiselect menu, with a static list of options passed in when defining the element.
More Information: https://api.slack.com/reference/messaging/block-elements#multi_select
func NewOptionsGroupMultiSelectBlockElement ¶ added in v0.6.3
func NewOptionsGroupMultiSelectBlockElement( optType string, placeholder *TextBlockObject, actionID string, optGroups ...*OptionGroupBlockObject, ) *MultiSelectBlockElement
NewOptionsGroupMultiSelectBlockElement returns a new instance of MultiSelectBlockElement for use with the Options object only.
func NewOptionsMultiSelectBlockElement ¶ added in v0.6.3
func NewOptionsMultiSelectBlockElement(optType string, placeholder *TextBlockObject, actionID string, options ...*OptionBlockObject) *MultiSelectBlockElement
NewOptionsMultiSelectBlockElement returns a new instance of SelectBlockElement for use with the Options object only.
func (MultiSelectBlockElement) ElementType ¶ added in v0.6.3
func (s MultiSelectBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (*MultiSelectBlockElement) WithConfirm ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithConfirm(confirm *ConfirmationBlockObject) *MultiSelectBlockElement
WithConfirm adds a confirmation dialogue to the multi-select element
func (*MultiSelectBlockElement) WithInitialChannels ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithInitialChannels(channels ...string) *MultiSelectBlockElement
WithInitialChannels sets the initial channels for the multi-select element
func (*MultiSelectBlockElement) WithInitialConversations ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithInitialConversations(conversations ...string) *MultiSelectBlockElement
WithInitialConversations sets the initial conversations for the multi-select element
func (*MultiSelectBlockElement) WithInitialOptions ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithInitialOptions(options ...*OptionBlockObject) *MultiSelectBlockElement
WithInitialOptions sets the initial options for the multi-select element
func (*MultiSelectBlockElement) WithInitialUsers ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithInitialUsers(users ...string) *MultiSelectBlockElement
WithInitialUsers sets the initial users for the multi-select element
func (*MultiSelectBlockElement) WithMaxSelectedItems ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithMaxSelectedItems(maxSelectedItems int) *MultiSelectBlockElement
WithMaxSelectedItems sets the maximum number of items that can be selected
func (*MultiSelectBlockElement) WithMinQueryLength ¶ added in v0.15.0
func (s *MultiSelectBlockElement) WithMinQueryLength(minQueryLength int) *MultiSelectBlockElement
WithMinQueryLength sets the minimum query length for the multi-select element
type NumberInputBlockElement ¶ added in v0.12.0
type NumberInputBlockElement struct { Type MessageElementType `json:"type"` IsDecimalAllowed bool `json:"is_decimal_allowed"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialValue string `json:"initial_value,omitempty"` MinValue string `json:"min_value,omitempty"` MaxValue string `json:"max_value,omitempty"` DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` }
NumberInputBlockElement creates a field where a user can enter number data. Number input elements are currently only available in modals.
More Information: https://api.slack.com/reference/block-kit/block-elements#number
func NewNumberInputBlockElement ¶ added in v0.12.0
func NewNumberInputBlockElement(placeholder *TextBlockObject, actionID string, isDecimalAllowed bool) *NumberInputBlockElement
NewNumberInputBlockElement returns an instance of a number input element
func (NumberInputBlockElement) ElementType ¶ added in v0.12.0
func (s NumberInputBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (*NumberInputBlockElement) WithDispatchActionConfig ¶ added in v0.15.0
func (s *NumberInputBlockElement) WithDispatchActionConfig(config *DispatchActionConfig) *NumberInputBlockElement
WithDispatchActionConfig sets the dispatch action config for the number input element
func (*NumberInputBlockElement) WithInitialValue ¶ added in v0.15.0
func (s *NumberInputBlockElement) WithInitialValue(initialValue string) *NumberInputBlockElement
WithInitialValue sets the initial value for the number input element
func (*NumberInputBlockElement) WithMaxValue ¶ added in v0.15.0
func (s *NumberInputBlockElement) WithMaxValue(maxValue string) *NumberInputBlockElement
WithMaxValue sets the maximum value for the number input element
func (*NumberInputBlockElement) WithMinValue ¶ added in v0.15.0
func (s *NumberInputBlockElement) WithMinValue(minValue string) *NumberInputBlockElement
WithMinValue sets the minimum value for the number input element
type OAuthConfig ¶ added in v0.12.3
type OAuthConfig struct { RedirectUrls []string `json:"redirect_urls,omitempty" yaml:"redirect_urls,omitempty"` Scopes OAuthScopes `json:"scopes,omitempty" yaml:"scopes,omitempty"` }
OAuthConfig is a group of settings that describe OAuth configuration for the app
type OAuthResponse ¶ added in v0.1.0
type OAuthResponse struct { AccessToken string `json:"access_token"` Scope string `json:"scope"` TeamName string `json:"team_name"` TeamID string `json:"team_id"` IncomingWebhook OAuthResponseIncomingWebhook `json:"incoming_webhook"` Bot OAuthResponseBot `json:"bot"` UserID string `json:"user_id,omitempty"` SlackResponse }
OAuthResponse ...
func GetOAuthResponse ¶ added in v0.1.0
func GetOAuthResponse(client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OAuthResponse, err error)
GetOAuthResponse retrieves OAuth response. For more details, see GetOAuthResponseContext documentation.
func GetOAuthResponseContext ¶ added in v0.2.0
func GetOAuthResponseContext(ctx context.Context, client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OAuthResponse, err error)
GetOAuthResponseContext retrieves OAuth response with custom context. Slack API docs: https://api.slack.com/methods/oauth.access
type OAuthResponseBot ¶ added in v0.1.0
type OAuthResponseBot struct { BotUserID string `json:"bot_user_id"` BotAccessToken string `json:"bot_access_token"` }
OAuthResponseBot ...
func GetBotOAuthToken ¶ added in v0.6.5
func GetBotOAuthToken(client httpClient, clientID, clientSecret, code, redirectURI string) (accessToken string, scope string, bot OAuthResponseBot, err error)
GetBotOAuthToken retrieves top-level and bot AccessToken - https://api.slack.com/legacy/oauth#bot_user_access_tokens For more details, see GetBotOAuthTokenContext documentation.
func GetBotOAuthTokenContext ¶ added in v0.6.5
func GetBotOAuthTokenContext(ctx context.Context, client httpClient, clientID, clientSecret, code, redirectURI string) (accessToken string, scope string, bot OAuthResponseBot, err error)
GetBotOAuthTokenContext retrieves top-level and bot AccessToken with a custom context. For more details, see GetOAuthResponseContext documentation.
type OAuthResponseIncomingWebhook ¶ added in v0.1.0
type OAuthResponseIncomingWebhook struct { URL string `json:"url"` Channel string `json:"channel"` ChannelID string `json:"channel_id,omitempty"` ConfigurationURL string `json:"configuration_url"` }
OAuthResponseIncomingWebhook ...
type OAuthScopes ¶ added in v0.12.3
type OAuthScopes struct { Bot []string `json:"bot,omitempty" yaml:"bot,omitempty"` User []string `json:"user,omitempty" yaml:"user,omitempty"` }
OAuthScopes is a group of settings that describe permission scopes configuration
type OAuthV2Response ¶ added in v0.6.3
type OAuthV2Response struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` Scope string `json:"scope"` BotUserID string `json:"bot_user_id"` AppID string `json:"app_id"` Team OAuthV2ResponseTeam `json:"team"` IncomingWebhook OAuthResponseIncomingWebhook `json:"incoming_webhook"` Enterprise OAuthV2ResponseEnterprise `json:"enterprise"` IsEnterpriseInstall bool `json:"is_enterprise_install"` AuthedUser OAuthV2ResponseAuthedUser `json:"authed_user"` RefreshToken string `json:"refresh_token"` ExpiresIn int `json:"expires_in"` SlackResponse }
OAuthV2Response ...
func GetOAuthV2Response ¶ added in v0.6.3
func GetOAuthV2Response(client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OAuthV2Response, err error)
GetOAuthV2Response gets a V2 OAuth access token response. For more details, see GetOAuthV2ResponseContext documentation.
func GetOAuthV2ResponseContext ¶ added in v0.6.3
func GetOAuthV2ResponseContext(ctx context.Context, client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OAuthV2Response, err error)
GetOAuthV2ResponseContext with a context, gets a V2 OAuth access token response. Slack API docs: https://api.slack.com/methods/oauth.v2.access
func RefreshOAuthV2Token ¶ added in v0.10.0
func RefreshOAuthV2Token(client httpClient, clientID, clientSecret, refreshToken string) (resp *OAuthV2Response, err error)
RefreshOAuthV2Token with a context, gets a V2 OAuth access token response. For more details, see RefreshOAuthV2TokenContext documentation.
func RefreshOAuthV2TokenContext ¶ added in v0.10.0
func RefreshOAuthV2TokenContext(ctx context.Context, client httpClient, clientID, clientSecret, refreshToken string) (resp *OAuthV2Response, err error)
RefreshOAuthV2TokenContext with a context, gets a V2 OAuth access token response. Slack API docs: https://api.slack.com/methods/oauth.v2.access
type OAuthV2ResponseAuthedUser ¶ added in v0.6.3
type OAuthV2ResponseAuthedUser struct { ID string `json:"id"` Scope string `json:"scope"` AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` }
OAuthV2ResponseAuthedUser ...
type OAuthV2ResponseEnterprise ¶ added in v0.6.3
OAuthV2ResponseEnterprise ...
type OAuthV2ResponseTeam ¶ added in v0.6.3
OAuthV2ResponseTeam ...
type OpenConversationParameters ¶ added in v0.2.0
type OpenIDConnectResponse ¶ added in v0.12.4
type OpenIDConnectResponse struct { Ok bool `json:"ok"` AccessToken string `json:"access_token"` TokenType string `json:"token_type"` IdToken string `json:"id_token"` SlackResponse }
OpenIDConnectResponse ...
func GetOpenIDConnectToken ¶ added in v0.12.4
func GetOpenIDConnectToken(client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OpenIDConnectResponse, err error)
GetOpenIDConnectToken exchanges a temporary OAuth verifier code for an access token for Sign in with Slack. For more details, see GetOpenIDConnectTokenContext documentation.
func GetOpenIDConnectTokenContext ¶ added in v0.12.4
func GetOpenIDConnectTokenContext(ctx context.Context, client httpClient, clientID, clientSecret, code, redirectURI string) (resp *OpenIDConnectResponse, err error)
GetOpenIDConnectTokenContext with a context, gets an access token for Sign in with Slack. Slack API docs: https://api.slack.com/methods/openid.connect.token
type OptionBlockObject ¶ added in v0.6.1
type OptionBlockObject struct { Text *TextBlockObject `json:"text"` Value string `json:"value"` Description *TextBlockObject `json:"description,omitempty"` URL string `json:"url,omitempty"` }
OptionBlockObject represents a single selectable item in a select menu
More Information: https://api.slack.com/reference/messaging/composition-objects#option
func GetInitialOptionFromWorkflowStepInput ¶ added in v0.10.3
func GetInitialOptionFromWorkflowStepInput(selection *SelectBlockElement, inputs *WorkflowStepInputs, options []*OptionBlockObject) (*OptionBlockObject, bool)
func NewOptionBlockObject ¶ added in v0.6.1
func NewOptionBlockObject(value string, text, description *TextBlockObject) *OptionBlockObject
NewOptionBlockObject returns an instance of a new Option Block Element
type OptionGroupBlockObject ¶ added in v0.6.1
type OptionGroupBlockObject struct { Label *TextBlockObject `json:"label,omitempty"` Options []*OptionBlockObject `json:"options"` }
OptionGroupBlockObject Provides a way to group options in a select menu.
More Information: https://api.slack.com/reference/messaging/composition-objects#option-group
func NewOptionGroupBlockElement ¶ added in v0.6.1
func NewOptionGroupBlockElement(label *TextBlockObject, options ...*OptionBlockObject) *OptionGroupBlockObject
NewOptionGroupBlockElement returns an instance of a new option group block element
type OptionGroupsResponse ¶ added in v0.6.3
type OptionGroupsResponse struct {
OptionGroups []*OptionGroupBlockObject `json:"option_groups,omitempty"`
}
OptionGroupsResponse defines the response used for select block typahead.
More Information: https://api.slack.com/reference/block-kit/block-elements#external_multi_select
type OptionsResponse ¶ added in v0.6.3
type OptionsResponse struct {
Options []*OptionBlockObject `json:"options,omitempty"`
}
OptionsResponse defines the response used for select block typahead.
More Information: https://api.slack.com/reference/block-kit/block-elements#external_multi_select
type OutgoingErrorEvent ¶ added in v0.1.0
type OutgoingErrorEvent struct { Message OutgoingMessage ErrorObj error }
OutgoingErrorEvent contains information in case there were errors sending messages
func (OutgoingErrorEvent) Error ¶ added in v0.1.0
func (o OutgoingErrorEvent) Error() string
type OutgoingMessage ¶
type OutgoingMessage struct { ID int `json:"id"` // channel ID Channel string `json:"channel,omitempty"` Text string `json:"text,omitempty"` Type string `json:"type,omitempty"` ThreadTimestamp string `json:"thread_ts,omitempty"` ThreadBroadcast bool `json:"reply_broadcast,omitempty"` IDs []string `json:"ids,omitempty"` }
OutgoingMessage is used for the realtime API, and seems incomplete.
type OverflowBlockElement ¶ added in v0.6.1
type OverflowBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Options []*OptionBlockObject `json:"options"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
OverflowBlockElement defines the fields needed to use an overflow element. And Overflow Element is like a cross between a button and a select menu - when a user clicks on this overflow button, they will be presented with a list of options to choose from.
More Information: https://api.slack.com/reference/messaging/block-elements#overflow
func NewOverflowBlockElement ¶ added in v0.6.1
func NewOverflowBlockElement(actionID string, options ...*OptionBlockObject) *OverflowBlockElement
NewOverflowBlockElement returns an instance of a new Overflow Block Element
func (OverflowBlockElement) ElementType ¶ added in v0.6.1
func (s OverflowBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (*OverflowBlockElement) WithConfirm ¶ added in v0.15.0
func (s *OverflowBlockElement) WithConfirm(confirm *ConfirmationBlockObject) *OverflowBlockElement
WithConfirm adds a confirmation dialogue to the overflow element
type Pagination ¶
type Pagination struct { TotalCount int `json:"total_count"` Page int `json:"page"` PerPage int `json:"per_page"` PageCount int `json:"page_count"` First int `json:"first"` Last int `json:"last"` }
Pagination contains pagination information This is different from Paging in that it contains additional details
type Paging ¶
type Paging struct { Count int `json:"count"` Total int `json:"total"` Page int `json:"page"` Pages int `json:"pages"` }
Paging contains paging information
type PermalinkParameters ¶ added in v0.5.0
PermalinkParameters are the parameters required to get a permalink to a message.
type PinAddedEvent ¶ added in v0.1.0
type PinAddedEvent pinEvent
PinAddedEvent represents the Pin added event
type PinRemovedEvent ¶ added in v0.1.0
type PinRemovedEvent pinEvent
PinRemovedEvent represents the Pin removed event
type Ping ¶
type Ping struct { ID int `json:"id"` Type string `json:"type"` Timestamp int64 `json:"timestamp"` }
Ping contains information about a Ping Event
type PlainTextInputBlockElement ¶ added in v0.6.1
type PlainTextInputBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialValue string `json:"initial_value,omitempty"` Multiline bool `json:"multiline,omitempty"` MinLength int `json:"min_length,omitempty"` MaxLength int `json:"max_length,omitempty"` DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` }
PlainTextInputBlockElement creates a field where a user can enter freeform data. Plain-text input elements are currently only available in modals.
More Information: https://api.slack.com/reference/block-kit/block-elements#input
func NewPlainTextInputBlockElement ¶ added in v0.6.1
func NewPlainTextInputBlockElement(placeholder *TextBlockObject, actionID string) *PlainTextInputBlockElement
NewPlainTextInputBlockElement returns an instance of a plain-text input element
func (PlainTextInputBlockElement) ElementType ¶ added in v0.6.1
func (s PlainTextInputBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (*PlainTextInputBlockElement) WithDispatchActionConfig ¶ added in v0.15.0
func (s *PlainTextInputBlockElement) WithDispatchActionConfig(config *DispatchActionConfig) *PlainTextInputBlockElement
WithDispatchActionConfig sets the dispatch action config for the plain-text input element
func (*PlainTextInputBlockElement) WithInitialValue ¶ added in v0.15.0
func (s *PlainTextInputBlockElement) WithInitialValue(initialValue string) *PlainTextInputBlockElement
WithInitialValue sets the initial value for the plain-text input element
func (*PlainTextInputBlockElement) WithMaxLength ¶ added in v0.15.0
func (s *PlainTextInputBlockElement) WithMaxLength(maxLength int) *PlainTextInputBlockElement
WithMaxLength sets the maximum length for the plain-text input element
func (*PlainTextInputBlockElement) WithMinLength ¶ added in v0.15.0
func (s *PlainTextInputBlockElement) WithMinLength(minLength int) *PlainTextInputBlockElement
WithMinLength sets the minimum length for the plain-text input element
func (*PlainTextInputBlockElement) WithMultiline ¶ added in v0.15.0
func (s *PlainTextInputBlockElement) WithMultiline(multiline bool) *PlainTextInputBlockElement
WithMultiline sets the multiline property for the plain-text input element
type Pong ¶
type Pong struct { Type string `json:"type"` ReplyTo int `json:"reply_to"` Timestamp int64 `json:"timestamp"` }
Pong contains information about a Pong Event
type PostMessageParameters ¶
type PostMessageParameters struct { Username string `json:"username"` AsUser bool `json:"as_user"` Parse string `json:"parse"` ThreadTimestamp string `json:"thread_ts"` ReplyBroadcast bool `json:"reply_broadcast"` LinkNames int `json:"link_names"` UnfurlLinks bool `json:"unfurl_links"` UnfurlMedia bool `json:"unfurl_media"` IconURL string `json:"icon_url"` IconEmoji string `json:"icon_emoji"` Markdown bool `json:"mrkdwn,omitempty"` EscapeText bool `json:"escape_text"` // chat.postEphemeral support Channel string `json:"channel"` User string `json:"user"` // chat metadata support MetaData SlackMetadata `json:"metadata"` }
PostMessageParameters contains all the parameters necessary (including the optional ones) for a PostMessage() request
func NewPostMessageParameters ¶
func NewPostMessageParameters() PostMessageParameters
NewPostMessageParameters provides an instance of PostMessageParameters with all the sane default values set
type PrefChangeEvent ¶
type PrefChangeEvent struct { Type string `json:"type"` Name string `json:"name"` Value json.RawMessage `json:"value"` }
PrefChangeEvent represents a user preferences change event
type PresenceChangeEvent ¶
type PresenceChangeEvent struct { Type string `json:"type"` Presence string `json:"presence"` User string `json:"user"` Users []string `json:"users"` }
PresenceChangeEvent represents the presence change event
type Properties ¶ added in v0.14.0
type Properties struct {
Canvas Canvas `json:"canvas"`
}
Properties contains the Canvas associated to the channel.
type Purpose ¶ added in v0.1.0
type Purpose struct { Value string `json:"value"` Creator string `json:"creator"` LastSet JSONTime `json:"last_set"` }
Purpose contains information about the purpose
type RTM ¶ added in v0.1.0
type RTM struct { // Client is the main API, embedded Client IncomingEvents chan RTMEvent // contains filtered or unexported fields }
RTM represents a managed websocket connection. It also supports all the methods of the `Client` type.
Create this element with Client's NewRTM() or NewRTMWithOptions(*RTMOptions)
func (*RTM) Disconnect ¶ added in v0.1.0
Disconnect and wait, blocking until a successful disconnection.
func (*RTM) GetInfo ¶ added in v0.1.0
GetInfo returns the info structure received when calling "startrtm", holding metadata needed to implement a full chat client. It will be non-nil after a call to StartRTM().
func (*RTM) ManageConnection ¶ added in v0.1.0
func (rtm *RTM) ManageConnection()
ManageConnection can be called on a Slack RTM instance returned by the NewRTM method. It will connect to the slack RTM API and handle all incoming and outgoing events. If a connection fails then it will attempt to reconnect and will notify any listeners through an error event on the IncomingEvents channel.
If the connection ends and the disconnect was unintentional then this will attempt to reconnect.
This should only be called once per slack API! Otherwise expect undefined behavior.
The defined error events are located in websocket_internals.go.
func (*RTM) NewOutgoingMessage ¶ added in v0.1.0
func (rtm *RTM) NewOutgoingMessage(text string, channelID string, options ...RTMsgOption) *OutgoingMessage
NewOutgoingMessage prepares an OutgoingMessage that the user can use to send a message. Use this function to properly set the messageID.
func (*RTM) NewSubscribeUserPresence ¶ added in v0.5.0
func (rtm *RTM) NewSubscribeUserPresence(ids []string) *OutgoingMessage
NewSubscribeUserPresence prepares an OutgoingMessage that the user can use to subscribe presence events for the specified users.
func (*RTM) NewTypingMessage ¶ added in v0.1.0
func (rtm *RTM) NewTypingMessage(channelID string) *OutgoingMessage
NewTypingMessage prepares an OutgoingMessage that the user can use to send as a typing indicator. Use this function to properly set the messageID.
func (*RTM) SendMessage ¶ added in v0.1.0
func (rtm *RTM) SendMessage(msg *OutgoingMessage)
SendMessage submits a simple message through the websocket. For more complicated messages, use `rtm.PostMessage` with a complete struct describing your attachments and all.
type RTMError ¶ added in v0.1.0
RTMError encapsulates error information as returned by the Slack API
type RTMEvent ¶ added in v0.1.0
type RTMEvent struct { Type string Data interface{} }
RTMEvent is the main wrapper. You will find all the other messages attached
type RTMOption ¶ added in v0.3.0
type RTMOption func(*RTM)
RTMOption options for the managed RTM.
func RTMOptionConnParams ¶ added in v0.5.0
RTMOptionConnParams installs parameters to embed into the connection URL.
func RTMOptionDialer ¶ added in v0.3.0
RTMOptionDialer takes a gorilla websocket Dialer and uses it as the Dialer when opening the websocket for the RTM connection.
func RTMOptionPingInterval ¶ added in v0.3.0
RTMOptionPingInterval determines how often to deliver a ping message to slack.
func RTMOptionUseStart ¶ added in v0.3.0
RTMOptionUseStart as of 11th July 2017 you should prefer setting this to false, see: https://api.slack.com/changelog/2017-04-start-using-rtm-connect-and-stop-using-rtm-start
type RTMResponse ¶ added in v0.1.0
RTMResponse encapsulates response details as returned by the Slack API
type RTMsgOption ¶ added in v0.3.0
type RTMsgOption func(*OutgoingMessage)
RTMsgOption allows configuration of various options available for sending an RTM message
func RTMsgOptionBroadcast ¶ added in v0.3.0
func RTMsgOptionBroadcast() RTMsgOption
RTMsgOptionBroadcast sets broadcast reply to channel to "true"
func RTMsgOptionTS ¶ added in v0.3.0
func RTMsgOptionTS(threadTimestamp string) RTMsgOption
RTMsgOptionTS sets thead timestamp of an outgoing message in order to respond to a thread
type RadioButtonsBlockElement ¶ added in v0.6.3
type RadioButtonsBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Options []*OptionBlockObject `json:"options"` InitialOption *OptionBlockObject `json:"initial_option,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
RadioButtonsBlockElement defines an element which lets users choose one item from a list of possible options.
More Information: https://api.slack.com/reference/block-kit/block-elements#radio
func NewRadioButtonsBlockElement ¶ added in v0.6.3
func NewRadioButtonsBlockElement(actionID string, options ...*OptionBlockObject) *RadioButtonsBlockElement
NewRadioButtonsBlockElement returns an instance of a radio buttons element.
func (RadioButtonsBlockElement) ElementType ¶ added in v0.6.3
func (s RadioButtonsBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type RateLimitEvent ¶ added in v0.2.0
type RateLimitEvent struct{}
RateLimitEvent is used when Slack warns that rate-limits are being hit.
func (*RateLimitEvent) Error ¶ added in v0.2.0
func (e *RateLimitEvent) Error() string
type RateLimitedError ¶ added in v0.2.0
RateLimitedError represents the rate limit response from slack
func (*RateLimitedError) Error ¶ added in v0.2.0
func (e *RateLimitedError) Error() string
func (*RateLimitedError) Retryable ¶ added in v0.6.1
func (e *RateLimitedError) Retryable() bool
type ReactedItem ¶
type ReactedItem struct { Item Reactions []ItemReaction }
ReactedItem is an item that was reacted to, and the details of the reactions.
type ReactionAddedEvent ¶
type ReactionAddedEvent ReactionEvent
ReactionAddedEvent represents the Reaction added event
type ReactionEvent ¶ added in v0.12.0
type ReactionItem ¶ added in v0.12.0
type ReactionItem struct { Type string `json:"type"` Channel string `json:"channel,omitempty"` File string `json:"file,omitempty"` FileComment string `json:"file_comment,omitempty"` Timestamp string `json:"ts,omitempty"` }
ReactionItem is a lighter-weight item than is returned by the reactions list.
type ReactionRemovedEvent ¶
type ReactionRemovedEvent ReactionEvent
ReactionRemovedEvent represents the Reaction removed event
type ReconnectUrlEvent ¶ added in v0.1.0
ReconnectUrlEvent represents the receiving reconnect url event
type RemoteFile ¶ added in v0.11.0
type RemoteFile struct { ID string `json:"id"` Created JSONTime `json:"created"` Timestamp JSONTime `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"` Permalink string `json:"permalink"` CommentsCount int `json:"comments_count"` IsStarred bool `json:"is_starred"` Channels []string `json:"channels"` Groups []string `json:"groups"` IMs []string `json:"ims"` ExternalID string `json:"external_id"` ExternalURL string `json:"external_url"` HasRichPreview bool `json:"has_rich_preview"` }
RemoteFile contains all the information for a remote file For more details: https://api.slack.com/messaging/files/remote
type RemoteFileParameters ¶ added in v0.11.0
type RemoteFileParameters struct { ExternalID string // required ExternalURL string // required Title string // required Filetype string IndexableFileContents string PreviewImage string PreviewImageReader io.Reader }
RemoteFileParameters contains required and optional parameters for a remote file.
ExternalID is a user defined GUID, ExternalURL is where the remote file can be accessed, and Title is the name of the file.
For more details: https://api.slack.com/methods/files.remote.add
type ResponseMetadata ¶ added in v0.3.0
type ResponseMetadata struct { Cursor string `json:"next_cursor"` Messages []string `json:"messages"` Warnings []string `json:"warnings"` }
ResponseMetadata holds pagination metadata
type RichTextBlock ¶ added in v0.10.0
type RichTextBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` Elements []RichTextElement `json:"elements"` }
RichTextBlock defines a new block of type rich_text. More Information: https://api.slack.com/changelog/2019-09-what-they-see-is-what-you-get-and-more-and-less
func NewRichTextBlock ¶ added in v0.10.0
func NewRichTextBlock(blockID string, elements ...RichTextElement) *RichTextBlock
NewRichTextBlock returns a new instance of RichText Block.
func (RichTextBlock) BlockType ¶ added in v0.10.0
func (b RichTextBlock) BlockType() MessageBlockType
func (RichTextBlock) ID ¶ added in v0.16.0
func (s RichTextBlock) ID() string
ID returns the ID of the block
func (*RichTextBlock) UnmarshalJSON ¶ added in v0.10.0
func (e *RichTextBlock) UnmarshalJSON(b []byte) error
type RichTextElement ¶ added in v0.10.0
type RichTextElement interface {
RichTextElementType() RichTextElementType
}
type RichTextElementType ¶ added in v0.10.0
type RichTextElementType string
const ( RTEList RichTextElementType = "rich_text_list" RTEPreformatted RichTextElementType = "rich_text_preformatted" RTEQuote RichTextElementType = "rich_text_quote" RTESection RichTextElementType = "rich_text_section" RTEUnknown RichTextElementType = "rich_text_unknown" )
type RichTextInputBlockElement ¶ added in v0.12.4
type RichTextInputBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialValue *RichTextBlock `json:"initial_value,omitempty"` DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` FocusOnLoad bool `json:"focus_on_load,omitempty"` }
RichTextInputBlockElement creates a field where allows users to enter formatted text in a WYSIWYG composer, offering the same messaging writing experience as in Slack More Information: https://api.slack.com/reference/block-kit/block-elements#rich_text_input
func NewRichTextInputBlockElement ¶ added in v0.12.4
func NewRichTextInputBlockElement(placeholder *TextBlockObject, actionID string) *RichTextInputBlockElement
NewRichTextInputBlockElement returns an instance of a rich-text input element
func (RichTextInputBlockElement) ElementType ¶ added in v0.12.4
func (s RichTextInputBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type RichTextList ¶ added in v0.12.4
type RichTextList struct { Type RichTextElementType `json:"type"` Elements []RichTextElement `json:"elements"` Style RichTextListElementType `json:"style"` Indent int `json:"indent"` }
func NewRichTextList ¶ added in v0.12.4
func NewRichTextList(style RichTextListElementType, indent int, elements ...RichTextElement) *RichTextList
NewRichTextList returns a new rich text list element.
func (RichTextList) RichTextElementType ¶ added in v0.12.4
func (s RichTextList) RichTextElementType() RichTextElementType
ElementType returns the type of the Element
func (*RichTextList) UnmarshalJSON ¶ added in v0.12.4
func (e *RichTextList) UnmarshalJSON(b []byte) error
type RichTextListElementType ¶ added in v0.12.4
type RichTextListElementType string
const ( RTEListOrdered RichTextListElementType = "ordered" RTEListBullet RichTextListElementType = "bullet" )
type RichTextPreformatted ¶ added in v0.12.4
type RichTextPreformatted struct { RichTextSection Border int `json:"border"` }
RichTextPreformatted represents rich_text_quote element type.
func (*RichTextPreformatted) RichTextElementType ¶ added in v0.12.4
func (s *RichTextPreformatted) RichTextElementType() RichTextElementType
RichTextElementType returns the type of the Element
func (*RichTextPreformatted) UnmarshalJSON ¶ added in v0.12.4
func (s *RichTextPreformatted) UnmarshalJSON(b []byte) error
type RichTextQuote ¶ added in v0.12.4
type RichTextQuote RichTextSection
RichTextQuote represents rich_text_quote element type.
func (*RichTextQuote) RichTextElementType ¶ added in v0.12.4
func (s *RichTextQuote) RichTextElementType() RichTextElementType
RichTextElementType returns the type of the Element
func (*RichTextQuote) UnmarshalJSON ¶ added in v0.12.4
func (s *RichTextQuote) UnmarshalJSON(b []byte) error
type RichTextSection ¶ added in v0.10.0
type RichTextSection struct { Type RichTextElementType `json:"type"` Elements []RichTextSectionElement `json:"elements"` }
func NewRichTextSection ¶ added in v0.10.0
func NewRichTextSection(elements ...RichTextSectionElement) *RichTextSection
NewRichTextSectionBlockElement .
func (RichTextSection) RichTextElementType ¶ added in v0.10.0
func (s RichTextSection) RichTextElementType() RichTextElementType
RichTextElementType returns the type of the Element
func (*RichTextSection) UnmarshalJSON ¶ added in v0.10.0
func (e *RichTextSection) UnmarshalJSON(b []byte) error
type RichTextSectionBroadcastElement ¶ added in v0.10.0
type RichTextSectionBroadcastElement struct { Type RichTextSectionElementType `json:"type"` Range string `json:"range"` }
func NewRichTextSectionBroadcastElement ¶ added in v0.10.0
func NewRichTextSectionBroadcastElement(rangeStr string) *RichTextSectionBroadcastElement
func (RichTextSectionBroadcastElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionBroadcastElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionChannelElement ¶ added in v0.10.0
type RichTextSectionChannelElement struct { Type RichTextSectionElementType `json:"type"` ChannelID string `json:"channel_id"` Style *RichTextSectionTextStyle `json:"style,omitempty"` }
func NewRichTextSectionChannelElement ¶ added in v0.10.0
func NewRichTextSectionChannelElement(channelID string, style *RichTextSectionTextStyle) *RichTextSectionChannelElement
func (RichTextSectionChannelElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionChannelElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionColorElement ¶ added in v0.10.0
type RichTextSectionColorElement struct { Type RichTextSectionElementType `json:"type"` Value string `json:"value"` }
func NewRichTextSectionColorElement ¶ added in v0.10.0
func NewRichTextSectionColorElement(value string) *RichTextSectionColorElement
func (RichTextSectionColorElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionColorElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionDateElement ¶ added in v0.10.0
type RichTextSectionDateElement struct { Type RichTextSectionElementType `json:"type"` Timestamp JSONTime `json:"timestamp"` Format string `json:"format"` URL *string `json:"url,omitempty"` Fallback *string `json:"fallback,omitempty"` }
func NewRichTextSectionDateElement ¶ added in v0.10.0
func NewRichTextSectionDateElement(timestamp int64, format string, url *string, fallback *string) *RichTextSectionDateElement
func (RichTextSectionDateElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionDateElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionElement ¶ added in v0.10.0
type RichTextSectionElement interface {
RichTextSectionElementType() RichTextSectionElementType
}
type RichTextSectionElementType ¶ added in v0.10.0
type RichTextSectionElementType string
const ( RTSEBroadcast RichTextSectionElementType = "broadcast" RTSEChannel RichTextSectionElementType = "channel" RTSEColor RichTextSectionElementType = "color" RTSEDate RichTextSectionElementType = "date" RTSEEmoji RichTextSectionElementType = "emoji" RTSELink RichTextSectionElementType = "link" RTSETeam RichTextSectionElementType = "team" RTSEText RichTextSectionElementType = "text" RTSEUser RichTextSectionElementType = "user" RTSEUserGroup RichTextSectionElementType = "usergroup" RTSEUnknown RichTextSectionElementType = "unknown" )
type RichTextSectionEmojiElement ¶ added in v0.10.0
type RichTextSectionEmojiElement struct { Type RichTextSectionElementType `json:"type"` Name string `json:"name"` SkinTone int `json:"skin_tone,omitempty"` Unicode string `json:"unicode,omitempty"` Style *RichTextSectionTextStyle `json:"style,omitempty"` }
func NewRichTextSectionEmojiElement ¶ added in v0.10.0
func NewRichTextSectionEmojiElement(name string, skinTone int, style *RichTextSectionTextStyle) *RichTextSectionEmojiElement
func (RichTextSectionEmojiElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionEmojiElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionLinkElement ¶ added in v0.10.0
type RichTextSectionLinkElement struct { Type RichTextSectionElementType `json:"type"` URL string `json:"url"` Text string `json:"text"` Style *RichTextSectionTextStyle `json:"style,omitempty"` }
func NewRichTextSectionLinkElement ¶ added in v0.10.0
func NewRichTextSectionLinkElement(url, text string, style *RichTextSectionTextStyle) *RichTextSectionLinkElement
func (RichTextSectionLinkElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionLinkElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionTeamElement ¶ added in v0.10.0
type RichTextSectionTeamElement struct { Type RichTextSectionElementType `json:"type"` TeamID string `json:"team_id"` Style *RichTextSectionTextStyle `json:"style,omitempty"` }
func NewRichTextSectionTeamElement ¶ added in v0.10.0
func NewRichTextSectionTeamElement(teamID string, style *RichTextSectionTextStyle) *RichTextSectionTeamElement
func (RichTextSectionTeamElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionTeamElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionTextElement ¶ added in v0.10.0
type RichTextSectionTextElement struct { Type RichTextSectionElementType `json:"type"` Text string `json:"text"` Style *RichTextSectionTextStyle `json:"style,omitempty"` }
func NewRichTextSectionTextElement ¶ added in v0.10.0
func NewRichTextSectionTextElement(text string, style *RichTextSectionTextStyle) *RichTextSectionTextElement
func (RichTextSectionTextElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionTextElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionTextStyle ¶ added in v0.10.0
type RichTextSectionUnknownElement ¶ added in v0.10.0
type RichTextSectionUnknownElement struct { Type RichTextSectionElementType `json:"type"` Raw string }
func (RichTextSectionUnknownElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionUnknownElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionUserElement ¶ added in v0.10.0
type RichTextSectionUserElement struct { Type RichTextSectionElementType `json:"type"` UserID string `json:"user_id"` Style *RichTextSectionTextStyle `json:"style,omitempty"` }
func NewRichTextSectionUserElement ¶ added in v0.10.0
func NewRichTextSectionUserElement(userID string, style *RichTextSectionTextStyle) *RichTextSectionUserElement
func (RichTextSectionUserElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionUserElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextSectionUserGroupElement ¶ added in v0.10.0
type RichTextSectionUserGroupElement struct { Type RichTextSectionElementType `json:"type"` UsergroupID string `json:"usergroup_id"` }
func NewRichTextSectionUserGroupElement ¶ added in v0.10.0
func NewRichTextSectionUserGroupElement(usergroupID string) *RichTextSectionUserGroupElement
func (RichTextSectionUserGroupElement) RichTextSectionElementType ¶ added in v0.10.0
func (r RichTextSectionUserGroupElement) RichTextSectionElementType() RichTextSectionElementType
type RichTextUnknown ¶ added in v0.10.0
type RichTextUnknown struct { Type RichTextElementType Raw string }
func (RichTextUnknown) RichTextElementType ¶ added in v0.10.0
func (u RichTextUnknown) RichTextElementType() RichTextElementType
type ScheduledMessage ¶ added in v0.7.0
type ScheduledMessage struct { ID string `json:"id"` Channel string `json:"channel_id"` PostAt int `json:"post_at"` DateCreated int `json:"date_created"` Text string `json:"text"` }
ScheduledMessage contains information about a slack scheduled message
type SearchFiles ¶
type SearchFiles struct { Matches []File `json:"matches"` Paging `json:"paging"` Pagination `json:"pagination"` Total int `json:"total"` }
type SearchMessage ¶
type SearchMessage struct { Type string `json:"type"` Channel CtxChannel `json:"channel"` User string `json:"user"` Username string `json:"username"` Timestamp string `json:"ts"` Blocks Blocks `json:"blocks,omitempty"` Text string `json:"text"` Permalink string `json:"permalink"` Attachments []Attachment `json:"attachments"` Previous CtxMessage `json:"previous"` Previous2 CtxMessage `json:"previous_2"` Next CtxMessage `json:"next"` Next2 CtxMessage `json:"next_2"` }
type SearchMessages ¶
type SearchMessages struct { Matches []SearchMessage `json:"matches"` Paging `json:"paging"` Pagination `json:"pagination"` Total int `json:"total"` }
type SearchParameters ¶
type SearchParameters struct { TeamID string Sort string SortDirection string Highlight bool Count int Page int }
func NewSearchParameters ¶
func NewSearchParameters() SearchParameters
type SecretsVerifier ¶ added in v0.4.0
type SecretsVerifier struct {
// contains filtered or unexported fields
}
SecretsVerifier contains the information needed to verify that the request comes from Slack
func NewSecretsVerifier ¶ added in v0.4.0
func NewSecretsVerifier(header http.Header, secret string) (sv SecretsVerifier, err error)
NewSecretsVerifier returns a SecretsVerifier object in exchange for an http.Header object and signing secret
func (SecretsVerifier) Ensure ¶ added in v0.4.0
func (v SecretsVerifier) Ensure() error
Ensure compares the signature sent from Slack with the actual computed hash to judge validity
func (*SecretsVerifier) WithDebug ¶ added in v0.7.4
func (v *SecretsVerifier) WithDebug(d Debug) *SecretsVerifier
type SectionBlock ¶ added in v0.6.1
type SectionBlock struct { Type MessageBlockType `json:"type"` Text *TextBlockObject `json:"text,omitempty"` BlockID string `json:"block_id,omitempty"` Fields []*TextBlockObject `json:"fields,omitempty"` Accessory *Accessory `json:"accessory,omitempty"` Expand bool `json:"expand,omitempty"` }
SectionBlock defines a new block of type section
More Information: https://api.slack.com/reference/messaging/blocks#section
func NewSectionBlock ¶ added in v0.6.1
func NewSectionBlock(textObj *TextBlockObject, fields []*TextBlockObject, accessory *Accessory, options ...SectionBlockOption) *SectionBlock
NewSectionBlock returns a new instance of a section block to be rendered
func (SectionBlock) BlockType ¶ added in v0.6.1
func (s SectionBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (SectionBlock) ID ¶ added in v0.16.0
func (s SectionBlock) ID() string
ID returns the ID of the block
type SectionBlockOption ¶ added in v0.6.1
type SectionBlockOption func(*SectionBlock)
SectionBlockOption allows configuration of options for a new section block
func SectionBlockOptionBlockID ¶ added in v0.6.1
func SectionBlockOptionBlockID(blockID string) SectionBlockOption
func SectionBlockOptionExpand ¶ added in v0.16.0
func SectionBlockOptionExpand(shouldExpand bool) SectionBlockOption
SectionBlockOptionExpand allows long text to be auto-expanded when displaying
@see https://api.slack.com/reference/block-kit/blocks#section
type SelectBlockElement ¶ added in v0.6.1
type SelectBlockElement struct { Type string `json:"type,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` ActionID string `json:"action_id,omitempty"` Options []*OptionBlockObject `json:"options,omitempty"` OptionGroups []*OptionGroupBlockObject `json:"option_groups,omitempty"` InitialOption *OptionBlockObject `json:"initial_option,omitempty"` InitialUser string `json:"initial_user,omitempty"` InitialConversation string `json:"initial_conversation,omitempty"` InitialChannel string `json:"initial_channel,omitempty"` DefaultToCurrentConversation bool `json:"default_to_current_conversation,omitempty"` ResponseURLEnabled bool `json:"response_url_enabled,omitempty"` Filter *SelectBlockElementFilter `json:"filter,omitempty"` MinQueryLength *int `json:"min_query_length,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
SelectBlockElement defines the simplest form of select menu, with a static list of options passed in when defining the element.
More Information: https://api.slack.com/reference/messaging/block-elements#select
func NewOptionsGroupSelectBlockElement ¶ added in v0.6.1
func NewOptionsGroupSelectBlockElement( optType string, placeholder *TextBlockObject, actionID string, optGroups ...*OptionGroupBlockObject, ) *SelectBlockElement
NewOptionsGroupSelectBlockElement returns a new instance of SelectBlockElement for use with the Options object only.
func NewOptionsSelectBlockElement ¶ added in v0.6.1
func NewOptionsSelectBlockElement(optType string, placeholder *TextBlockObject, actionID string, options ...*OptionBlockObject) *SelectBlockElement
NewOptionsSelectBlockElement returns a new instance of SelectBlockElement for use with the Options object only.
func (SelectBlockElement) ElementType ¶ added in v0.6.1
func (s SelectBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
func (*SelectBlockElement) WithConfirm ¶ added in v0.15.0
func (s *SelectBlockElement) WithConfirm(confirm *ConfirmationBlockObject) *SelectBlockElement
WithConfirm adds a confirmation dialogue to the select element
func (*SelectBlockElement) WithInitialChannel ¶ added in v0.15.0
func (s *SelectBlockElement) WithInitialChannel(channel string) *SelectBlockElement
WithInitialChannel sets the initial channel for the select element
func (*SelectBlockElement) WithInitialConversation ¶ added in v0.15.0
func (s *SelectBlockElement) WithInitialConversation(conversation string) *SelectBlockElement
WithInitialConversation sets the initial conversation for the select element
func (*SelectBlockElement) WithInitialOption ¶ added in v0.15.0
func (s *SelectBlockElement) WithInitialOption(option *OptionBlockObject) *SelectBlockElement
WithInitialOption sets the initial option for the select element
func (*SelectBlockElement) WithInitialUser ¶ added in v0.15.0
func (s *SelectBlockElement) WithInitialUser(user string) *SelectBlockElement
WithInitialUser sets the initial user for the select element
type SelectBlockElementFilter ¶ added in v0.7.0
type SelectBlockElementFilter struct { Include []string `json:"include,omitempty"` ExcludeBotUsers bool `json:"exclude_bot_users,omitempty"` }
SelectBlockElementFilter allows to filter select element conversation options by type.
More Information: https://api.slack.com/reference/block-kit/composition-objects#filter_conversations
type SelectDataSource ¶ added in v0.4.0
type SelectDataSource string
SelectDataSource types of select datasource
const ( // DialogDataSourceStatic menu with static Options/OptionGroups DialogDataSourceStatic SelectDataSource = "static" // DialogDataSourceExternal dynamic datasource DialogDataSourceExternal SelectDataSource = "external" // DialogDataSourceConversations provides a list of conversations DialogDataSourceConversations SelectDataSource = "conversations" // DialogDataSourceChannels provides a list of channels DialogDataSourceChannels SelectDataSource = "channels" // DialogDataSourceUsers provides a list of users DialogDataSourceUsers SelectDataSource = "users" )
type SetCanvasAccessParams ¶ added in v0.15.0
type Settings ¶ added in v0.12.3
type Settings struct { AllowedIPAddressRanges []string `json:"allowed_ip_address_ranges,omitempty" yaml:"allowed_ip_address_ranges,omitempty"` EventSubscriptions EventSubscriptions `json:"event_subscriptions,omitempty" yaml:"event_subscriptions,omitempty"` Interactivity Interactivity `json:"interactivity,omitempty" yaml:"interactivity,omitempty"` OrgDeployEnabled bool `json:"org_deploy_enabled,omitempty" yaml:"org_deploy_enabled,omitempty"` SocketModeEnabled bool `json:"socket_mode_enabled,omitempty" yaml:"socket_mode_enabled,omitempty"` }
Settings is a group of settings corresponding to the Settings section of the app config pages.
type ShareFileInfo ¶ added in v0.5.0
type ShareFileInfo struct {}
type Shortcut ¶ added in v0.12.3
type Shortcut struct { Name string `json:"name" yaml:"name"` CallbackID string `json:"callback_id" yaml:"callback_id"` Description string `json:"description" yaml:"description"` Type ShortcutType `json:"type" yaml:"type"` }
Shortcut is a group of settings that describes shortcut configuration
type ShortcutType ¶ added in v0.12.3
type ShortcutType string
ShortcutType is a new string type for the available types of shortcuts
const ( MessageShortcut ShortcutType = "message" GlobalShortcut ShortcutType = "global" )
type SlackErrorResponse ¶ added in v0.10.0
type SlackErrorResponse struct { Err string ResponseMetadata ResponseMetadata }
SlackErrorResponse brings along the metadata of errors returned by the Slack API.
func (SlackErrorResponse) Error ¶ added in v0.10.0
func (r SlackErrorResponse) Error() string
type SlackFileObject ¶ added in v0.14.0
SlackFileObject Defines an object containing Slack file information to be used in an image block or image element.
More Information: https://api.slack.com/reference/block-kit/composition-objects#slack_file
type SlackMetadata ¶ added in v0.11.1
type SlackMetadata struct { EventType string `json:"event_type"` EventPayload map[string]interface{} `json:"event_payload"` }
SlackMetadata https://api.slack.com/reference/metadata
type SlackResponse ¶
type SlackResponse struct { Ok bool `json:"ok"` Error string `json:"error"` ResponseMetadata ResponseMetadata `json:"response_metadata"` }
SlackResponse handles parsing out errors from the web api.
func (SlackResponse) Err ¶ added in v0.3.0
func (t SlackResponse) Err() error
type SlashCommand ¶ added in v0.2.0
type SlashCommand struct { Token string `json:"token"` TeamID string `json:"team_id"` TeamDomain string `json:"team_domain"` EnterpriseID string `json:"enterprise_id,omitempty"` EnterpriseName string `json:"enterprise_name,omitempty"` IsEnterpriseInstall bool `json:"is_enterprise_install"` ChannelID string `json:"channel_id"` ChannelName string `json:"channel_name"` UserID string `json:"user_id"` UserName string `json:"user_name"` Command string `json:"command"` Text string `json:"text"` ResponseURL string `json:"response_url"` TriggerID string `json:"trigger_id"` APIAppID string `json:"api_app_id"` }
SlashCommand contains information about a request of the slash command
func SlashCommandParse ¶ added in v0.2.0
func SlashCommandParse(r *http.Request) (s SlashCommand, err error)
SlashCommandParse will parse the request of the slash command
func (*SlashCommand) UnmarshalJSON ¶ added in v0.12.5
func (s *SlashCommand) UnmarshalJSON(data []byte) error
UnmarshalJSON handles is_enterprise_install being either a boolean or a string when parsing JSON from various payloads
func (SlashCommand) ValidateToken ¶ added in v0.2.0
func (s SlashCommand) ValidateToken(verificationTokens ...string) bool
ValidateToken validates verificationTokens
type SnoozeDebug ¶ added in v0.1.0
type SnoozeDebug struct {
SnoozeEndDate string `json:"snooze_end_date"`
}
type SnoozeInfo ¶ added in v0.1.0
type SnoozeInfo struct { SnoozeEnabled bool `json:"snooze_enabled,omitempty"` SnoozeEndTime int `json:"snooze_endtime,omitempty"` SnoozeRemaining int `json:"snooze_remaining,omitempty"` SnoozeDebug SnoozeDebug `json:"snooze_debug,omitempty"` }
type SocketModeConnection ¶ added in v0.8.0
type SocketModeConnection struct { URL string `json:"url,omitempty"` Data map[string]interface{} `json:"-"` }
SocketModeConnection contains various details about the SocketMode connection. It is returned by an "apps.connections.open" API call.
type StarRemovedEvent ¶
type StarRemovedEvent starEvent
StarRemovedEvent represents the Star removed event
type StarredItem ¶
type StarredItem Item
type StarredItemPagination ¶ added in v0.6.1
type StarredItemPagination struct { Items []Item // contains filtered or unexported fields }
StarredItemPagination allows for paginating over the starred items
type StarsParameters ¶
func NewStarsParameters ¶
func NewStarsParameters() StarsParameters
NewStarsParameters initialises StarsParameters with default values
type StatusCodeError ¶ added in v0.11.0
StatusCodeError represents an http response error. type httpStatusCode interface { HTTPStatusCode() int } to handle it.
func (StatusCodeError) Error ¶ added in v0.11.0
func (t StatusCodeError) Error() string
func (StatusCodeError) HTTPStatusCode ¶ added in v0.11.0
func (t StatusCodeError) HTTPStatusCode() int
func (StatusCodeError) Retryable ¶ added in v0.11.0
func (t StatusCodeError) Retryable() bool
type Style ¶ added in v0.6.1
type Style string
Style is a style of Button element https://api.slack.com/reference/block-kit/block-elements#button__fields
type SubteamCreatedEvent ¶ added in v0.4.0
SubteamCreatedEvent represents the Subteam created event
type SubteamMembersChangedEvent ¶ added in v0.4.0
type SubteamMembersChangedEvent struct { Type string `json:"type"` SubteamID string `json:"subteam_id"` TeamID string `json:"team_id"` DatePreviousUpdate JSONTime `json:"date_previous_update"` DateUpdate JSONTime `json:"date_update"` AddedUsers []string `json:"added_users"` AddedUsersCount int `json:"added_users_count"` RemovedUsers []string `json:"removed_users"` RemovedUsersCount int `json:"removed_users_count"` }
SubteamCreatedEvent represents the membership of an existing User Group has changed event
type SubteamSelfAddedEvent ¶ added in v0.4.0
type SubteamSelfAddedEvent struct { Type string `json:"type"` SubteamID string `json:"subteam_id"` }
SubteamSelfAddedEvent represents an event of you have been added to a User Group
type SubteamSelfRemovedEvent ¶ added in v0.4.0
type SubteamSelfRemovedEvent SubteamSelfAddedEvent
SubteamSelfRemovedEvent represents an event of you have been removed from a User Group
type SubteamUpdatedEvent ¶ added in v0.4.0
SubteamUpdatedEvent represents an event of an existing User Group has been updated or its members changed
type TeamDomainChangeEvent ¶
type TeamDomainChangeEvent struct { Type string `json:"type"` URL string `json:"url"` Domain string `json:"domain"` }
TeamDomainChangeEvent represents the Team domain change event
type TeamIdentity ¶ added in v0.1.0
type TeamIdentity struct { ID string `json:"id"` Name string `json:"name"` Domain string `json:"domain"` Image34 string `json:"image_34"` Image44 string `json:"image_44"` Image68 string `json:"image_68"` Image88 string `json:"image_88"` Image102 string `json:"image_102"` Image132 string `json:"image_132"` Image230 string `json:"image_230"` ImageDefault bool `json:"image_default"` ImageOriginal string `json:"image_original"` }
type TeamJoinEvent ¶
TeamJoinEvent represents the Team join event
type TeamMigrationStartedEvent ¶
type TeamMigrationStartedEvent struct {
Type string `json:"type"`
}
TeamMigrationStartedEvent represents the Team migration started event
type TeamPrefChangeEvent ¶
type TeamPrefChangeEvent struct { Type string `json:"type"` Name string `json:"name,omitempty"` Value []string `json:"value,omitempty"` }
TeamPrefChangeEvent represents the Team preference change event
type TeamProfile ¶ added in v0.12.0
type TeamProfile struct {
Fields []TeamProfileField `json:"fields"`
}
type TeamProfileField ¶ added in v0.12.0
type TeamProfileResponse ¶ added in v0.12.0
type TeamProfileResponse struct { Profile TeamProfile `json:"profile"` SlackResponse }
type TeamRenameEvent ¶
type TeamRenameEvent struct { Type string `json:"type"` Name string `json:"name,omitempty"` EventTimestamp string `json:"event_ts,omitempty"` }
TeamRenameEvent represents the Team rename event
type TeamResponse ¶ added in v0.1.0
type TeamResponse struct { Team TeamInfo `json:"team"` SlackResponse }
type TextBlockObject ¶ added in v0.6.1
type TextBlockObject struct { Type string `json:"type"` Text string `json:"text"` Emoji bool `json:"emoji,omitempty"` Verbatim bool `json:"verbatim,omitempty"` }
TextBlockObject defines a text element object to be used with blocks
More Information: https://api.slack.com/reference/messaging/composition-objects#text
func NewTextBlockObject ¶ added in v0.6.1
func NewTextBlockObject(elementType, text string, emoji, verbatim bool) *TextBlockObject
NewTextBlockObject returns an instance of a new Text Block Object
func (TextBlockObject) BlockType ¶ added in v0.6.3
func (t TextBlockObject) BlockType() MessageBlockType
BlockType returns the type of the block
func (TextBlockObject) MixedElementType ¶ added in v0.6.1
func (s TextBlockObject) MixedElementType() MixedElementType
validateType enforces block objects for element and block parameters
func (TextBlockObject) Validate ¶ added in v0.8.1
func (s TextBlockObject) Validate() error
Validate checks if TextBlockObject has valid values
type TextInputElement ¶ added in v0.4.0
type TextInputElement struct { DialogInput MaxLength int `json:"max_length,omitempty"` MinLength int `json:"min_length,omitempty"` Hint string `json:"hint,omitempty"` Subtype TextInputSubtype `json:"subtype"` Value string `json:"value"` }
TextInputElement subtype of DialogInput https://api.slack.com/dialogs#option_element_attributes#text_element_attributes
func NewTextAreaInput ¶ added in v0.4.0
func NewTextAreaInput(name, label, text string) *TextInputElement
NewTextAreaInput constructor for a `textarea` input
func NewTextInput ¶ added in v0.4.0
func NewTextInput(name, label, text string, options ...TextInputOption) *TextInputElement
NewTextInput constructor for a `text` input
type TextInputOption ¶ added in v0.6.1
type TextInputOption func(*TextInputElement)
TextInputOption handle to extra inputs options.
type TextInputSubtype ¶ added in v0.4.0
type TextInputSubtype string
TextInputSubtype Accepts email, number, tel, or url. In some form factors, optimized input is provided for this subtype.
const ( // InputSubtypeEmail email keyboard InputSubtypeEmail TextInputSubtype = "email" // InputSubtypeNumber numeric keyboard InputSubtypeNumber TextInputSubtype = "number" // InputSubtypeTel Phone keyboard InputSubtypeTel TextInputSubtype = "tel" // InputSubtypeURL Phone keyboard InputSubtypeURL TextInputSubtype = "url" )
type TimePickerBlockElement ¶ added in v0.8.0
type TimePickerBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialTime string `json:"initial_time,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }
TimePickerBlockElement defines an element which lets users easily select a time from nice UI. Time picker elements can be used inside of section and actions blocks.
More Information: https://api.slack.com/reference/messaging/block-elements#timepicker
func NewTimePickerBlockElement ¶ added in v0.8.0
func NewTimePickerBlockElement(actionID string) *TimePickerBlockElement
NewTimePickerBlockElement returns an instance of a date picker element
func (TimePickerBlockElement) ElementType ¶ added in v0.8.0
func (s TimePickerBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type TokenResponse ¶ added in v0.12.3
type Topic ¶ added in v0.1.0
type Topic struct { Value string `json:"value"` Creator string `json:"creator"` LastSet JSONTime `json:"last_set"` }
Topic contains information about the topic
type URLTextInputBlockElement ¶ added in v0.12.0
type URLTextInputBlockElement struct { Type MessageElementType `json:"type"` ActionID string `json:"action_id,omitempty"` Placeholder *TextBlockObject `json:"placeholder,omitempty"` InitialValue string `json:"initial_value,omitempty"` DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` FocusOnLoad bool `json:"focus_on_load,omitempty"` }
URLTextInputBlockElement creates a field where a user can enter url data.
url-text-input elements are currently only available in modals.
More Information: https://api.slack.com/reference/block-kit/block-elements#url
func NewURLTextInputBlockElement ¶ added in v0.12.0
func NewURLTextInputBlockElement(placeholder *TextBlockObject, actionID string) *URLTextInputBlockElement
NewURLTextInputBlockElement returns an instance of a plain-text input element
func (URLTextInputBlockElement) ElementType ¶ added in v0.12.0
func (s URLTextInputBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type UnknownBlock ¶ added in v0.6.3
type UnknownBlock struct { Type MessageBlockType `json:"type"` BlockID string `json:"block_id,omitempty"` }
UnknownBlock represents a block type that is not yet known. This block type exists to prevent Slack from introducing new and unknown block types that break this library.
func (UnknownBlock) BlockType ¶ added in v0.6.3
func (b UnknownBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (UnknownBlock) ID ¶ added in v0.16.0
func (s UnknownBlock) ID() string
ID returns the ID of the block
type UnknownBlockElement ¶ added in v0.6.3
type UnknownBlockElement struct { Type MessageElementType `json:"type"` Elements BlockElements }
UnknownBlockElement any block element that this library does not directly support. See the "Rich Elements" section at the following URL: https://api.slack.com/changelog/2019-09-what-they-see-is-what-you-get-and-more-and-less New block element types may be introduced by Slack at any time; this is a catch-all for any such block elements.
func (UnknownBlockElement) ElementType ¶ added in v0.6.3
func (s UnknownBlockElement) ElementType() MessageElementType
ElementType returns the type of the Element
type UnmappedError ¶ added in v0.11.1
type UnmappedError struct { // EventType returns event type name. EventType string // RawEvent returns raw event body. RawEvent json.RawMessage // contains filtered or unexported fields }
UnmappedError represents error occurred when there is no mapping between given event name and corresponding Go struct.
func NewUnmappedError ¶ added in v0.11.1
func NewUnmappedError(ctxMsg, eventType string, raw json.RawMessage) *UnmappedError
NewUnmappedError returns new UnmappedError instance.
func (UnmappedError) Error ¶ added in v0.11.1
func (u UnmappedError) Error() string
Error returns human-readable error message.
type UnmarshallingErrorEvent ¶ added in v0.1.0
type UnmarshallingErrorEvent struct {
ErrorObj error
}
UnmarshallingErrorEvent is used when there are issues deconstructing a response
func (UnmarshallingErrorEvent) Error ¶ added in v0.1.0
func (u UnmarshallingErrorEvent) Error() string
type UpdateCallParameters ¶ added in v0.15.0
type UpdateManifestResponse ¶ added in v0.12.3
type UpdateManifestResponse struct { AppId string `json:"app_id,omitempty"` PermissionsUpdated bool `json:"permissions_updated,omitempty"` ManifestResponse }
type UpdateUserGroupsOption ¶ added in v0.11.2
type UpdateUserGroupsOption func(*UpdateUserGroupsParams)
UpdateUserGroupsOption options for the UpdateUserGroup method call.
func UpdateUserGroupsOptionChannels ¶ added in v0.11.2
func UpdateUserGroupsOptionChannels(channels []string) UpdateUserGroupsOption
UpdateUserGroupsOptionChannels change the default channels of the User Group. (default: unspecified, so it's no-op)
func UpdateUserGroupsOptionDescription ¶ added in v0.11.2
func UpdateUserGroupsOptionDescription(description *string) UpdateUserGroupsOption
UpdateUserGroupsOptionDescription change the description of the User Group. (default: nil, so it's no-op)
func UpdateUserGroupsOptionEnableSection ¶ added in v0.16.0
func UpdateUserGroupsOptionEnableSection(enableSection bool) UpdateUserGroupsOption
UpdateUserGroupsOptionEnableSection enable the section for the user group (default: false)
func UpdateUserGroupsOptionHandle ¶ added in v0.11.2
func UpdateUserGroupsOptionHandle(handle string) UpdateUserGroupsOption
UpdateUserGroupsOptionHandle change the handle of the User Group (default: empty, so it's no-op)
func UpdateUserGroupsOptionName ¶ added in v0.11.2
func UpdateUserGroupsOptionName(name string) UpdateUserGroupsOption
UpdateUserGroupsOptionName change the name of the User Group (default: empty, so it's no-op)
type UpdateUserGroupsParams ¶ added in v0.11.2
type UpdateUserGroupsParams struct { Name string Handle string Description *string Channels *[]string EnableSection bool }
UpdateUserGroupsParams contains arguments for UpdateUserGroup method call
type UploadFileV2Parameters ¶ added in v0.12.1
type User ¶
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,omitempty"` TZLabel string `json:"tz_label"` TZOffset int `json:"tz_offset"` Profile UserProfile `json:"profile"` IsBot bool `json:"is_bot"` 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"` IsStranger bool `json:"is_stranger"` IsAppUser bool `json:"is_app_user"` IsInvitedUser bool `json:"is_invited_user"` Has2FA bool `json:"has_2fa"` TwoFactorType *string `json:"two_factor_type"` HasFiles bool `json:"has_files"` Presence string `json:"presence"` Locale string `json:"locale"` Updated JSONTime `json:"updated"` Enterprise EnterpriseUser `json:"enterprise_user,omitempty"` }
User contains all the information of a user
type UserChangeEvent ¶
UserChangeEvent represents the user change event
type UserDetails ¶
type UserDetails struct { ID string `json:"id"` Name string `json:"name"` Created JSONTime `json:"created"` ManualPresence string `json:"manual_presence"` Prefs UserPrefs `json:"prefs"` }
UserDetails contains user details coming in the initial response from StartRTM
type UserGroup ¶ added in v0.1.0
type UserGroup 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 JSONTime `json:"date_create"` DateUpdate JSONTime `json:"date_update"` DateDelete JSONTime `json:"date_delete"` AutoType string `json:"auto_type"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` Prefs UserGroupPrefs `json:"prefs"` UserCount int `json:"user_count"` Users []string `json:"users"` }
UserGroup contains all the information of a user group
type UserGroupPrefs ¶ added in v0.1.0
UserGroupPrefs contains default channels and groups (private channels)
type UserIdentity ¶ added in v0.1.0
type UserIdentity struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` 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"` }
type UserIdentityResponse ¶ added in v0.1.0
type UserIdentityResponse struct { User UserIdentity `json:"user"` Team TeamIdentity `json:"team"` SlackResponse }
type UserPagination ¶ added in v0.3.0
type UserPagination struct { Users []User // contains filtered or unexported fields }
UserPagination allows for paginating over the users
func (UserPagination) Done ¶ added in v0.3.0
func (UserPagination) Done(err error) bool
Done checks if the pagination has completed
func (UserPagination) Failure ¶ added in v0.3.0
func (t UserPagination) Failure(err error) error
Failure checks if pagination failed.
func (UserPagination) Next ¶ added in v0.3.0
func (t UserPagination) Next(ctx context.Context) (_ UserPagination, err error)
type UserPrefs ¶
type UserPrefs struct { UserColors string `json:"user_colors,omitempty"` ColorNamesInList bool `json:"color_names_in_list,omitempty"` // Keyboard UnknownType `json:"keyboard"` EmailAlerts string `json:"email_alerts,omitempty"` EmailAlertsSleepUntil int `json:"email_alerts_sleep_until,omitempty"` EmailTips bool `json:"email_tips,omitempty"` EmailWeekly bool `json:"email_weekly,omitempty"` EmailOffers bool `json:"email_offers,omitempty"` EmailResearch bool `json:"email_research,omitempty"` EmailDeveloper bool `json:"email_developer,omitempty"` WelcomeMessageHidden bool `json:"welcome_message_hidden,omitempty"` SearchSort string `json:"search_sort,omitempty"` SearchFileSort string `json:"search_file_sort,omitempty"` SearchChannelSort string `json:"search_channel_sort,omitempty"` SearchPeopleSort string `json:"search_people_sort,omitempty"` ExpandInlineImages bool `json:"expand_inline_images,omitempty"` ExpandInternalInlineImages bool `json:"expand_internal_inline_images,omitempty"` ExpandSnippets bool `json:"expand_snippets,omitempty"` PostsFormattingGuide bool `json:"posts_formatting_guide,omitempty"` SeenWelcome2 bool `json:"seen_welcome_2,omitempty"` SeenSSBPrompt bool `json:"seen_ssb_prompt,omitempty"` SpacesNewXpBannerDismissed bool `json:"spaces_new_xp_banner_dismissed,omitempty"` SearchOnlyMyChannels bool `json:"search_only_my_channels,omitempty"` SearchOnlyCurrentTeam bool `json:"search_only_current_team,omitempty"` SearchHideMyChannels bool `json:"search_hide_my_channels,omitempty"` SearchOnlyShowOnline bool `json:"search_only_show_online,omitempty"` SearchHideDeactivatedUsers bool `json:"search_hide_deactivated_users,omitempty"` EmojiMode string `json:"emoji_mode,omitempty"` EmojiUse string `json:"emoji_use,omitempty"` HasInvited bool `json:"has_invited,omitempty"` HasUploaded bool `json:"has_uploaded,omitempty"` HasCreatedChannel bool `json:"has_created_channel,omitempty"` HasSearched bool `json:"has_searched,omitempty"` SearchExcludeChannels string `json:"search_exclude_channels,omitempty"` MessagesTheme string `json:"messages_theme,omitempty"` WebappSpellcheck bool `json:"webapp_spellcheck,omitempty"` NoJoinedOverlays bool `json:"no_joined_overlays,omitempty"` NoCreatedOverlays bool `json:"no_created_overlays,omitempty"` DropboxEnabled bool `json:"dropbox_enabled,omitempty"` SeenDomainInviteReminder bool `json:"seen_domain_invite_reminder,omitempty"` SeenMemberInviteReminder bool `json:"seen_member_invite_reminder,omitempty"` MuteSounds bool `json:"mute_sounds,omitempty"` ArrowHistory bool `json:"arrow_history,omitempty"` TabUIReturnSelects bool `json:"tab_ui_return_selects,omitempty"` ObeyInlineImgLimit bool `json:"obey_inline_img_limit,omitempty"` RequireAt bool `json:"require_at,omitempty"` SsbSpaceWindow string `json:"ssb_space_window,omitempty"` MacSsbBounce string `json:"mac_ssb_bounce,omitempty"` MacSsbBullet bool `json:"mac_ssb_bullet,omitempty"` ExpandNonMediaAttachments bool `json:"expand_non_media_attachments,omitempty"` ShowTyping bool `json:"show_typing,omitempty"` PagekeysHandled bool `json:"pagekeys_handled,omitempty"` LastSnippetType string `json:"last_snippet_type,omitempty"` DisplayRealNamesOverride int `json:"display_real_names_override,omitempty"` DisplayDisplayNames bool `json:"display_display_names,omitempty"` Time24 bool `json:"time24,omitempty"` EnterIsSpecialInTbt bool `json:"enter_is_special_in_tbt,omitempty"` MsgInputSendBtn bool `json:"msg_input_send_btn,omitempty"` MsgInputSendBtnAutoSet bool `json:"msg_input_send_btn_auto_set,omitempty"` MsgInputStickyComposer bool `json:"msg_input_sticky_composer,omitempty"` GraphicEmoticons bool `json:"graphic_emoticons,omitempty"` ConvertEmoticons bool `json:"convert_emoticons,omitempty"` SsEmojis bool `json:"ss_emojis,omitempty"` SeenOnboardingStart bool `json:"seen_onboarding_start,omitempty"` OnboardingCancelled bool `json:"onboarding_cancelled,omitempty"` SeenOnboardingSlackbotConversation bool `json:"seen_onboarding_slackbot_conversation,omitempty"` SeenOnboardingChannels bool `json:"seen_onboarding_channels,omitempty"` SeenOnboardingDirectMessages bool `json:"seen_onboarding_direct_messages,omitempty"` SeenOnboardingInvites bool `json:"seen_onboarding_invites,omitempty"` SeenOnboardingSearch bool `json:"seen_onboarding_search,omitempty"` SeenOnboardingRecentMentions bool `json:"seen_onboarding_recent_mentions,omitempty"` SeenOnboardingStarredItems bool `json:"seen_onboarding_starred_items,omitempty"` SeenOnboardingPrivateGroups bool `json:"seen_onboarding_private_groups,omitempty"` SeenOnboardingBanner bool `json:"seen_onboarding_banner,omitempty"` OnboardingSlackbotConversationStep int `json:"onboarding_slackbot_conversation_step,omitempty"` SetTzAutomatically bool `json:"set_tz_automatically,omitempty"` SuppressLinkWarning bool `json:"suppress_link_warning,omitempty"` DndEnabled bool `json:"dnd_enabled,omitempty"` DndStartHour string `json:"dnd_start_hour,omitempty"` DndEndHour string `json:"dnd_end_hour,omitempty"` DndBeforeMonday string `json:"dnd_before_monday,omitempty"` DndAfterMonday string `json:"dnd_after_monday,omitempty"` DndEnabledMonday string `json:"dnd_enabled_monday,omitempty"` DndBeforeTuesday string `json:"dnd_before_tuesday,omitempty"` DndAfterTuesday string `json:"dnd_after_tuesday,omitempty"` DndEnabledTuesday string `json:"dnd_enabled_tuesday,omitempty"` DndBeforeWednesday string `json:"dnd_before_wednesday,omitempty"` DndAfterWednesday string `json:"dnd_after_wednesday,omitempty"` DndEnabledWednesday string `json:"dnd_enabled_wednesday,omitempty"` DndBeforeThursday string `json:"dnd_before_thursday,omitempty"` DndAfterThursday string `json:"dnd_after_thursday,omitempty"` DndEnabledThursday string `json:"dnd_enabled_thursday,omitempty"` DndBeforeFriday string `json:"dnd_before_friday,omitempty"` DndAfterFriday string `json:"dnd_after_friday,omitempty"` DndEnabledFriday string `json:"dnd_enabled_friday,omitempty"` DndBeforeSaturday string `json:"dnd_before_saturday,omitempty"` DndAfterSaturday string `json:"dnd_after_saturday,omitempty"` DndEnabledSaturday string `json:"dnd_enabled_saturday,omitempty"` DndBeforeSunday string `json:"dnd_before_sunday,omitempty"` DndAfterSunday string `json:"dnd_after_sunday,omitempty"` DndEnabledSunday string `json:"dnd_enabled_sunday,omitempty"` DndDays string `json:"dnd_days,omitempty"` DndCustomNewBadgeSeen bool `json:"dnd_custom_new_badge_seen,omitempty"` DndNotificationScheduleNewBadgeSeen bool `json:"dnd_notification_schedule_new_badge_seen,omitempty"` // UnreadCollapsedChannels unknownType `json:"unread_collapsed_channels,omitempty"` SidebarBehavior string `json:"sidebar_behavior,omitempty"` ChannelSort string `json:"channel_sort,omitempty"` SeparatePrivateChannels bool `json:"separate_private_channels,omitempty"` SidebarTheme string `json:"sidebar_theme,omitempty"` SidebarThemeCustomValues string `json:"sidebar_theme_custom_values,omitempty"` NoInvitesWidgetInSidebar bool `json:"no_invites_widget_in_sidebar,omitempty"` NoOmniboxInChannels bool `json:"no_omnibox_in_channels,omitempty"` KKeyOmniboxAutoHideCount int `json:"k_key_omnibox_auto_hide_count,omitempty"` ShowSidebarQuickswitcherButton bool `json:"show_sidebar_quickswitcher_button,omitempty"` EntOrgWideChannelsSidebar bool `json:"ent_org_wide_channels_sidebar,omitempty"` MarkMsgsReadImmediately bool `json:"mark_msgs_read_immediately,omitempty"` StartScrollAtOldest bool `json:"start_scroll_at_oldest,omitempty"` SnippetEditorWrapLongLines bool `json:"snippet_editor_wrap_long_lines,omitempty"` LsDisabled bool `json:"ls_disabled,omitempty"` FKeySearch bool `json:"f_key_search,omitempty"` KKeyOmnibox bool `json:"k_key_omnibox,omitempty"` PromptedForEmailDisabling bool `json:"prompted_for_email_disabling,omitempty"` NoMacelectronBanner bool `json:"no_macelectron_banner,omitempty"` NoMacssb1Banner bool `json:"no_macssb1_banner,omitempty"` NoMacssb2Banner bool `json:"no_macssb2_banner,omitempty"` NoWinssb1Banner bool `json:"no_winssb1_banner,omitempty"` HideUserGroupInfoPane bool `json:"hide_user_group_info_pane,omitempty"` MentionsExcludeAtUserGroups bool `json:"mentions_exclude_at_user_groups,omitempty"` MentionsExcludeReactions bool `json:"mentions_exclude_reactions,omitempty"` PrivacyPolicySeen bool `json:"privacy_policy_seen,omitempty"` EnterpriseMigrationSeen bool `json:"enterprise_migration_seen,omitempty"` LastTosAcknowledged string `json:"last_tos_acknowledged,omitempty"` SearchExcludeBots bool `json:"search_exclude_bots,omitempty"` LoadLato2 bool `json:"load_lato_2,omitempty"` FullerTimestamps bool `json:"fuller_timestamps,omitempty"` LastSeenAtChannelWarning int `json:"last_seen_at_channel_warning,omitempty"` EmojiAutocompleteBig bool `json:"emoji_autocomplete_big,omitempty"` TwoFactorAuthEnabled bool `json:"two_factor_auth_enabled,omitempty"` // TwoFactorType unknownType `json:"two_factor_type,omitempty"` // TwoFactorBackupType unknownType `json:"two_factor_backup_type,omitempty"` HideHexSwatch bool `json:"hide_hex_swatch,omitempty"` ShowJumperScores bool `json:"show_jumper_scores,omitempty"` EnterpriseMdmCustomMsg string `json:"enterprise_mdm_custom_msg,omitempty"` // EnterpriseExcludedAppTeams unknownType `json:"enterprise_excluded_app_teams,omitempty"` ClientLogsPri string `json:"client_logs_pri,omitempty"` FlannelServerPool string `json:"flannel_server_pool,omitempty"` MentionsExcludeAtChannels bool `json:"mentions_exclude_at_channels,omitempty"` ConfirmClearAllUnreads bool `json:"confirm_clear_all_unreads,omitempty"` ConfirmUserMarkedAway bool `json:"confirm_user_marked_away,omitempty"` BoxEnabled bool `json:"box_enabled,omitempty"` SeenSingleEmojiMsg bool `json:"seen_single_emoji_msg,omitempty"` ConfirmShCallStart bool `json:"confirm_sh_call_start,omitempty"` PreferredSkinTone string `json:"preferred_skin_tone,omitempty"` ShowAllSkinTones bool `json:"show_all_skin_tones,omitempty"` WhatsNewRead int `json:"whats_new_read,omitempty"` // FrecencyJumper unknownType `json:"frecency_jumper,omitempty"` FrecencyEntJumper string `json:"frecency_ent_jumper,omitempty"` FrecencyEntJumperBackup string `json:"frecency_ent_jumper_backup,omitempty"` Jumbomoji bool `json:"jumbomoji,omitempty"` NewxpSeenLastMessage int `json:"newxp_seen_last_message,omitempty"` ShowMemoryInstrument bool `json:"show_memory_instrument,omitempty"` EnableUnreadView bool `json:"enable_unread_view,omitempty"` SeenUnreadViewCoachmark bool `json:"seen_unread_view_coachmark,omitempty"` EnableReactEmojiPicker bool `json:"enable_react_emoji_picker,omitempty"` SeenCustomStatusBadge bool `json:"seen_custom_status_badge,omitempty"` SeenCustomStatusCallout bool `json:"seen_custom_status_callout,omitempty"` SeenCustomStatusExpirationBadge bool `json:"seen_custom_status_expiration_badge,omitempty"` UsedCustomStatusKbShortcut bool `json:"used_custom_status_kb_shortcut,omitempty"` SeenGuestAdminSlackbotAnnouncement bool `json:"seen_guest_admin_slackbot_announcement,omitempty"` SeenThreadsNotificationBanner bool `json:"seen_threads_notification_banner,omitempty"` SeenNameTaggingCoachmark bool `json:"seen_name_tagging_coachmark,omitempty"` AllUnreadsSortOrder string `json:"all_unreads_sort_order,omitempty"` Locale string `json:"locale,omitempty"` SeenIntlChannelNamesCoachmark bool `json:"seen_intl_channel_names_coachmark,omitempty"` SeenP2LocaleChangeMessage int `json:"seen_p2_locale_change_message,omitempty"` SeenLocaleChangeMessage int `json:"seen_locale_change_message,omitempty"` SeenJapaneseLocaleChangeMessage bool `json:"seen_japanese_locale_change_message,omitempty"` SeenChannelBrowserAdminCoachmark bool `json:"seen_channel_browser_admin_coachmark,omitempty"` SeenAdministrationMenu bool `json:"seen_administration_menu,omitempty"` SeenDraftsSectionCoachmark bool `json:"seen_drafts_section_coachmark,omitempty"` SeenEmojiUpdateOverlayCoachmark bool `json:"seen_emoji_update_overlay_coachmark,omitempty"` SeenSonicDeluxeToast int `json:"seen_sonic_deluxe_toast,omitempty"` SeenWysiwygDeluxeToast bool `json:"seen_wysiwyg_deluxe_toast,omitempty"` SeenMarkdownPasteToast int `json:"seen_markdown_paste_toast,omitempty"` SeenMarkdownPasteShortcut int `json:"seen_markdown_paste_shortcut,omitempty"` SeenIaEducation bool `json:"seen_ia_education,omitempty"` PlainTextMode bool `json:"plain_text_mode,omitempty"` AllowCallsToSetCurrentStatus bool `json:"allow_calls_to_set_current_status,omitempty"` InInteractiveMasMigrationFlow bool `json:"in_interactive_mas_migration_flow,omitempty"` SunsetInteractiveMessageViews int `json:"sunset_interactive_message_views,omitempty"` ShdepPromoCodeSubmitted bool `json:"shdep_promo_code_submitted,omitempty"` SeenShdepSlackbotMessage bool `json:"seen_shdep_slackbot_message,omitempty"` SeenCallsInteractiveCoachmark bool `json:"seen_calls_interactive_coachmark,omitempty"` AllowCmdTabIss bool `json:"allow_cmd_tab_iss,omitempty"` SeenWorkflowBuilderDeluxeToast bool `json:"seen_workflow_builder_deluxe_toast,omitempty"` WorkflowBuilderIntroModalClickedThrough bool `json:"workflow_builder_intro_modal_clicked_through,omitempty"` // WorkflowBuilderCoachmarks unknownType `json:"workflow_builder_coachmarks,omitempty"` SeenGdriveCoachmark bool `json:"seen_gdrive_coachmark,omitempty"` OverloadedMessageEnabled bool `json:"overloaded_message_enabled,omitempty"` SeenHighlightsCoachmark bool `json:"seen_highlights_coachmark,omitempty"` SeenHighlightsArrowsCoachmark bool `json:"seen_highlights_arrows_coachmark,omitempty"` SeenHighlightsWarmWelcome bool `json:"seen_highlights_warm_welcome,omitempty"` SeenNewSearchUi bool `json:"seen_new_search_ui,omitempty"` SeenChannelSearch bool `json:"seen_channel_search,omitempty"` SeenPeopleSearch bool `json:"seen_people_search,omitempty"` SeenPeopleSearchCount int `json:"seen_people_search_count,omitempty"` DismissedScrollSearchTooltipCount int `json:"dismissed_scroll_search_tooltip_count,omitempty"` LastDismissedScrollSearchTooltipTimestamp int `json:"last_dismissed_scroll_search_tooltip_timestamp,omitempty"` HasUsedQuickswitcherShortcut bool `json:"has_used_quickswitcher_shortcut,omitempty"` SeenQuickswitcherShortcutTipCount int `json:"seen_quickswitcher_shortcut_tip_count,omitempty"` BrowsersDismissedChannelsLowResultsEducation bool `json:"browsers_dismissed_channels_low_results_education,omitempty"` BrowsersSeenInitialChannelsEducation bool `json:"browsers_seen_initial_channels_education,omitempty"` BrowsersDismissedPeopleLowResultsEducation bool `json:"browsers_dismissed_people_low_results_education,omitempty"` BrowsersSeenInitialPeopleEducation bool `json:"browsers_seen_initial_people_education,omitempty"` BrowsersDismissedUserGroupsLowResultsEducation bool `json:"browsers_dismissed_user_groups_low_results_education,omitempty"` BrowsersSeenInitialUserGroupsEducation bool `json:"browsers_seen_initial_user_groups_education,omitempty"` BrowsersDismissedFilesLowResultsEducation bool `json:"browsers_dismissed_files_low_results_education,omitempty"` BrowsersSeenInitialFilesEducation bool `json:"browsers_seen_initial_files_education,omitempty"` A11yAnimations bool `json:"a11y_animations,omitempty"` SeenKeyboardShortcutsCoachmark bool `json:"seen_keyboard_shortcuts_coachmark,omitempty"` NeedsInitialPasswordSet bool `json:"needs_initial_password_set,omitempty"` LessonsEnabled bool `json:"lessons_enabled,omitempty"` TractorEnabled bool `json:"tractor_enabled,omitempty"` TractorExperimentGroup string `json:"tractor_experiment_group,omitempty"` OpenedSlackbotDm bool `json:"opened_slackbot_dm,omitempty"` NewxpSuggestedChannels string `json:"newxp_suggested_channels,omitempty"` OnboardingComplete bool `json:"onboarding_complete,omitempty"` WelcomePlaceState string `json:"welcome_place_state,omitempty"` // OnboardingRoleApps unknownType `json:"onboarding_role_apps,omitempty"` HasReceivedThreadedMessage bool `json:"has_received_threaded_message,omitempty"` SendYourFirstMessageBannerEnabled bool `json:"send_your_first_message_banner_enabled,omitempty"` WhocanseethisDmMpdmBadge bool `json:"whocanseethis_dm_mpdm_badge,omitempty"` HighlightWords string `json:"highlight_words,omitempty"` ThreadsEverything bool `json:"threads_everything,omitempty"` NoTextInNotifications bool `json:"no_text_in_notifications,omitempty"` PushShowPreview bool `json:"push_show_preview,omitempty"` GrowlsEnabled bool `json:"growls_enabled,omitempty"` AllChannelsLoud bool `json:"all_channels_loud,omitempty"` PushDmAlert bool `json:"push_dm_alert,omitempty"` PushMentionAlert bool `json:"push_mention_alert,omitempty"` PushEverything bool `json:"push_everything,omitempty"` PushIdleWait int `json:"push_idle_wait,omitempty"` PushSound string `json:"push_sound,omitempty"` NewMsgSnd string `json:"new_msg_snd,omitempty"` PushLoudChannels string `json:"push_loud_channels,omitempty"` PushMentionChannels string `json:"push_mention_channels,omitempty"` PushLoudChannelsSet string `json:"push_loud_channels_set,omitempty"` LoudChannels string `json:"loud_channels,omitempty"` NeverChannels string `json:"never_channels,omitempty"` LoudChannelsSet string `json:"loud_channels_set,omitempty"` AtChannelSuppressedChannels string `json:"at_channel_suppressed_channels,omitempty"` PushAtChannelSuppressedChannels string `json:"push_at_channel_suppressed_channels,omitempty"` MutedChannels string `json:"muted_channels,omitempty"` // AllNotificationsPrefs unknownType `json:"all_notifications_prefs,omitempty"` GrowthMsgLimitApproachingCtaCount int `json:"growth_msg_limit_approaching_cta_count,omitempty"` GrowthMsgLimitApproachingCtaTs int `json:"growth_msg_limit_approaching_cta_ts,omitempty"` GrowthMsgLimitReachedCtaCount int `json:"growth_msg_limit_reached_cta_count,omitempty"` GrowthMsgLimitReachedCtaLastTs int `json:"growth_msg_limit_reached_cta_last_ts,omitempty"` GrowthMsgLimitLongReachedCtaCount int `json:"growth_msg_limit_long_reached_cta_count,omitempty"` GrowthMsgLimitLongReachedCtaLastTs int `json:"growth_msg_limit_long_reached_cta_last_ts,omitempty"` GrowthMsgLimitSixtyDayBannerCtaCount int `json:"growth_msg_limit_sixty_day_banner_cta_count,omitempty"` GrowthMsgLimitSixtyDayBannerCtaLastTs int `json:"growth_msg_limit_sixty_day_banner_cta_last_ts,omitempty"` // GrowthAllBannersPrefs unknownType `json:"growth_all_banners_prefs,omitempty"` AnalyticsUpsellCoachmarkSeen bool `json:"analytics_upsell_coachmark_seen,omitempty"` SeenAppSpaceCoachmark bool `json:"seen_app_space_coachmark,omitempty"` SeenAppSpaceTutorial bool `json:"seen_app_space_tutorial,omitempty"` DismissedAppLauncherWelcome bool `json:"dismissed_app_launcher_welcome,omitempty"` DismissedAppLauncherLimit bool `json:"dismissed_app_launcher_limit,omitempty"` Purchaser bool `json:"purchaser,omitempty"` ShowEntOnboarding bool `json:"show_ent_onboarding,omitempty"` FoldersEnabled bool `json:"folders_enabled,omitempty"` // FolderData unknownType `json:"folder_data,omitempty"` SeenCorporateExportAlert bool `json:"seen_corporate_export_alert,omitempty"` ShowAutocompleteHelp int `json:"show_autocomplete_help,omitempty"` DeprecationToastLastSeen int `json:"deprecation_toast_last_seen,omitempty"` DeprecationModalLastSeen int `json:"deprecation_modal_last_seen,omitempty"` Iap1Lab int `json:"iap1_lab,omitempty"` IaPlatformActionsLab int `json:"ia_platform_actions_lab,omitempty"` ActivityView string `json:"activity_view,omitempty"` FailoverProxyCheckCompleted int `json:"failover_proxy_check_completed,omitempty"` EdgeUploadProxyCheckCompleted int `json:"edge_upload_proxy_check_completed,omitempty"` AppSubdomainCheckCompleted int `json:"app_subdomain_check_completed,omitempty"` AddAppsPromptDismissed bool `json:"add_apps_prompt_dismissed,omitempty"` AddChannelPromptDismissed bool `json:"add_channel_prompt_dismissed,omitempty"` ChannelSidebarHideInvite bool `json:"channel_sidebar_hide_invite,omitempty"` InProdSurveysEnabled bool `json:"in_prod_surveys_enabled,omitempty"` DismissedInstalledAppDmSuggestions string `json:"dismissed_installed_app_dm_suggestions,omitempty"` SeenContextualMessageShortcutsModal bool `json:"seen_contextual_message_shortcuts_modal,omitempty"` ContextualMessageShortcutsModalWasSeen bool `json:"contextual_message_shortcuts_modal_was_seen,omitempty"` UpToBrowseKbShortcut bool `json:"up_to_browse_kb_shortcut,omitempty"` ChannelSections string `json:"channel_sections,omitempty"` TZ string `json:"tz,omitempty"` }
UserPrefs carries a bunch of user settings including some unknown types
type UserPrefsCarrier ¶ added in v0.6.3
type UserPrefsCarrier struct { SlackResponse UserPrefs *UserPrefs `json:"prefs"` }
type UserPresence ¶
type UserPresence struct { Presence string `json:"presence,omitempty"` Online bool `json:"online,omitempty"` AutoAway bool `json:"auto_away,omitempty"` ManualAway bool `json:"manual_away,omitempty"` ConnectionCount int `json:"connection_count,omitempty"` LastActivity JSONTime `json:"last_activity,omitempty"` }
UserPresence contains details about a user online status
type UserProfile ¶
type UserProfile struct { FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` RealName string `json:"real_name"` RealNameNormalized string `json:"real_name_normalized"` DisplayName string `json:"display_name"` DisplayNameNormalized string `json:"display_name_normalized"` AvatarHash string `json:"avatar_hash"` Email string `json:"email,omitempty"` Skype string `json:"skyp,omitempty"` Phone string `json:"phone,omitempty"` 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"` ImageOriginal string `json:"image_original,omitempty"` Title string `json:"title,omitempty"` BotID string `json:"bot_id,omitempty"` ApiAppID string `json:"api_app_id,omitempty"` StatusText string `json:"status_text,omitempty"` StatusEmoji string `json:"status_emoji,omitempty"` StatusEmojiDisplayInfo []UserProfileStatusEmojiDisplayInfo `json:"status_emoji_display_info,omitempty"` StatusExpiration int `json:"status_expiration,omitempty"` Team string `json:"team"` Fields UserProfileCustomFields `json:"fields,omitempty"` }
UserProfile contains all the information details of a given user
func (*UserProfile) FieldsMap ¶ added in v0.3.0
func (profile *UserProfile) FieldsMap() map[string]UserProfileCustomField
FieldsMap returns a map of custom fields.
func (*UserProfile) SetFieldsMap ¶ added in v0.3.0
func (profile *UserProfile) SetFieldsMap(m map[string]UserProfileCustomField)
SetFieldsMap sets a map of custom fields.
type UserProfileCustomField ¶ added in v0.3.0
type UserProfileCustomField struct { Value string `json:"value"` Alt string `json:"alt"` Label string `json:"label"` }
UserProfileCustomField represents a custom user profile field
type UserProfileCustomFields ¶ added in v0.3.0
type UserProfileCustomFields struct {
// contains filtered or unexported fields
}
UserProfileCustomFields represents user profile's custom fields. Slack API's response data type is inconsistent so we use the struct. For detail, please see below. https://github.com/slack-go/slack/pull/298#discussion_r185159233
func (*UserProfileCustomFields) Len ¶ added in v0.3.0
func (fields *UserProfileCustomFields) Len() int
Len returns the number of custom fields.
func (UserProfileCustomFields) MarshalJSON ¶ added in v0.3.0
func (fields UserProfileCustomFields) MarshalJSON() ([]byte, error)
MarshalJSON is the implementation of the json.Marshaler interface.
func (*UserProfileCustomFields) SetMap ¶ added in v0.3.0
func (fields *UserProfileCustomFields) SetMap(m map[string]UserProfileCustomField)
SetMap sets a map of custom fields.
func (*UserProfileCustomFields) ToMap ¶ added in v0.3.0
func (fields *UserProfileCustomFields) ToMap() map[string]UserProfileCustomField
ToMap returns a map of custom fields.
func (*UserProfileCustomFields) UnmarshalJSON ¶ added in v0.3.0
func (fields *UserProfileCustomFields) UnmarshalJSON(b []byte) error
UnmarshalJSON is the implementation of the json.Unmarshaler interface.
type UserProfileStatusEmojiDisplayInfo ¶ added in v0.11.4
type UserSetPhotoParams ¶ added in v0.1.0
func NewUserSetPhotoParams ¶ added in v0.1.0
func NewUserSetPhotoParams() UserSetPhotoParams
type UserTypingEvent ¶
type UserTypingEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` }
UserTypingEvent represents the user typing event
type VideoBlock ¶ added in v0.12.4
type VideoBlock struct { Type MessageBlockType `json:"type"` VideoURL string `json:"video_url"` ThumbnailURL string `json:"thumbnail_url"` AltText string `json:"alt_text"` Title *TextBlockObject `json:"title"` BlockID string `json:"block_id,omitempty"` TitleURL string `json:"title_url,omitempty"` AuthorName string `json:"author_name,omitempty"` ProviderName string `json:"provider_name,omitempty"` ProviderIconURL string `json:"provider_icon_url,omitempty"` Description *TextBlockObject `json:"description,omitempty"` }
VideoBlock defines data required to display a video as a block element
More Information: https://api.slack.com/reference/block-kit/blocks#video
func NewVideoBlock ¶ added in v0.12.4
func NewVideoBlock(videoURL, thumbnailURL, altText, blockID string, title *TextBlockObject) *VideoBlock
NewVideoBlock returns an instance of a new Video Block type
func (VideoBlock) BlockType ¶ added in v0.12.4
func (s VideoBlock) BlockType() MessageBlockType
BlockType returns the type of the block
func (VideoBlock) ID ¶ added in v0.16.0
func (s VideoBlock) ID() string
ID returns the ID of the block
func (*VideoBlock) WithAuthorName ¶ added in v0.12.4
func (s *VideoBlock) WithAuthorName(authorName string) *VideoBlock
WithAuthorName sets the author name for the VideoBlock
func (*VideoBlock) WithDescription ¶ added in v0.12.4
func (s *VideoBlock) WithDescription(description *TextBlockObject) *VideoBlock
WithDescription sets the description for the VideoBlock
func (*VideoBlock) WithProviderIconURL ¶ added in v0.12.4
func (s *VideoBlock) WithProviderIconURL(providerIconURL string) *VideoBlock
WithProviderIconURL sets the provider icon URL for the VideoBlock
func (*VideoBlock) WithProviderName ¶ added in v0.12.4
func (s *VideoBlock) WithProviderName(providerName string) *VideoBlock
WithProviderName sets the provider name for the VideoBlock
func (*VideoBlock) WithTitleURL ¶ added in v0.12.4
func (s *VideoBlock) WithTitleURL(titleURL string) *VideoBlock
WithTitleURL sets the title URL for the VideoBlock
type View ¶ added in v0.6.2
type View struct { SlackResponse ID string `json:"id"` TeamID string `json:"team_id"` Type ViewType `json:"type"` Title *TextBlockObject `json:"title"` Close *TextBlockObject `json:"close"` Submit *TextBlockObject `json:"submit"` Blocks Blocks `json:"blocks"` PrivateMetadata string `json:"private_metadata"` CallbackID string `json:"callback_id"` State *ViewState `json:"state"` Hash string `json:"hash"` ClearOnClose bool `json:"clear_on_close"` NotifyOnClose bool `json:"notify_on_close"` RootViewID string `json:"root_view_id"` PreviousViewID string `json:"previous_view_id"` AppID string `json:"app_id"` ExternalID string `json:"external_id"` BotID string `json:"bot_id"` AppInstalledTeamID string `json:"app_installed_team_id"` }
type ViewClosedCallback ¶ added in v0.6.3
type ViewClosedCallback struct {
IsCleared bool `json:"is_cleared"`
}
type ViewResponse ¶ added in v0.6.2
type ViewResponse struct { SlackResponse View `json:"view"` }
type ViewResponseAction ¶ added in v0.6.3
type ViewResponseAction string
const ( RAClear ViewResponseAction = "clear" RAUpdate ViewResponseAction = "update" RAPush ViewResponseAction = "push" RAErrors ViewResponseAction = "errors" )
type ViewState ¶ added in v0.6.3
type ViewState struct {
Values map[string]map[string]BlockAction `json:"values"`
}
type ViewSubmissionCallback ¶ added in v0.6.3
type ViewSubmissionCallback struct { Hash string `json:"hash"` ResponseURLs []ViewSubmissionCallbackResponseURL `json:"response_urls,omitempty"` }
type ViewSubmissionCallbackResponseURL ¶ added in v0.9.1
type ViewSubmissionResponse ¶ added in v0.6.3
type ViewSubmissionResponse struct { ResponseAction ViewResponseAction `json:"response_action"` View *ModalViewRequest `json:"view,omitempty"` Errors map[string]string `json:"errors,omitempty"` }
func NewClearViewSubmissionResponse ¶ added in v0.6.3
func NewClearViewSubmissionResponse() *ViewSubmissionResponse
func NewErrorsViewSubmissionResponse ¶ added in v0.6.3
func NewErrorsViewSubmissionResponse(errors map[string]string) *ViewSubmissionResponse
func NewPushViewSubmissionResponse ¶ added in v0.6.3
func NewPushViewSubmissionResponse(view *ModalViewRequest) *ViewSubmissionResponse
func NewUpdateViewSubmissionResponse ¶ added in v0.6.3
func NewUpdateViewSubmissionResponse(view *ModalViewRequest) *ViewSubmissionResponse
type ViewType ¶ added in v0.6.2
type ViewType string
const VTWorkflowStep ViewType = "workflow_step"
type WebhookMessage ¶ added in v0.4.0
type WebhookMessage struct { Username string `json:"username,omitempty"` IconEmoji string `json:"icon_emoji,omitempty"` IconURL string `json:"icon_url,omitempty"` Channel string `json:"channel,omitempty"` ThreadTimestamp string `json:"thread_ts,omitempty"` Text string `json:"text,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` Parse string `json:"parse,omitempty"` Blocks *Blocks `json:"blocks,omitempty"` ResponseType string `json:"response_type,omitempty"` ReplaceOriginal bool `json:"replace_original"` DeleteOriginal bool `json:"delete_original"` ReplyBroadcast bool `json:"reply_broadcast,omitempty"` UnfurlLinks bool `json:"unfurl_links,omitempty"` UnfurlMedia bool `json:"unfurl_media,omitempty"` }
type WorkflowStep ¶ added in v0.12.3
type WorkflowStep struct { Name string `json:"name" yaml:"name"` CallbackID string `json:"callback_id" yaml:"callback_id"` }
WorkflowStep is a group of settings that describes workflow steps configuration
type WorkflowStepCompleteResponse ¶ added in v0.10.3
type WorkflowStepCompleteResponse struct { WorkflowStepEditID string `json:"workflow_step_edit_id"` Inputs *WorkflowStepInputs `json:"inputs,omitempty"` Outputs *[]WorkflowStepOutput `json:"outputs,omitempty"` }
type WorkflowStepCompletedRequest ¶ added in v0.11.2
type WorkflowStepCompletedRequestOption ¶ added in v0.11.2
type WorkflowStepCompletedRequestOption func(opt *WorkflowStepCompletedRequest) error
func WorkflowStepCompletedRequestOptionOutput ¶ added in v0.11.2
func WorkflowStepCompletedRequestOptionOutput(outputs map[string]string) WorkflowStepCompletedRequestOption
type WorkflowStepFailedRequest ¶ added in v0.11.2
type WorkflowStepInputElement ¶ added in v0.10.3
type WorkflowStepInputs ¶ added in v0.10.3
type WorkflowStepInputs map[string]WorkflowStepInputElement
type WorkflowStepOutput ¶ added in v0.10.3
Source Files
¶
- admin.go
- apps.go
- assistant.go
- attachments.go
- audit.go
- auth.go
- block.go
- block_action.go
- block_call.go
- block_context.go
- block_conv.go
- block_divider.go
- block_element.go
- block_file.go
- block_header.go
- block_image.go
- block_input.go
- block_object.go
- block_rich_text.go
- block_section.go
- block_unknown.go
- block_video.go
- bookmarks.go
- bots.go
- calls.go
- canvas.go
- channels.go
- chat.go
- comment.go
- conversation.go
- dialog.go
- dialog_select.go
- dialog_text.go
- dnd.go
- emoji.go
- errors.go
- files.go
- function_execute.go
- groups.go
- history.go
- im.go
- info.go
- interactions.go
- item.go
- logger.go
- manifests.go
- messageID.go
- messages.go
- metadata.go
- misc.go
- oauth.go
- pagination.go
- pins.go
- reactions.go
- reminders.go
- remotefiles.go
- rtm.go
- search.go
- security.go
- slack.go
- slash.go
- socket_mode.go
- stars.go
- status_code_error.go
- team.go
- tokens.go
- usergroups.go
- users.go
- views.go
- webhooks.go
- websocket.go
- websocket_channels.go
- websocket_desktop_notification.go
- websocket_dm.go
- websocket_dnd.go
- websocket_files.go
- websocket_groups.go
- websocket_internals.go
- websocket_managed_conn.go
- websocket_misc.go
- websocket_mobile_in_app_notification.go
- websocket_pins.go
- websocket_reactions.go
- websocket_stars.go
- websocket_subteam.go
- websocket_teams.go
- workflow_step.go
- workflow_step_execute.go
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
internal
|
|
Package slackutilsx is a utility package that doesn't promise API stability.
|
Package slackutilsx is a utility package that doesn't promise API stability. |