notification

package
v0.0.0-...-611ee02 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Email    = "email"
	Slack    = "slack"
	Telegram = "telegram"
	Discord  = "discord"
	Pushover = "pushover"
)
View Source
const ReqURL = "https://api.pushover.net/1/messages.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordNotification

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

func (*DiscordNotification) Send

func (n *DiscordNotification) Send(domain, currentIP string) error

type EmailNotification

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

func (*EmailNotification) Send

func (n *EmailNotification) Send(domain, currentIP string) error

type INotification

type INotification interface {
	Send(domain, currentIP string) error
}

func NewDiscordNotification

func NewDiscordNotification(conf *settings.Settings) INotification

func NewEmailNotification

func NewEmailNotification(conf *settings.Settings) INotification

func NewPushoverNotification

func NewPushoverNotification(conf *settings.Settings) INotification

func NewSlackNotification

func NewSlackNotification(conf *settings.Settings) INotification

func NewTelegramNotification

func NewTelegramNotification(conf *settings.Settings) INotification

type INotificationManager

type INotificationManager interface {
	Send(string, string)
}

func GetNotificationManager

func GetNotificationManager(conf *settings.Settings) INotificationManager

type PushoverNotification

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

func (*PushoverNotification) Send

func (n *PushoverNotification) Send(domain, currentIP string) error

type SlackNotification

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

func (*SlackNotification) Send

func (n *SlackNotification) Send(domain, currentIP string) error

type TelegramNotification

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

func (*TelegramNotification) Send

func (n *TelegramNotification) Send(domain, currentIP string) error

Jump to

Keyboard shortcuts

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