parser

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (up *UpdateParser) AddHandler(patern string, handlerFunc func(*objs.Update), chatType ...string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL