parser

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commander

type Commander struct {
}

type Parser

type Parser struct {
	Callback      service.Service // special service
	Defaulsrv     *service.Defaultsrv
	AdminSrc      *service.Adminsrv
	InlineService *service.InlineService

	GetBaseCtx func() context.Context
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	ctrl *controller.Controller,
	services []service.Service,
	botapi botapi.BotAPI,
	logger *zap.Logger,

) *Parser

func (*Parser) Init

func (p *Parser) Init() error

func (*Parser) Parse

func (p *Parser) Parse(tgbotapimsg *tgbotapi.Update) error

func (*Parser) Readrequest

func (p *Parser) Readrequest(tgbotapimsg *tgbotapi.Update) (*update.Updatectx, error)

func (*Parser) Setuser

func (p *Parser) Setuser(upx *update.Updatectx) (bool, error)

func (*Parser) Stop

func (p *Parser) Stop() error

type Parserwrap

type Parserwrap interface {
	Parse(tgbotapimsg *tgbotapi.Update) error
	Init() error
	Stop() error
}

Jump to

Keyboard shortcuts

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