Documentation
¶
Overview ¶
Package notification provides implementations for various notification services
Index ¶
- func NewTelegram(controller *order.Controller, settings *core.Settings, log core.Logger, ...) (core.NotifierWithStart, error)
- type Mail
- type MailParams
- type Option
- type Telegram
- func (t *Telegram) BalanceHandle(m *tb.Message)
- func (t *Telegram) BuyHandle(m *tb.Message)
- func (t *Telegram) HelpHandle(m *tb.Message)
- func (t *Telegram) Notify(text string)
- func (t *Telegram) OnError(err error)
- func (t *Telegram) OnOrder(order core.Order)
- func (t *Telegram) ProfitHandle(m *tb.Message)
- func (t *Telegram) SellHandle(m *tb.Message)
- func (t *Telegram) Start()
- func (t *Telegram) StartHandle(m *tb.Message)
- func (t *Telegram) StatusHandle(m *tb.Message)
- func (t *Telegram) StopHandle(m *tb.Message)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTelegram ¶
func NewTelegram(controller *order.Controller, settings *core.Settings, log core.Logger, options ...Option) ( core.NotifierWithStart, error, )
NewTelegram creates and initializes a new Telegram service
Types ¶
type Mail ¶
type Mail struct {
// contains filtered or unexported fields
}
Mail handles email notifications for the application
func NewMail ¶
func NewMail(params MailParams, log core.Logger) Mail
NewMail creates a new Mail instance with the provided parameters
type MailParams ¶
type MailParams struct {
SMTPServerPort int
SMTPServerAddress string
To string
From string
Password string
}
MailParams contains all parameters needed to initialize a Mail instance
type Option ¶
type Option func(telegram *Telegram)
Option is a function that configures a telegram instance
type Telegram ¶
type Telegram struct {
// contains filtered or unexported fields
}
Telegram implements the core.NotifierWithStart interface
func (*Telegram) BalanceHandle ¶
BalanceHandle shows the balance of all assets
func (*Telegram) HelpHandle ¶
HelpHandle displays available commands
func (*Telegram) ProfitHandle ¶
ProfitHandle shows trading results
func (*Telegram) SellHandle ¶
SellHandle processes sell commands
func (*Telegram) Start ¶
func (t *Telegram) Start()
Start begins the Telegram bot and notifies all authorized users
func (*Telegram) StartHandle ¶
StartHandle starts the bot operation
func (*Telegram) StatusHandle ¶
StatusHandle displays the current bot status
func (*Telegram) StopHandle ¶
StopHandle stops the bot operation