Documentation ¶
Overview ¶
Package notify provides experimental support for notifications providers.
Tracking issue: https://github.com/ubclaunchpad/inertia/issues/194
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color string
Color is used to represent message color for different states (i.e success, fail)
type MessageArray ¶
type MessageArray struct {
Attachments []Message `json:"attachments"`
}
MessageArray builds the json message to be posted to webhook
type Notifier ¶
Notifier manages notifications
func NewSlackNotifier ¶
NewSlackNotifier creates a notifier with web hook url to slack channel. Passing it an empty url makes it a no-op notifier.
type Notifiers ¶
type Notifiers []Notifier
Notifiers is a collection of notification targets
type Options ¶
type Options struct {
Color Color
}
Options is used to configure formatting of notifications
type SlackNotifier ¶
type SlackNotifier struct {
// contains filtered or unexported fields
}
SlackNotifier represents slack notifications
func (*SlackNotifier) IsEqual ¶
func (n *SlackNotifier) IsEqual(nt Notifier) bool
IsEqual implements Notifier by checking the provided notifier is a slack notifier and if it has the same hook URL