Documentation
¶
Index ¶
- Constants
- Variables
- type DiscordAlertClient
- func (c DiscordAlertClient) NewMessage() domain.DiscordMessage
- func (c *DiscordAlertClient) ReplaceContent(content string)
- func (c DiscordAlertClient) Send() error
- func (c DiscordAlertClient) SendMessage(msg domain.DiscordMessage) error
- func (c *DiscordAlertClient) SetMessage(Message domain.DiscordMessage)
- func (c *DiscordAlertClient) UpdateContent(content string)
- type SmtpClient
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)
Click to show internal directories.
Click to hide internal directories.