Documentation
¶
Overview ¶
Package slack holds slack integration clients and message definitions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
AuthorIcon string `json:"author_icon,omitempty"`
AuthorLink string `json:"author_link,omitempty"`
AuthorName string `json:"author_name,omitempty"`
Color string `json:"color"`
Fallback string `json:"fallback"`
Fields []*Field `json:"fields"`
MarkdownIn []string `json:"mrkdwn_in"`
ThumbURL string `json:"thumb_url"`
Text string `json:"text,omitempty"`
Timestamp int64 `json:"ts"`
Title string `json:"title"`
TitleLink string `json:"title_link,omitempty"`
}
Attachment is a Slack message attachment, defined at: https://api.slack.com/docs/message-attachments
type Client ¶
type Client struct {
WebhookURL string
}
Client is capable of posting a message to a Slack webhook
type Field ¶
type Field struct {
Short bool `json:"short"`
Title string `json:"title"`
Value string `json:"value"`
}
Field is a single item within an attachment, defined at: https://api.slack.com/docs/message-attachments
type Payload ¶
type Payload struct {
Username string `json:"username,omitempty"`
IconEmoji string `json:"icon_emoji,omitempty"`
UnfurlLinks bool `json:"unfurl_links,omitempty"`
UnfurlMedia bool `json:"unfurl_media,omitempty"`
Text string `json:"text,omitempty"`
Attachments []*Attachment `json:"attachments,omitempty"`
}
Payload is the wrapper for a Slack message, defined at: https://api.slack.com/docs/message-formatting
Click to show internal directories.
Click to hide internal directories.