Help us shape the future of Go! Take the 2026 Go Developer Survey

alerts

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscordErrorColor   = 16711680
	DiscordSuccessColor = 65290

	ErrDiscordContentLengthTooLong = "the message length is greater then 2000 characters"
	ErrDiscordEmbedLenthTooLong    = "the message length is greater then 4096 characters"
)
View Source
const (
	EmailSubjectSuccess = "Backup Successful"
	EmailSubjectError   = "Backup Error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordBasicAlertClient added in v0.0.6

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

func NewDiscordBasicAlertClient added in v0.0.6

func NewDiscordBasicAlertClient(params domain.ConfigAlertDiscord) DiscordBasicAlertClient

func (DiscordBasicAlertClient) NewMessage added in v0.0.6

func (DiscordBasicAlertClient) SendPayload added in v0.0.6

func (c DiscordBasicAlertClient) SendPayload() error

func (*DiscordBasicAlertClient) SetContent added in v0.0.6

func (c *DiscordBasicAlertClient) SetContent(content string)

type DiscordEmbedBodyParams added in v0.0.6

type DiscordEmbedBodyParams struct {
	Title       string
	Description string
	Color       int
	TitleURL    string
}

type DiscordEmbedClient added in v0.0.6

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

func NewDiscordEmbedMessage added in v0.0.6

func NewDiscordEmbedMessage(config domain.ConfigAlertDiscord) DiscordEmbedClient

Generates a new Discord Embed Client

func (*DiscordEmbedClient) AppendFields added in v0.0.6

func (c *DiscordEmbedClient) AppendFields(params DiscordEmbedFieldParams)

func (DiscordEmbedClient) SendPayload added in v0.0.6

func (c DiscordEmbedClient) SendPayload() error

func (*DiscordEmbedClient) SetAuthor added in v0.0.6

func (c *DiscordEmbedClient) SetAuthor(Name, URL, IconUrl string)

A message can have multiple embeds, Generate a blank one

func (*DiscordEmbedClient) SetBody added in v0.0.6

func (c *DiscordEmbedClient) SetBody(params DiscordEmbedBodyParams)

func (*DiscordEmbedClient) SetFooter added in v0.0.6

func (c *DiscordEmbedClient) SetFooter(params DiscordEmbedFooterParams)

type DiscordEmbedFieldParams added in v0.0.6

type DiscordEmbedFieldParams struct {
	Name   string
	Value  string
	Inline bool
}

type DiscordEmbedFooterParams added in v0.0.6

type DiscordEmbedFooterParams struct {
	Text    string
	IconUrl 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