slackkit

package
v0.2.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Type BlockType `json:"type"`
	Text *Text     `json:"text,omitempty"`
}

func NewHeader

func NewHeader(text string, emoji bool) Block

type BlockType

type BlockType string
const (
	Header  BlockType = "header"
	Divider BlockType = "divider"
	Section BlockType = "section"
)

type Notification

type Notification struct {
	Blocks []Block `json:"blocks"`
}

func NewNotification

func NewNotification(blocks ...Block) (*Notification, error)

type Style

type Style struct {
	Bold   *bool `json:"bold,omitempty"`
	Italic *bool `json:"italic,omitempty"`
	Strike *bool `json:"strike,omitempty"`
}

type Text

type Text struct {
	Type  TextType `json:"type"`
	Text  string   `json:"text"`
	Emoji *bool    `json:"emoji,omitempty"`
	Style *Style   `json:"style,omitempty"`
}

type TextType

type TextType string
const (
	PlainText TextType = "plain_text"
	Markdown  TextType = "mrkdwn"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL