summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/block_file.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-03-28 23:50:47 +0100
committerGitHub <noreply@github.com>2020-03-28 23:50:47 +0100
commit092ca1cd678c44fa078bba11d4d219e61498342a (patch)
tree33be668a72610bfa9825817eb84017fdad8b362a /vendor/github.com/slack-go/slack/block_file.go
parent0df253964123537b91e5a7364c83cc52f0e88df4 (diff)
downloadmatterbridge-msglm-092ca1cd678c44fa078bba11d4d219e61498342a.tar.gz
matterbridge-msglm-092ca1cd678c44fa078bba11d4d219e61498342a.tar.bz2
matterbridge-msglm-092ca1cd678c44fa078bba11d4d219e61498342a.zip
Update vendor slack-go/slack (#1068)
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_file.go')
-rw-r--r--vendor/github.com/slack-go/slack/block_file.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/github.com/slack-go/slack/block_file.go b/vendor/github.com/slack-go/slack/block_file.go
new file mode 100644
index 00000000..ac4453f7
--- /dev/null
+++ b/vendor/github.com/slack-go/slack/block_file.go
@@ -0,0 +1,26 @@
+package slack
+
+// FileBlock defines data that is used to display a remote file.
+//
+// More Information: https://api.slack.com/reference/block-kit/blocks#file
+type FileBlock struct {
+ Type MessageBlockType `json:"type"`
+ BlockID string `json:"block_id,omitempty"`
+ ExternalID string `json:"external_id"`
+ Source string `json:"source"`
+}
+
+// BlockType returns the type of the block
+func (s FileBlock) BlockType() MessageBlockType {
+ return s.Type
+}
+
+// NewFileBlock returns a new instance of a file block
+func NewFileBlock(blockID string, externalID string, source string) *FileBlock {
+ return &FileBlock{
+ Type: MBTFile,
+ BlockID: blockID,
+ ExternalID: externalID,
+ Source: source,
+ }
+}