notification

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

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

func NewMail

func NewMail(params MailParams) Mail

func (Mail) Notify

func (t Mail) Notify(text string)

func (Mail) OnOrder

func (t Mail) OnOrder(order model.Order)

func (Mail) OrError

func (t Mail) OrError(err error)

type MailParams

type MailParams struct {
	SMTPServerPort    int
	SMTPServerAddress string

	To       string
	From     string
	Password string
}

type Notifier

type Notifier interface {
	Notify(string)
	OnOrder(order model.Order)
	OrError(err error)
}

type Telegram

type Telegram struct {
	ID        string
	Key       string
	ChannelID string
}

func NewTelegram

func NewTelegram(id string, key string, channel string) Telegram

func (Telegram) Notify

func (t Telegram) Notify(text string)

func (Telegram) OnOrder

func (t Telegram) OnOrder(order model.Order)

func (Telegram) OrError

func (t Telegram) OrError(err error)

Jump to

Keyboard shortcuts

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