Debian Codegraph @

attachments.go

raw symbols SCIP
1 package slackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/
2
3 import "encoding/jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/"
4
5 // AttachmentField contains information for an attachment field
6 // An Attachment can contain multiple of these
7 type AttachmentFieldscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentField# struct {
8 Titlescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentField#Title. string `json:"title"`
9 Valuescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentField#Value. string `json:"value"`
10 Shortscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentField#Short. bool `json:"short"`
11 }
12
13 // AttachmentAction is a button or menu to be included in the attachment. Required when
14 // using message buttons or menus and otherwise not useful. A maximum of 5 actions may be
15 // provided per attachment.
16 type AttachmentActionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction# struct {
17 Namescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Name. string `json:"name"` // Required.
18 Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Text. string `json:"text"` // Required.
19 Stylescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Style. string `json:"style,omitempty"` // Optional. Allowed values: "default", "primary", "danger".
20 Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Type. ActionTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ActionType# `json:"type"` // Required. Must be set to "button" or "select".
21 Valuescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Value. string `json:"value,omitempty"` // Optional.
22 DataSourcescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#DataSource. string `json:"data_source,omitempty"` // Optional.
23 MinQueryLengthscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#MinQueryLength. int `json:"min_query_length,omitempty"` // Optional. Default value is 1.
24 Optionsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Options. []AttachmentActionOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption# `json:"options,omitempty"` // Optional. Maximum of 100 options can be provided in each menu.
25 SelectedOptionsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#SelectedOptions. []AttachmentActionOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption# `json:"selected_options,omitempty"` // Optional. The first element of this array will be set as the pre-selected option for this menu.
26 OptionGroupsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#OptionGroups. []AttachmentActionOptionGroupscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOptionGroup# `json:"option_groups,omitempty"` // Optional.
27 Confirmscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Confirm. *ConfirmationFieldscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ConfirmationField# `json:"confirm,omitempty"` // Optional.
28 URLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#URL. string `json:"url,omitempty"` // Optional.
29 }
30
31 // actionType returns the type of the action
32 func (a AttachmentActionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#) actionTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#actionType().() ActionTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ActionType# {
33 return a.Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction#Type.
34 }
35
36 // AttachmentActionOption the individual option to appear in action menu.
37 type AttachmentActionOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption# struct {
38 Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption#Text. string `json:"text"` // Required.
39 Valuescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption#Value. string `json:"value"` // Required.
40 Descriptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption#Description. string `json:"description,omitempty"` // Optional. Up to 30 characters.
41 }
42
43 // AttachmentActionOptionGroup is a semi-hierarchal way to list available options to appear in action menu.
44 type AttachmentActionOptionGroupscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOptionGroup# struct {
45 Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOptionGroup#Text. string `json:"text"` // Required.
46 Optionsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOptionGroup#Options. []AttachmentActionOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionOption# `json:"options"` // Required.
47 }
48
49 // AttachmentActionCallback is sent from Slack when a user clicks a button in an interactive message (aka AttachmentAction)
50 // DEPRECATED: use InteractionCallback
51 type AttachmentActionCallbackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentActionCallback# InteractionCallbackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InteractionCallback#
52
53 // ConfirmationField are used to ask users to confirm actions
54 type ConfirmationFieldscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ConfirmationField# struct {
55 Titlescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ConfirmationField#Title. string `json:"title,omitempty"` // Optional.
56 Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ConfirmationField#Text. string `json:"text"` // Required.
57 OkTextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ConfirmationField#OkText. string `json:"ok_text,omitempty"` // Optional. Defaults to "Okay"
58 DismissTextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ConfirmationField#DismissText. string `json:"dismiss_text,omitempty"` // Optional. Defaults to "Cancel"
59 }
60
61 // Attachment contains all the information for an attachment
62 type Attachmentscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment# struct {
63 Colorscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Color. string `json:"color,omitempty"`
64 Fallbackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Fallback. string `json:"fallback,omitempty"`
65
66 CallbackIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#CallbackID. string `json:"callback_id,omitempty"`
67 IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#ID. int `json:"id,omitempty"`
68
69 AuthorIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#AuthorID. string `json:"author_id,omitempty"`
70 AuthorNamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#AuthorName. string `json:"author_name,omitempty"`
71 AuthorSubnamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#AuthorSubname. string `json:"author_subname,omitempty"`
72 AuthorLinkscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#AuthorLink. string `json:"author_link,omitempty"`
73 AuthorIconscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#AuthorIcon. string `json:"author_icon,omitempty"`
74
75 Titlescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Title. string `json:"title,omitempty"`
76 TitleLinkscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#TitleLink. string `json:"title_link,omitempty"`
77 Pretextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Pretext. string `json:"pretext,omitempty"`
78 Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Text. string `json:"text,omitempty"`
79
80 ImageURLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#ImageURL. string `json:"image_url,omitempty"`
81 ThumbURLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#ThumbURL. string `json:"thumb_url,omitempty"`
82
83 ServiceNamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#ServiceName. string `json:"service_name,omitempty"`
84 ServiceIconscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#ServiceIcon. string `json:"service_icon,omitempty"`
85 FromURLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#FromURL. string `json:"from_url,omitempty"`
86 OriginalURLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#OriginalURL. string `json:"original_url,omitempty"`
87
88 Fieldsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Fields. []AttachmentFieldscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentField# `json:"fields,omitempty"`
89 Actionsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Actions. []AttachmentActionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/AttachmentAction# `json:"actions,omitempty"`
90 MarkdownInscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#MarkdownIn. []string `json:"mrkdwn_in,omitempty"`
91
92 Blocksscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Blocks. Blocksscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Blocks# `json:"blocks,omitempty"`
93
94 Footerscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Footer. string `json:"footer,omitempty"`
95 FooterIconscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#FooterIcon. string `json:"footer_icon,omitempty"`
96
97 Tsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment#Ts. jsonscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/.Numberscip-go gomod github.com/golang/go/src go1.16 `encoding/json`/Number# `json:"ts,omitempty"`
98 }