alerter

package
v0.0.0-...-fcfa923 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmailAlerter

func NewEmailAlerter() *emailAlert

NewEmailAlerter returns email alert

func NewTelegramAlerter

func NewTelegramAlerter() *telegramAlert

NewTelegramAlerter returns telegram alerter

func SendEmailAlert

func SendEmailAlert(msg string, cfg *config.Config) error

SendEmailAlert sends alert to email account by checking user's choice

func SendTelegramAlert

func SendTelegramAlert(msg string, cfg *config.Config) error

SendTelegramAlert sends the alert to telegram account check's alert setting before sending the alert

Types

type Email

type Email interface {
	SendEmail(msg, token, toEmail string) error
}

Email to send mail alert

type Telegram

type Telegram interface {
	SendTelegramMessage(msgText, botToken string, chatID int64) error
}

Telegram to send telegram alert interface

Jump to

Keyboard shortcuts

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