Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Post ¶
func Post(url string, msg WebhookMessage) error
Post posts the given WebhookMessage to the given webhook URL.
Types ¶
type WebhookAttachment ¶
type WebhookAttachment struct {
Fallback string `json:"fallback"`
Color string `json:"color"`
Title string `json:"title"`
Text string `json:"text"`
Fields []WebhookField `json:"fields"`
MarkdownIn []string `json:"mrkdwn_in"`
ImageURL string `json:"image_url"`
}
A WebhookAttachment is an attachment for a Slack webhook message.
type WebhookField ¶
type WebhookField struct {
Title string `json:"title"`
Value string `json:"value"`
Short bool `json:"short"`
}
A WebhookField is a key-value field for a Slack webhook attachment.
type WebhookMessage ¶
type WebhookMessage struct {
Attachments []WebhookAttachment `json:"attachments"`
}
A WebhookMessage is a message sent to a Slack webhook URL.
Click to show internal directories.
Click to hide internal directories.