parser

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 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

type UpdateParser struct {
	// contains filtered or unexported fields
}

func CreateUpdateParser

func CreateUpdateParser(uc *chan *objs.Update, cu *chan *objs.ChatUpdate, cfg *configs.BotConfigs, botLogger *logger.BotLogger) *UpdateParser

func (*UpdateParser) AddCallbackHandler

func (up *UpdateParser) AddCallbackHandler(data string, handlerFun func(*objs.Update))

func (*UpdateParser) AddChatSharedHandler

func (up *UpdateParser) AddChatSharedHandler(requestId int, handler func(*objs.Update))

func (*UpdateParser) AddHandler

func (up *UpdateParser) AddHandler(patern string, handlerFunc func(*objs.Update), chatType ...string) error

func (*UpdateParser) AddMiddleWare

func (u *UpdateParser) AddMiddleWare(middleware func(update *objs.Update, next func()))

func (*UpdateParser) AddUserSharedHandler

func (up *UpdateParser) AddUserSharedHandler(requestId int, handler func(*objs.Update))

func (*UpdateParser) ExecuteChain

func (u *UpdateParser) ExecuteChain(up *objs.Update)

ExecuteChain executes the chained middlewares

func (*UpdateParser) GetUpdateParserMiddleware

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