Versions in this module Expand all Collapse all v0 v0.0.1 Sep 7, 2025 Changes in this version + type EmailSender struct + func NewEmailSender(logger *glog.Logger, config ...EmailSenderCoreConfig) *EmailSender + func (s *EmailSender) Push(ctx context.Context, message Message) (err error) + func (s *EmailSender) Start(stopCtx context.Context) (err error) + type EmailSenderCore struct + func NewEmailSenderCore(config EmailSenderCoreConfig) *EmailSenderCore + func (s *EmailSenderCore) GetCurrentWeight() int + func (s *EmailSenderCore) GetName() string + func (s *EmailSenderCore) GetWeight() int + func (s *EmailSenderCore) Send(m ...*gomail.Message) error + func (s *EmailSenderCore) SetCurrentWeight(w int) + type EmailSenderCoreConfig struct + Host string + Name string + Password string + Port int + Username string + Weight int + type Message struct + Content string + Subject string + To []string + type Option func(*PushService) + func WithEmailSender(logger *glog.Logger, config ...EmailSenderCoreConfig) Option + func WithTgBotSender(logger *glog.Logger, config TgBotConfig) (Option, error) + type PushRequest struct + Message Message + Type PushType + type PushService struct + func NewPushService(opts ...Option) *PushService + func (ps *PushService) Push(ctx context.Context, req PushRequest) (err error) + func (ps *PushService) Start() (err error) + func (ps *PushService) Stop() + type PushType string + const PushTypeEmail + const PushTypeTgBot + type Sender interface + Push func(ctx context.Context, message Message) error + Start func(context.Context) error + type TgBotConfig struct + BotToken string + DefaultHandler bot.HandlerFunc + ProxyURL string + type TgBotSender struct + func NewTgBotSender(logger *glog.Logger, config TgBotConfig) (*TgBotSender, error) + func (s *TgBotSender) Push(ctx context.Context, message Message) (err error) + func (s *TgBotSender) Start(stopCtx context.Context) (err error)