diff options
author | Wim <wim@42.be> | 2020-05-24 00:06:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 00:06:21 +0200 |
commit | 393f9e998b1b40aa59d3fb8794c3a73da38c3fb7 (patch) | |
tree | 2bc9b6e6abdbdc6d811b155997597bdae62bc7db /vendor/github.com/slack-go/slack/block_element.go | |
parent | ba0bfe70a8f07164e1341f4b094841acdad5c3a2 (diff) | |
download | matterbridge-msglm-393f9e998b1b40aa59d3fb8794c3a73da38c3fb7.tar.gz matterbridge-msglm-393f9e998b1b40aa59d3fb8794c3a73da38c3fb7.tar.bz2 matterbridge-msglm-393f9e998b1b40aa59d3fb8794c3a73da38c3fb7.zip |
Update dependencies / vendor (#1146)
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_element.go')
-rw-r--r-- | vendor/github.com/slack-go/slack/block_element.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/slack-go/slack/block_element.go b/vendor/github.com/slack-go/slack/block_element.go index 8460e957..50971bfa 100644 --- a/vendor/github.com/slack-go/slack/block_element.go +++ b/vendor/github.com/slack-go/slack/block_element.go @@ -3,6 +3,7 @@ package slack // https://api.slack.com/reference/messaging/block-elements const ( + METCheckboxGroups MessageElementType = "checkboxes" METImage MessageElementType = "image" METButton MessageElementType = "button" METOverflow MessageElementType = "overflow" @@ -363,6 +364,32 @@ func NewPlainTextInputBlockElement(placeholder *TextBlockObject, actionID string } } +// 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 +type CheckboxGroupsBlockElement struct { + Type MessageElementType `json:"type"` + ActionID string `json:"action_id"` + Options []*OptionBlockObject `json:"options"` + InitialOptions []*OptionBlockObject `json:"initial_options,omitempty"` + Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` +} + +// ElementType returns the type of the Element +func (c CheckboxGroupsBlockElement) ElementType() MessageElementType { + return c.Type +} + +// NewRadioButtonsBlockElement returns an instance of a radio block element +func NewCheckboxGroupsBlockElement(actionID string, options ...*OptionBlockObject) *CheckboxGroupsBlockElement { + return &CheckboxGroupsBlockElement{ + Type: METCheckboxGroups, + ActionID: actionID, + Options: options, + } +} + // RadioButtonsBlockElement defines an element which lets users choose one item // from a list of possible options. // |