Documentation ¶
Index ¶
- func NewConsoleService(stdout io.Writer) *consoleService
- type BasicAuth
- type Destination
- type EmailOptions
- type GrafanaAnnotation
- type GrafanaOptions
- type Header
- type Notification
- type NotificationService
- func NewEmailService(opts EmailOptions) NotificationService
- func NewGrafanaService(opts GrafanaOptions) NotificationService
- func NewOpsgenieService(opts OpsgenieOptions) NotificationService
- func NewService(serviceType string, optsData []byte) (NotificationService, error)
- func NewSlackService(opts SlackOptions) NotificationService
- func NewTelegramService(opts TelegramOptions) NotificationService
- func NewWebhookService(opts WebhookOptions) NotificationService
- type OpsgenieOptions
- type SlackNotification
- type SlackOptions
- type TelegramOptions
- type WebhookNotification
- type WebhookOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsoleService ¶
Types ¶
type Destination ¶
Destination holds notification destination details
type EmailOptions ¶
type GrafanaAnnotation ¶
type GrafanaOptions ¶
type Notification ¶
type Notification struct { Title string `json:"title,omitempty"` Body string `json:"body,omitempty"` Slack *SlackNotification `json:"slack,omitempty"` Webhook map[string]WebhookNotification `json:"webhook,omitempty" patchStrategy:"replace"` }
func (*Notification) Preview ¶
func (n *Notification) Preview() string
type NotificationService ¶
type NotificationService interface {
Send(notification Notification, dest Destination) error
}
NotificationService defines notification service interface
func NewEmailService ¶
func NewEmailService(opts EmailOptions) NotificationService
func NewGrafanaService ¶
func NewGrafanaService(opts GrafanaOptions) NotificationService
func NewOpsgenieService ¶
func NewOpsgenieService(opts OpsgenieOptions) NotificationService
func NewService ¶
func NewService(serviceType string, optsData []byte) (NotificationService, error)
func NewSlackService ¶
func NewSlackService(opts SlackOptions) NotificationService
func NewTelegramService ¶
func NewTelegramService(opts TelegramOptions) NotificationService
func NewWebhookService ¶
func NewWebhookService(opts WebhookOptions) NotificationService
type OpsgenieOptions ¶
type SlackNotification ¶
type SlackOptions ¶
type TelegramOptions ¶
type TelegramOptions struct {
Token string `json:"token"`
}
type WebhookNotification ¶
type WebhookOptions ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.