mirror of
https://github.com/stakater/Reloader.git
synced 2026-02-14 18:09:50 +00:00
Alert a webhook supporting service ( e.g, slack ) whenever reloader reloads workload on change
62 lines
2.1 KiB
Go
62 lines
2.1 KiB
Go
package alert
|
|
|
|
type WebhookMessage struct {
|
|
Username string `json:"username,omitempty"`
|
|
IconEmoji string `json:"icon_emoji,omitempty"`
|
|
IconURL string `json:"icon_url,omitempty"`
|
|
Channel string `json:"channel,omitempty"`
|
|
ThreadTimestamp string `json:"thread_ts,omitempty"`
|
|
Text string `json:"text,omitempty"`
|
|
Attachments []Attachment `json:"attachments,omitempty"`
|
|
Parse string `json:"parse,omitempty"`
|
|
ResponseType string `json:"response_type,omitempty"`
|
|
ReplaceOriginal bool `json:"replace_original,omitempty"`
|
|
DeleteOriginal bool `json:"delete_original,omitempty"`
|
|
ReplyBroadcast bool `json:"reply_broadcast,omitempty"`
|
|
}
|
|
|
|
type Attachment struct {
|
|
Color string `json:"color,omitempty"`
|
|
Fallback string `json:"fallback,omitempty"`
|
|
|
|
CallbackID string `json:"callback_id,omitempty"`
|
|
ID int `json:"id,omitempty"`
|
|
|
|
AuthorID string `json:"author_id,omitempty"`
|
|
AuthorName string `json:"author_name,omitempty"`
|
|
AuthorSubname string `json:"author_subname,omitempty"`
|
|
AuthorLink string `json:"author_link,omitempty"`
|
|
AuthorIcon string `json:"author_icon,omitempty"`
|
|
|
|
Title string `json:"title,omitempty"`
|
|
TitleLink string `json:"title_link,omitempty"`
|
|
Pretext string `json:"pretext,omitempty"`
|
|
Text string `json:"text,omitempty"`
|
|
|
|
ImageURL string `json:"image_url,omitempty"`
|
|
ThumbURL string `json:"thumb_url,omitempty"`
|
|
|
|
ServiceName string `json:"service_name,omitempty"`
|
|
ServiceIcon string `json:"service_icon,omitempty"`
|
|
FromURL string `json:"from_url,omitempty"`
|
|
OriginalURL string `json:"original_url,omitempty"`
|
|
|
|
MarkdownIn []string `json:"mrkdwn_in,omitempty"`
|
|
|
|
Footer string `json:"footer,omitempty"`
|
|
FooterIcon string `json:"footer_icon,omitempty"`
|
|
}
|
|
|
|
type Field struct {
|
|
Title string `json:"title"`
|
|
Value string `json:"value"`
|
|
Short bool `json:"short"`
|
|
}
|
|
|
|
type Action struct {
|
|
Type string `json:"type"`
|
|
Text string `json:"text"`
|
|
Url string `json:"url"`
|
|
Style string `json:"style"`
|
|
}
|