Documentation ¶
Index ¶
- type Channel
- type DevBotMessageDictionary
- type DictionaryMessage
- type File
- type MessageBlock
- type Profile
- type ResponseMetadata
- type Self
- type SlackMember
- type SlackRequestChatPostMessage
- type SlackRequestEventMessage
- type SlackResponseChatPostMessage
- type SlackResponseConversationsList
- type SlackResponseEventMessage
- type SlackResponseRTMConnect
- type SlackResponseUsersList
- type Team
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { ID string `json:"id"` Name string `json:"name"` IsChannel bool `json:"is_channel"` IsGroup bool `json:"is_group"` IsIm bool `json:"is_im"` Created int `json:"created"` IsArchived bool `json:"is_archived"` IsGeneral bool `json:"is_general"` Unlinked int `json:"unlinked"` NameNormalized string `json:"name_normalized"` ParentConversation interface{} `json:"parent_conversation"` Creator string `json:"creator"` PendingConnectedTeamIds []interface{} `json:"pending_connected_team_ids"` IsMember bool `json:"is_member"` IsPrivate bool `json:"is_private"` IsMpim bool `json:"is_mpim"` Topic struct { Value string `json:"value"` Creator string `json:"creator"` LastSet int `json:"last_set"` } `json:"topic"` Purpose struct { Value string `json:"value"` Creator string `json:"creator"` LastSet int `json:"last_set"` } `json:"purpose"` PreviousNames []interface{} `json:"previous_names"` NumMembers int `json:"num_members"` }
Channel it's an object which contains information about slack channel
type DevBotMessageDictionary ¶
type DevBotMessageDictionary struct { TextMessageDictionary []DictionaryMessage `json:"text_message_dictionary"` FileMessageDictionary []DictionaryMessage `json:"file_message_dictionary"` }
DevBotMessageDictionary main dictionary of DevBot
type DictionaryMessage ¶
type DictionaryMessage struct { Question string `json:"question"` Answer string `json:"answer"` MainGroupIndexInRegex int `json:"main_group_index_in_regex"` ReactionType string `json:"reaction_type"` }
DictionaryMessage child struct of DevBotMessageDictionary object
type File ¶
type File struct { Created int `json:"created"` DisplayAsBot bool `json:"display_as_bot"` Editable bool `json:"editable"` ExternalType string `json:"external_type"` Filetype string `json:"filetype"` HasRichPreview bool `json:"has_rich_preview"` ID string `json:"id"` ImageExifRotation int `json:"image_exif_rotation"` IsExternal bool `json:"is_external"` IsPublic bool `json:"is_public"` IsStarred bool `json:"is_starred"` Mimetype string `json:"mimetype"` Mode string `json:"mode"` Name string `json:"name"` OriginalH int `json:"original_h"` OriginalW int `json:"original_w"` Permalink string `json:"permalink"` PermalinkPublic string `json:"permalink_public"` PrettyType string `json:"pretty_type"` Size int `json:"size"` Thumb1024 string `json:"thumb_1024"` Thumb1024H int `json:"thumb_1024_h"` Thumb1024W int `json:"thumb_1024_w"` Thumb160 string `json:"thumb_160"` Thumb360 string `json:"thumb_360"` Thumb360H int `json:"thumb_360_h"` Thumb360W int `json:"thumb_360_w"` Thumb480 string `json:"thumb_480"` Thumb480H int `json:"thumb_480_h"` Thumb480W int `json:"thumb_480_w"` Thumb64 string `json:"thumb_64"` Thumb720 string `json:"thumb_720"` Thumb720H int `json:"thumb_720_h"` Thumb720W int `json:"thumb_720_w"` Thumb80 string `json:"thumb_80"` Thumb800 string `json:"thumb_800"` Thumb800H int `json:"thumb_800_h"` Thumb800W int `json:"thumb_800_w"` Thumb960 string `json:"thumb_960"` Thumb960H int `json:"thumb_960_h"` Thumb960W int `json:"thumb_960_w"` ThumbTiny string `json:"thumb_tiny"` Timestamp int `json:"timestamp"` Title string `json:"title"` URLPrivate string `json:"url_private"` URLPrivateDownload string `json:"url_private_download"` User string `json:"user"` Username string `json:"username"` }
File child struct of SlackResponseEventMessage
type MessageBlock ¶
type MessageBlock struct { BlockID string `json:"block_id"` Elements []struct { Elements []struct { Type string `json:"type"` UserID string `json:"user_id,omitempty"` Text string `json:"text,omitempty"` } `json:"elements"` Type string `json:"type"` } `json:"elements"` Type string `json:"type"` }
MessageBlock child struct of SlackResponseEventMessage
type Profile ¶
type Profile struct { Title string `json:"title"` Phone string `json:"phone"` Skype string `json:"skype"` RealName string `json:"real_name"` RealNameNormalized string `json:"real_name_normalized"` DisplayName string `json:"display_name"` DisplayNameNormalized string `json:"display_name_normalized"` Fields interface{} `json:"fields"` StatusText string `json:"status_text"` StatusEmoji string `json:"status_emoji"` StatusExpiration int `json:"status_expiration"` AvatarHash string `json:"avatar_hash"` AlwaysActive bool `json:"always_active"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Image24 string `json:"image_24"` Image32 string `json:"image_32"` Image48 string `json:"image_48"` Image72 string `json:"image_72"` Image192 string `json:"image_192"` Image512 string `json:"image_512"` StatusTextCanonical string `json:"status_text_canonical"` Team string `json:"team"` }
Profile object
type ResponseMetadata ¶
type ResponseMetadata struct {
NextCursor string `json:"next_cursor"`
}
ResponseMetadata object of metadata
type SlackMember ¶
type SlackMember 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 interface{} `json:"tz"` TzLabel string `json:"tz_label"` TzOffset int `json:"tz_offset"` Profile Profile `json:"profile"` IsAdmin bool `json:"is_admin"` IsOwner bool `json:"is_owner"` IsPrimaryOwner bool `json:"is_primary_owner"` IsRestricted bool `json:"is_restricted"` IsUltraRestricted bool `json:"is_ultra_restricted"` IsBot bool `json:"is_bot"` IsAppUser bool `json:"is_app_user"` Updated int `json:"updated"` }
SlackMember object which is used in SlackResponseUsersList object
type SlackRequestChatPostMessage ¶
type SlackRequestChatPostMessage struct { Channel string `json:"channel"` Text string `json:"text"` AsUser bool `json:"as_user"` Ts time.Time DictionaryMessage DictionaryMessage }
SlackRequestChatPostMessage request for post.chatMessage
type SlackRequestEventMessage ¶
type SlackRequestEventMessage struct { ID uint64 `json:"id"` Type string `json:"type"` Channel string `json:"channel"` Text string `json:"text"` }
SlackRequestEventMessage object for slack WS event message
type SlackResponseChatPostMessage ¶
type SlackResponseChatPostMessage struct { Ok bool `json:"ok"` Channel string `json:"channel"` Ts string `json:"ts"` Error string `json:"error,omitempty"` Message struct { BotID string `json:"bot_id"` Type string `json:"type"` Text string `json:"text"` User string `json:"user"` Ts string `json:"ts"` Team string `json:"team"` BotProfile struct { ID string `json:"id"` Deleted bool `json:"deleted"` Name string `json:"name"` Updated int `json:"updated"` AppID string `json:"app_id"` Icons struct { Image36 string `json:"image_36"` Image48 string `json:"image_48"` Image72 string `json:"image_72"` } `json:"icons"` TeamID string `json:"team_id"` } `json:"bot_profile"` } `json:"message"` }
SlackResponseChatPostMessage response object for slack chat postMessage endpoint response
type SlackResponseConversationsList ¶
type SlackResponseConversationsList struct { Ok bool `json:"ok"` Error string `json:"error,omitempty"` Channels []Channel `json:"channels"` ResponseMetadata struct { NextCursor string `json:"next_cursor"` } `json:"response_metadata"` }
SlackResponseConversationsList the list of Channel objects
type SlackResponseEventMessage ¶
type SlackResponseEventMessage struct { Channel string `json:"channel"` ClientMsgID string `json:"client_msg_id"` DisplayAsBot bool `json:"display_as_bot"` EventTs string `json:"event_ts"` Files []File `json:"files"` SourceTeam string `json:"source_team"` Team string `json:"team"` Text string `json:"text"` Ts string `json:"ts"` Type string `json:"type"` Upload bool `json:"upload"` User string `json:"user"` UserTeam string `json:"user_team"` Blocks []MessageBlock `json:"blocks"` }
SlackResponseEventMessage main event message object
type SlackResponseRTMConnect ¶
type SlackResponseRTMConnect struct { Ok bool `json:"ok"` URL string `json:"url"` Error string `json:"error"` Team Team `json:"team"` Self Self `json:"self"` }
SlackResponseRTMConnect need for decoding an rtm.connect endpoint response
type SlackResponseUsersList ¶
type SlackResponseUsersList struct { Ok bool `json:"ok"` Error string `json:"error,omitempty"` Members []SlackMember `json:"members"` CacheTs int `json:"cache_ts"` ResponseMetadata ResponseMetadata `json:"response_metadata"` }
SlackResponseUsersList response object from users.list