Documentation ¶
Index ¶
- type CommandDescription
- type Help
- type LastMessage
- func (plg *LastMessage) Close() (err error)
- func (plg *LastMessage) Commands() []CommandDescription
- func (plg *LastMessage) HandleUpdate(_ context.Context, upd *tgbotapi.Update) (bool, error)
- func (plg *LastMessage) Init() (err error)
- func (plg *LastMessage) LastMessageID(chatID int64) int
- func (plg *LastMessage) Select(chatID int64, pred func(*tgbotapi.Message) bool) *tgbotapi.Message
- type Monitor
- type MsgChatID
- type MsgVote
- type NopPlugin
- type NotifierApp
- type NotifierStore
- type PlugIn
- type ShowVersion
- type TimezoneConverter
- type TimezoneConverterStore
- type VoteApp
- type VoteStore
- type WebApp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandDescription ¶
type Help ¶
type Help struct { NopPlugin Bot *tgbotapi.BotAPI Cmds []CommandDescription }
Help sends usage info
func (*Help) Commands ¶
func (plg *Help) Commands() []CommandDescription
type LastMessage ¶
type LastMessage struct {
// contains filtered or unexported fields
}
LastMessage tracks last message in chat
func (*LastMessage) Close ¶
func (plg *LastMessage) Close() (err error)
func (*LastMessage) Commands ¶
func (plg *LastMessage) Commands() []CommandDescription
func (*LastMessage) HandleUpdate ¶
func (*LastMessage) Init ¶
func (plg *LastMessage) Init() (err error)
func (*LastMessage) LastMessageID ¶
func (plg *LastMessage) LastMessageID(chatID int64) int
type Monitor ¶
type Monitor struct { NopPlugin Bot *tgbotapi.BotAPI Store storm.Node // contains filtered or unexported fields }
Monitor notifies subscribers on service update
func (*Monitor) Commands ¶
func (plg *Monitor) Commands() []CommandDescription
func (*Monitor) HandleUpdate ¶
type NopPlugin ¶
type NopPlugin struct{}
NopPlugin does nothing
func (*NopPlugin) Commands ¶
func (sapp *NopPlugin) Commands() []CommandDescription
func (*NopPlugin) HandleUpdate ¶
type NotifierApp ¶
type NotifierApp struct { Bot *tgbotapi.BotAPI Store *NotifierStore AppURL string }
func (*NotifierApp) Close ¶
func (sapp *NotifierApp) Close() error
func (*NotifierApp) Commands ¶
func (sapp *NotifierApp) Commands() []CommandDescription
func (*NotifierApp) HandleUpdate ¶
func (*NotifierApp) Init ¶
func (sapp *NotifierApp) Init() error
func (*NotifierApp) Routes ¶
func (sapp *NotifierApp) Routes() http.Handler
type NotifierStore ¶
type NotifierStore struct {
Bkt storm.Node
}
func (*NotifierStore) FindToken ¶
func (s *NotifierStore) FindToken(token string) int64
func (*NotifierStore) RemoveTokens ¶
func (s *NotifierStore) RemoveTokens(chatID int64, token string) (int, error)
type PlugIn ¶
type PlugIn interface { Init() error Commands() []CommandDescription HandleUpdate(ctx context.Context, upd *tgbotapi.Update) (caught bool, err error) Close() error }
PlugIn provides part of functionality for bot
type ShowVersion ¶
func (*ShowVersion) Commands ¶
func (plg *ShowVersion) Commands() []CommandDescription
func (*ShowVersion) HandleUpdate ¶
func (sapp *ShowVersion) HandleUpdate(ctx context.Context, upd *tgbotapi.Update) (caught bool, err error)
HandleUpdate processes event
type TimezoneConverter ¶
type TimezoneConverter struct { NopPlugin Store *TimezoneConverterStore Bot *tgbotapi.BotAPI // contains filtered or unexported fields }
TimezoneConverter ...
func (*TimezoneConverter) Commands ¶
func (tapp *TimezoneConverter) Commands() []CommandDescription
func (*TimezoneConverter) HandleUpdate ¶
func (*TimezoneConverter) Init ¶
func (tapp *TimezoneConverter) Init() (err error)
type TimezoneConverterStore ¶
type TimezoneConverterStore struct {
Bkt storm.Node
}
type VoteApp ¶
type VoteApp struct { NopPlugin Bot *tgbotapi.BotAPI Store *VoteStore Stat *LastMessage }
VoteApp sends vote form for particular messages in chats
Click to show internal directories.
Click to hide internal directories.