Debian Codegraph @

block_context.go

raw symbols SCIP
1 package slackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/
2
3 // ContextBlock defines data that is used to display message context, which can
4 // include both images and text.
5 //
6 // More Information: https://api.slack.com/reference/messaging/blocks#context
7 type ContextBlockscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock# struct {
8 Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#Type. MessageBlockTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MessageBlockType# `json:"type"`
9 BlockIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#BlockID. string `json:"block_id,omitempty"`
10 ContextElementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#ContextElements. ContextElementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextElements# `json:"elements"`
11 }
12
13 // BlockType returns the type of the block
14 func (s ContextBlockscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#) BlockTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#BlockType().() MessageBlockTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MessageBlockType# {
15 return s.Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#Type.
16 }
17
18 type ContextElementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextElements# struct {
19 Elementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextElements#Elements. []MixedElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MixedElement#
20 }
21
22 // NewContextBlock returns a new instance of a context block
23 func NewContextBlockscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/NewContextBlock().(blockID string, mixedElements ...MixedElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MixedElement#) *ContextBlockscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock# {
24 elements := ContextElementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextElements#{
25 Elementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextElements#Elements.: mixedElements,
26 }
27 return &ContextBlockscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#{
28 Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#Type.: MBTContextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MBTContext.,
29 BlockIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#BlockID.: blockID,
30 ContextElementsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ContextBlock#ContextElements.: elements,
31 }
32 }