alerts

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailSubjectSuccess = "Backup Successful"
	EmailSubjectError   = "Backup Error"
)

Variables

View Source
var (
	ErrDiscordContentLengthTooLong = "the message length is greater then 2000 characters"
)

Functions

This section is empty.

Types

type DiscordAlertClient

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

func NewDiscordAlertClient

func NewDiscordAlertClient(Webhooks []string, Username string) DiscordAlertClient

func (DiscordAlertClient) NewMessage

func (c DiscordAlertClient) NewMessage() domain.DiscordMessage

func (*DiscordAlertClient) ReplaceContent

func (c *DiscordAlertClient) ReplaceContent(content string)

func (DiscordAlertClient) Send

func (c DiscordAlertClient) Send() error

func (DiscordAlertClient) SendMessage

func (c DiscordAlertClient) SendMessage(msg domain.DiscordMessage) error

func (*DiscordAlertClient) SetMessage

func (c *DiscordAlertClient) SetMessage(Message domain.DiscordMessage)

func (*DiscordAlertClient) UpdateContent

func (c *DiscordAlertClient) UpdateContent(content string)

type SmtpClient added in v0.0.3

type SmtpClient struct {
	Config domain.ConfigAlertEmail
	// contains filtered or unexported fields
}

func NewSmtpClient added in v0.0.3

func NewSmtpClient(config domain.ConfigAlertEmail) SmtpClient

func (SmtpClient) SendAlert added in v0.0.3

func (c SmtpClient) SendAlert() error

func (*SmtpClient) SetBody added in v0.0.3

func (c *SmtpClient) SetBody(value string)

func (*SmtpClient) SetSubject added in v0.0.3

func (c *SmtpClient) SetSubject(value string)

Jump to

Keyboard shortcuts

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