Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alerter ¶
type Alerter interface {
Alert(status probe.Status, category, serviceName, message, link, date string)
}
Alerter is the interface all alerters should implement.
type Attachment ¶
type Attachment struct { Color string `json:"color,omitempty"` Fields []AttachmentField `json:"fields,omitempty"` }
Attachment Payload for postmessage rest API
https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/
type AttachmentField ¶
type AttachmentField struct { Short bool `json:"short"` Title string `json:"title,omitempty"` Value string `json:"value,omitempty"` }
AttachmentField Payload for postmessage rest API
https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/
type Pushbullet ¶
type Pushbullet struct {
// contains filtered or unexported fields
}
Pushbullet alert container.
func NewPushbullet ¶
func NewPushbullet(token string) *Pushbullet
NewPushbullet returns a Pushbullet alerter from the private token available in the `account` page.
type Slack ¶
type Slack struct {
// contains filtered or unexported fields
}
Slack alert container.
type SlackPostMessage ¶
type SlackPostMessage struct { RoomID string `json:"roomId,omitempty"` Channel string `json:"channel,omitempty"` Text string `json:"text,omitempty"` ParseUrls bool `json:"parseUrls,omitempty"` Alias string `json:"alias,omitempty"` Emoji string `json:"emoji,omitempty"` Avatar string `json:"avatar,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
SlackPostMessage is the main model for sending messages
Click to show internal directories.
Click to hide internal directories.