alert

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert interface {
	Notify(string) error
	GetDescription() string
	GetOptions() map[string]string
}

Alert the alert interface

func GetAlert

func GetAlert(name string, options map[string]string) (Alert, error)

GetAlert returns an alert instance

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command alert file struct

func NewAlertCommand

func NewAlertCommand(options map[string]string) (*Command, error)

NewAlertCommand creates a new script alert instance

func (*Command) GetDescription

func (a *Command) GetDescription() string

GetDescription returns a description for this alert

func (*Command) GetOptions

func (a *Command) GetOptions() map[string]string

GetOptions returns this alert options

func (*Command) Notify

func (a *Command) Notify(content string) error

Notify notifies

type Email

type Email struct {
	// contains filtered or unexported fields
}

Email alert file struct

func NewAlertEmail

func NewAlertEmail(options map[string]string) (*Email, error)

NewAlertEmail creates a new file alert instance

func (*Email) GetDescription

func (a *Email) GetDescription() string

GetDescription returns a description for this alert

func (*Email) GetOptions

func (a *Email) GetOptions() map[string]string

GetOptions returns this alert options

func (*Email) Notify

func (a *Email) Notify(content string) error

Notify notifies

type File

type File struct {
	// contains filtered or unexported fields
}

File alert file struct

func NewAlertFile

func NewAlertFile(options map[string]string) (*File, error)

NewAlertFile creates a new file alert instance

func (*File) GetDescription

func (a *File) GetDescription() string

GetDescription returns a description for this alert

func (*File) GetOptions

func (a *File) GetOptions() map[string]string

GetOptions returns this alert options

func (*File) Notify

func (a *File) Notify(content string) error

Notify notifies

type Script

type Script struct {
	// contains filtered or unexported fields
}

Script alert file struct

func NewAlertScript

func NewAlertScript(options map[string]string) (*Script, error)

NewAlertScript creates a new script alert instance

func (*Script) GetDescription

func (a *Script) GetDescription() string

GetDescription returns a description for this alert

func (*Script) GetOptions

func (a *Script) GetOptions() map[string]string

GetOptions returns this alert options

func (*Script) Notify

func (a *Script) Notify(content string) error

Notify notifies

type Webhook

type Webhook struct {
	// contains filtered or unexported fields
}

Webhook alert file struct

func NewAlertWebhook

func NewAlertWebhook(options map[string]string) (*Webhook, error)

NewAlertWebhook creates a new file alert instance

func (*Webhook) GetDescription

func (a *Webhook) GetDescription() string

GetDescription returns a description for this alert

func (*Webhook) GetOptions

func (a *Webhook) GetOptions() map[string]string

GetOptions returns this alert options

func (*Webhook) Notify

func (a *Webhook) Notify(content string) error

Notify notifies

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL