notifiers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogNotifier

func NewLogNotifier(log logger.Logger) (*logNotifier, error)

NewLogNotifier creates a new log notifier instance

func NewPushoverNotifier

func NewPushoverNotifier(url string, token string, userKey string) *pushoverNotifier

NewPushoverNotifier will create a new Pushover notifier

func NewSlackNotifier added in v1.1.0

func NewSlackNotifier(url string, secret string) *slackNotifier

NewSlackNotifier will create a new Slack notifier

func NewSmtpNotifier

func NewSmtpNotifier(args ArgsSmtpNotifier) *smtpNotifier

NewSmtpNotifier creates a new SMTP email notifier

func NewTelegramNotifier

func NewTelegramNotifier(url string, token string, chatID string) *telegramNotifier

NewTelegramNotifier will create a new Telegram notifier

Types

type ArgsSmtpNotifier

type ArgsSmtpNotifier struct {
	To       string
	SmtpPort int
	SmtpHost string
	From     string
	Password string
}

ArgsSmtpNotifier represents the SMTP notifier arguments used in the constructor function

type HTTPClientWrapper

type HTTPClientWrapper interface {
	GetHTTP(ctx context.Context, endpoint string) ([]byte, int, error)
	PostHTTP(ctx context.Context, endpoint string, data []byte) ([]byte, int, error)
	IsInterfaceNil() bool
}

HTTPClientWrapper defines what an HTTP client wrapper should implement

Jump to

Keyboard shortcuts

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