summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/block_element.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_element.go')
-rw-r--r--vendor/github.com/slack-go/slack/block_element.go27
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.
//