Documentation ¶
Index ¶
- type TreeNode
- type UpdateParser
- func (up *UpdateParser) AddCallbackHandler(data string, handlerFun func(*objs.Update))
- func (up *UpdateParser) AddChatSharedHandler(requestId int, handler func(*objs.Update))
- func (up *UpdateParser) AddHandler(patern string, handlerFunc func(*objs.Update), chatType ...string) error
- func (u *UpdateParser) AddMiddleWare(middleware func(update *objs.Update, next func()))
- func (up *UpdateParser) AddUserSharedHandler(requestId int, handler func(*objs.Update))
- func (u *UpdateParser) ExecuteChain(up *objs.Update)
- func (u *UpdateParser) GetUpdateParserMiddleware(uc *chan *objs.Update, cu *chan *objs.ChatUpdate, cfg *configs.BotConfigs) func(up *objs.Update, next func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeNode ¶
type TreeNode struct {
// contains filtered or unexported fields
}
TreeNode is a special tree element containing handlers.
type UpdateParser ¶ added in v2.2.0
type UpdateParser struct {
// contains filtered or unexported fields
}
func CreateUpdateParser ¶ added in v2.2.0
func CreateUpdateParser(uc *chan *objs.Update, cu *chan *objs.ChatUpdate, cfg *configs.BotConfigs, botLogger *logger.BotLogger) *UpdateParser
func (*UpdateParser) AddCallbackHandler ¶ added in v2.2.0
func (up *UpdateParser) AddCallbackHandler(data string, handlerFun func(*objs.Update))
func (*UpdateParser) AddChatSharedHandler ¶ added in v2.2.0
func (up *UpdateParser) AddChatSharedHandler(requestId int, handler func(*objs.Update))
func (*UpdateParser) AddHandler ¶ added in v2.2.0
func (*UpdateParser) AddMiddleWare ¶ added in v2.2.0
func (u *UpdateParser) AddMiddleWare(middleware func(update *objs.Update, next func()))
func (*UpdateParser) AddUserSharedHandler ¶ added in v2.2.0
func (up *UpdateParser) AddUserSharedHandler(requestId int, handler func(*objs.Update))
func (*UpdateParser) ExecuteChain ¶ added in v2.2.0
func (u *UpdateParser) ExecuteChain(up *objs.Update)
ExecuteChain executes the chained middlewares
func (*UpdateParser) GetUpdateParserMiddleware ¶ added in v2.2.0
func (u *UpdateParser) GetUpdateParserMiddleware(uc *chan *objs.Update, cu *chan *objs.ChatUpdate, cfg *configs.BotConfigs) func(up *objs.Update, next func())
GetUpdateParserMiddleware returns a middleware that processes the given update object.
Click to show internal directories.
Click to hide internal directories.