Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailSender ¶
type EmailSender struct {
// contains filtered or unexported fields
}
func NewEmailSender ¶
func NewEmailSender(logger *glog.Logger, config ...EmailSenderCoreConfig) *EmailSender
type EmailSenderCore ¶
type EmailSenderCore struct {
// contains filtered or unexported fields
}
func NewEmailSenderCore ¶
func NewEmailSenderCore(config EmailSenderCoreConfig) *EmailSenderCore
func (*EmailSenderCore) GetCurrentWeight ¶
func (s *EmailSenderCore) GetCurrentWeight() int
func (*EmailSenderCore) GetName ¶
func (s *EmailSenderCore) GetName() string
func (*EmailSenderCore) GetWeight ¶
func (s *EmailSenderCore) GetWeight() int
func (*EmailSenderCore) SetCurrentWeight ¶
func (s *EmailSenderCore) SetCurrentWeight(w int)
type EmailSenderCoreConfig ¶
type Option ¶
type Option func(*PushService)
func WithEmailSender ¶
func WithEmailSender(logger *glog.Logger, config ...EmailSenderCoreConfig) Option
func WithTgBotSender ¶
func WithTgBotSender(logger *glog.Logger, config TgBotConfig) (Option, error)
type PushRequest ¶
type PushService ¶
type PushService struct {
// contains filtered or unexported fields
}
func NewPushService ¶
func NewPushService(opts ...Option) *PushService
func (*PushService) Push ¶
func (ps *PushService) Push(ctx context.Context, req PushRequest) (err error)
func (*PushService) Start ¶
func (ps *PushService) Start() (err error)
func (*PushService) Stop ¶
func (ps *PushService) Stop()
type PushType ¶
type PushType string
const (
PushTypeEmail PushType = "Email"
)
const (
PushTypeTgBot PushType = "TgBot"
)
type TgBotConfig ¶
type TgBotConfig struct {
// tg bot token
BotToken string
// 自定义的 bot 自动回复
DefaultHandler bot.HandlerFunc
// https://github.com/go-telegram/bot/issues/140
// https://goframe.org/docs/web/http-client-proxy
// 代理地址,支持 http 和 socks5 两种形式,分别为 http://USER:PASSWORD@IP:PORT 或 socks5://USER:PASSWORD@IP:PORT 形式
ProxyURL string
}
type TgBotSender ¶
type TgBotSender struct {
// contains filtered or unexported fields
}
func NewTgBotSender ¶
func NewTgBotSender(logger *glog.Logger, config TgBotConfig) (*TgBotSender, error)
Click to show internal directories.
Click to hide internal directories.