Interfaces And Enums
This page documents the public Go API for interfaces and enums. Every constructor and method shown here is part of the fluent github.com/nicklambourne/slackblocks/go/v2 package.
AlertLevel
AlertLevel is a named Slack value. Severity levels supported by alert blocks. Untyped string constants such as "default" also convert to it.
type AlertLevel string
AlertLevelDefault
Neutral styling.
const AlertLevelDefault AlertLevel = "default"
Related types: AlertLevel.
AlertLevelError
Error styling.
const AlertLevelError AlertLevel = "error"
Related types: AlertLevel.
AlertLevelInfo
Informational styling.
const AlertLevelInfo AlertLevel = "info"
Related types: AlertLevel.
AlertLevelSuccess
Success styling.
const AlertLevelSuccess AlertLevel = "success"
Related types: AlertLevel.
AlertLevelWarning
Warning styling.
const AlertLevelWarning AlertLevel = "warning"
Related types: AlertLevel.
Block
Block is a layout block, or a component that expands to layout blocks, accepted by message, modal, App Home, attachment, and container block collections. Implemented by *AccordionBuilder, *AccordionSectionBuilder, *ActionsBlockBuilder, *AlertBlockBuilder, *CardBlockBuilder, *CarouselBlockBuilder, *ContainerBlockBuilder, *ContextActionsBlockBuilder, *ContextBlockBuilder, *DataTableBlockBuilder, *DataVisualizationBlockBuilder, *DividerBlockBuilder, *FileBlockBuilder, *HeaderBlockBuilder, *ImageBlockBuilder, *InputBlockBuilder, *MarkdownBlockBuilder, *PaginatorBuilder, *PlanBlockBuilder, *RichTextBlockBuilder, *SectionBlockBuilder, *TableBlockBuilder, *TaskCardBlockBuilder, and *VideoBlockBuilder.
type Block interface { /* unexported marker method: only slackblocks builders implement this interface */ }
ButtonStyle
ButtonStyle is a named Slack value. Visual emphasis for buttons and confirmation dialogs. Untyped string constants such as "primary" also convert to it.
type ButtonStyle string
ButtonStyleDanger
Red emphasis for destructive actions.
const ButtonStyleDanger ButtonStyle = "danger"
Related types: ButtonStyle.
ButtonStylePrimary
Green emphasis for the affirmative action.
const ButtonStylePrimary ButtonStyle = "primary"
Related types: ButtonStyle.
Chart
Chart is a pie, bar, area, or line chart that a data visualization block can display. Implemented by *AreaChartBuilder, *BarChartBuilder, *LineChartBuilder, and *PieChartBuilder.
type Chart interface { /* unexported marker method: only slackblocks builders implement this interface */ }
ColumnAlign
ColumnAlign is a named Slack value. Horizontal alignment for table columns. Untyped string constants such as "left" also convert to it.
type ColumnAlign string
ColumnAlignCenter
Center cell content.
const ColumnAlignCenter ColumnAlign = "center"
Related types: ColumnAlign.
ColumnAlignLeft
Align cell content to the left.
const ColumnAlignLeft ColumnAlign = "left"
Related types: ColumnAlign.
ColumnAlignRight
Align cell content to the right.
const ColumnAlignRight ColumnAlign = "right"
Related types: ColumnAlign.
ContainerWidth
ContainerWidth is a named Slack value. Widths supported by Slack container blocks. Untyped string constants such as "narrow" also convert to it.
type ContainerWidth string
ContainerWidthFull
The full available width.
const ContainerWidthFull ContainerWidth = "full"
Related types: ContainerWidth.
ContainerWidthNarrow
A compact container.
const ContainerWidthNarrow ContainerWidth = "narrow"
Related types: ContainerWidth.
ContainerWidthStandard
Slack's standard container width.
const ContainerWidthStandard ContainerWidth = "standard"
Related types: ContainerWidth.
ContainerWidthWide
A wide container.
const ContainerWidthWide ContainerWidth = "wide"
Related types: ContainerWidth.
ContextActionsElement
ContextActionsElement is feedback buttons or an icon button that can appear in a context actions block. Implemented by *FeedbackButtonsBuilder and *IconButtonBuilder.
type ContextActionsElement interface { /* unexported marker method: only slackblocks builders implement this interface */ }
ContextElement
ContextElement is an image element or text object that can appear in a context block. Implemented by *ImageElementBuilder, *MarkdownBuilder, and *PlainTextBuilder.
type ContextElement interface { /* unexported marker method: only slackblocks builders implement this interface */ }
DataTableCell
DataTableCell is raw text, a raw number, or a rich text block that can appear as a data table cell. Implemented by *RawNumberBuilder, *RawTextBuilder, and *RichTextBlockBuilder.
type DataTableCell interface { /* unexported marker method: only slackblocks builders implement this interface */ }
Element
Element is an interactive, visual, or input element that can appear in an actions block or as a section accessory. Implemented by *ButtonBuilder, *ChannelMultiSelectBuilder, *ChannelSelectBuilder, *CheckboxesBuilder, *ConversationMultiSelectBuilder, *ConversationSelectBuilder, *DatePickerBuilder, *DateTimePickerBuilder, *EmailInputBuilder, *ExternalMultiSelectBuilder, *ExternalSelectBuilder, *FeedbackButtonsBuilder, *FileInputBuilder, *IconButtonBuilder, *ImageElementBuilder, *NumberInputBuilder, *OverflowBuilder, *PlainTextInputBuilder, *RadioButtonsBuilder, *RichTextInputBuilder, *StaticMultiSelectBuilder, *StaticSelectBuilder, *TimePickerBuilder, *URLInputBuilder, *UserMultiSelectBuilder, *UserSelectBuilder, and *WorkflowButtonBuilder.
type Element interface { /* unexported marker method: only slackblocks builders implement this interface */ }
IconButtonIcon
IconButtonIcon is a named Slack value. Icons supported by icon buttons. Untyped string constants such as "trash" also convert to it.
type IconButtonIcon string
IconButtonIconTrash
A trash can, for delete actions.
const IconButtonIconTrash IconButtonIcon = "trash"
Related types: IconButtonIcon.
InputElement
InputElement is an element that can be placed in an input block. Implemented by *ChannelMultiSelectBuilder, *ChannelSelectBuilder, *CheckboxesBuilder, *ConversationMultiSelectBuilder, *ConversationSelectBuilder, *DatePickerBuilder, *DateTimePickerBuilder, *EmailInputBuilder, *ExternalMultiSelectBuilder, *ExternalSelectBuilder, *FileInputBuilder, *NumberInputBuilder, *PlainTextInputBuilder, *RadioButtonsBuilder, *RichTextInputBuilder, *StaticMultiSelectBuilder, *StaticSelectBuilder, *TimePickerBuilder, *URLInputBuilder, *UserMultiSelectBuilder, and *UserSelectBuilder.
type InputElement interface { Element; /* unexported marker method: only slackblocks builders implement this interface */ }
Related types: Element.
ResponseType
ResponseType is a named Slack value. Visibility of a slash-command or interaction response. Untyped string constants such as "in_channel" also convert to it.
type ResponseType string
ResponseTypeEphemeral
Visible only to the user who triggered the response.
const ResponseTypeEphemeral ResponseType = "ephemeral"
Related types: ResponseType.
ResponseTypeInChannel
Visible to everyone in the channel.
const ResponseTypeInChannel ResponseType = "in_channel"
Related types: ResponseType.
RichTextBlockElement
RichTextBlockElement is a section, list, preformatted block, or quote inside a rich text block. Implemented by *RichTextCodeBlockBuilder, *RichTextListBuilder, *RichTextQuoteBuilder, and *RichTextSectionBuilder.
type RichTextBlockElement interface { /* unexported marker method: only slackblocks builders implement this interface */ }
RichTextListStyle
RichTextListStyle is a named Slack value. Marker styles for rich text lists. Untyped string constants such as "bullet" also convert to it.
type RichTextListStyle string
RichTextListStyleBullet
An unordered, bulleted list.
const RichTextListStyleBullet RichTextListStyle = "bullet"
Related types: RichTextListStyle.
RichTextListStyleOrdered
A numbered list.
const RichTextListStyleOrdered RichTextListStyle = "ordered"
Related types: RichTextListStyle.
RichTextSectionElement
RichTextSectionElement is inline rich text: text, a link, an emoji, or a channel, user, or user group mention. Implemented by *RichTextBuilder, *RichTextChannelBuilder, *RichTextEmojiBuilder, *RichTextLinkBuilder, *RichTextUserBuilder, and *RichTextUserGroupBuilder.
type RichTextSectionElement interface { /* unexported marker method: only slackblocks builders implement this interface */ }
RichTextStyle
RichTextStyle sets formatting flags on inline rich text, such as RichTextStyle{"bold": true, "italic": false}. Text and links support bold, italic, strike, and code; mentions support bold, italic, strike, highlight, client_highlight, and unlink.
type RichTextStyle map[string]bool
TableCell
TableCell is raw text or a rich text block that can appear as a table block cell. Implemented by *RawTextBuilder and *RichTextBlockBuilder.
type TableCell interface { /* unexported marker method: only slackblocks builders implement this interface */ }
TaskStatus
TaskStatus is a named Slack value. States supported by task card blocks. Untyped string constants such as "pending" also convert to it.
type TaskStatus string
TaskStatusComplete
The task finished successfully.
const TaskStatusComplete TaskStatus = "complete"
Related types: TaskStatus.
TaskStatusError
The task failed.
const TaskStatusError TaskStatus = "error"
Related types: TaskStatus.
TaskStatusInProgress
The task is running.
const TaskStatusInProgress TaskStatus = "in_progress"
Related types: TaskStatus.
TaskStatusPending
The task has not started.
const TaskStatusPending TaskStatus = "pending"
Related types: TaskStatus.
TextObject
TextObject is a plain_text or mrkdwn text composition object. Implemented by *MarkdownBuilder and *PlainTextBuilder.
type TextObject interface { /* unexported marker method: only slackblocks builders implement this interface */ }