Documentation ¶
Index ¶
Constants ¶
View Source
const ( OpBotNew = "bot: new ->" OpBotSend = "bot: send ->" )
View Source
const ( OpUnmarshalMessage = "telegram sub: unmarshal message ->" OpPrepareMessage = "telegram sub: prepare message ->" OpUnmarshalArticles = "telegram sub: unmarshal articles ->" OpFindSite = "telegram sub: find site ->" OpFindChats = "telegram sub: find chats ->" OpProcessor = "telegram sub: processor ->" )
View Source
const OpMessageToChattableList = "message: to chattable list ->"
View Source
const (
PluginName = "telegram"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
type PollerConfig ¶
type PollerConfig struct { OnlyOwner bool `mapstructure:"only_owner"` Buffer int `mapstructure:"buffer"` Limit int `mapstructure:"limit"` Timeout time.Duration `mapstructure:"timeout"` AllowedUpdates []string `mapstructure:"allowed_updates"` }
func (*PollerConfig) Init ¶
func (cfg *PollerConfig) Init()
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber( bot *Bot, sub common.Sub, siteRepo repository.ReadRepository[*entity.Site], chatRepo repository.ReadRepository[*entity.Chat], logger *slog.Logger, ) *Subscriber
func (*Subscriber) Run ¶
func (s *Subscriber) Run(done <-chan struct{})
Click to show internal directories.
Click to hide internal directories.