Documentation
¶
Index ¶
- type BotAddedToChat
- type BotRemovedFromChat
- type CallbackQuery
- type Chain
- type ChatType
- type CommandWordResolver
- type CommandWordResolverExactWord
- type Composite
- type EasyCommandSplit
- type EmptyPredefinedProcessor
- type Factory
- func (f Factory) AnyGroup(processor Processor) Processor
- func (f Factory) Api() *tgbotapi.BotAPI
- func (f Factory) CallbackQuery(processor Processor) CallbackQuery
- func (f Factory) Chain(processors ...Processor) Chain
- func (f Factory) Composite(processors ...Processor) Composite
- func (f Factory) EasyApi() *easy.EasyApi
- func (f *Factory) EmptyPredefined() Processor
- func (f Factory) LastMessageProcessor(processor Processor) Processor
- func (f Factory) LastMessageStorage() LastMessageStorage
- func (f Factory) Message(processor Processor) WithMessage
- func (f Factory) OneWordCommand(resolver CommandWordResolver, processor Processor) OneWordCommand
- func (f *Factory) PredefinedReply(replyMessage string) Processor
- func (f Factory) Private(processor Processor) Processor
- func (f Factory) SimpleCommand(command string, processor Processor) OneWordCommand
- func (f Factory) SimpleCommandMap(mapping map[string]Processor) SimpleCommandMap
- func (f *Factory) WithFileMimeType(mimeTpe string, processor Processor) Processor
- type LastMessageProcessor
- type LastMessageRepo
- type LastMessageStorage
- type OneWordCommand
- type PredefinedReplyProcessor
- type Private
- type Processor
- type ResolveResult
- type SimpleCommand
- type SimpleCommandCtx
- type SimpleCommandMap
- type WithFile
- type WithFileMimeTypes
- type WithMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotAddedToChat ¶
type BotAddedToChat struct {
// contains filtered or unexported fields
}
func NewBotAddedToChat ¶
func NewBotAddedToChat(proccessor Processor, bot *tgbotapi.BotAPI) *BotAddedToChat
type BotRemovedFromChat ¶
type BotRemovedFromChat struct {
// contains filtered or unexported fields
}
func NewBotRemovedFromChat ¶
func NewBotRemovedFromChat(proccessor Processor, bot *tgbotapi.BotAPI) *BotRemovedFromChat
type CallbackQuery ¶
type CallbackQuery struct {
// contains filtered or unexported fields
}
type ChatType ¶ added in v0.0.2
type ChatType struct {
// contains filtered or unexported fields
}
func NewAnyGroupChat ¶ added in v0.0.2
func NewChannelChat ¶ added in v0.0.2
func NewPrivateChat ¶ added in v0.0.2
type CommandWordResolver ¶
type CommandWordResolver interface {
Resolve(word string, ctx context.Context) ResolveResult
}
type CommandWordResolverExactWord ¶
type CommandWordResolverExactWord struct {
// contains filtered or unexported fields
}
func (CommandWordResolverExactWord) Resolve ¶
func (c CommandWordResolverExactWord) Resolve(word string, ctx context.Context) ResolveResult
type EasyCommandSplit ¶
type EasyCommandSplit struct{}
func (EasyCommandSplit) SplitByText ¶
func (e EasyCommandSplit) SplitByText(text string) (string, string)
type EmptyPredefinedProcessor ¶
type EmptyPredefinedProcessor struct { }
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory(api *tgbotapi.BotAPI, storage LastMessageStorage) *Factory
func (Factory) CallbackQuery ¶
func (f Factory) CallbackQuery(processor Processor) CallbackQuery
func (*Factory) EmptyPredefined ¶
func (Factory) LastMessageProcessor ¶
func (Factory) LastMessageStorage ¶
func (f Factory) LastMessageStorage() LastMessageStorage
func (Factory) Message ¶
func (f Factory) Message(processor Processor) WithMessage
func (Factory) OneWordCommand ¶
func (f Factory) OneWordCommand(resolver CommandWordResolver, processor Processor) OneWordCommand
func (*Factory) PredefinedReply ¶
func (Factory) SimpleCommand ¶
func (f Factory) SimpleCommand(command string, processor Processor) OneWordCommand
func (Factory) SimpleCommandMap ¶
func (f Factory) SimpleCommandMap(mapping map[string]Processor) SimpleCommandMap
type LastMessageProcessor ¶
type LastMessageProcessor struct {
// contains filtered or unexported fields
}
type LastMessageRepo ¶
type LastMessageRepo struct {
// contains filtered or unexported fields
}
func NewLastMessageRepo ¶
func NewLastMessageRepo() *LastMessageRepo
func (LastMessageRepo) GetByUpdate ¶
func (r LastMessageRepo) GetByUpdate(update *tgbotapi.Update) string
func (LastMessageRepo) StoreByUpdate ¶
func (r LastMessageRepo) StoreByUpdate(update *tgbotapi.Update, text string)
type LastMessageStorage ¶
type OneWordCommand ¶
type OneWordCommand struct {
// contains filtered or unexported fields
}
type PredefinedReplyProcessor ¶
type PredefinedReplyProcessor struct {
// contains filtered or unexported fields
}
func NewPredefinedReplyProcessor ¶
func NewPredefinedReplyProcessor(easyApi *easy.EasyApi, replyMessage string) *PredefinedReplyProcessor
type ResolveResult ¶
func NewResolverResultNok ¶
func NewResolverResultNok() ResolveResult
func NewResolverResultOk ¶
func NewResolverResultOk(ctx context.Context) ResolveResult
func NewResolverResultStop ¶
func NewResolverResultStop() ResolveResult
type SimpleCommand ¶
type SimpleCommand struct {
// contains filtered or unexported fields
}
type SimpleCommandCtx ¶
func (SimpleCommandCtx) Command ¶
func (s SimpleCommandCtx) Command() string
type SimpleCommandMap ¶
type WithFileMimeTypes ¶
type WithFileMimeTypes struct {
// contains filtered or unexported fields
}
type WithMessage ¶
type WithMessage struct {
// contains filtered or unexported fields
}
Source Files
¶
- BotAddedToChat.go
- BotRemovedFromChat.go
- CallbackQuery.go
- Chain.go
- ChatType.go
- Composite.go
- EasyCommandSplit.go
- EmptyPredefinedProcessor.go
- Factory.go
- LastMessageStorage.go
- OneWordCommand.go
- PredefinedReplyProcessor.go
- Private.go
- Processor.go
- SimpleCommand.go
- SimpleCommandMap.go
- WithFile.go
- WithFileMimeType.go
- WithMessage.go
Click to show internal directories.
Click to hide internal directories.