commands

package
v0.0.0-...-eec2a5c Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(update tgbotapi.Update, bot *tgbotapi.BotAPI, grpcClient *backend.GrpcClient) error

Types

type AddReceiptCommand

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

func NewAddReceiptCommand

func NewAddReceiptCommand(provider *user.Provider, grpcClient *backend.GrpcClient) *AddReceiptCommand

func (AddReceiptCommand) Accepted

func (a AddReceiptCommand) Accepted(message string) bool

func (AddReceiptCommand) Execute

func (a AddReceiptCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error

Execute command

type Command

type Command interface {
	Accepted(message string) bool
	Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error
}

type ConfirmationCodeCommand

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

ConfirmationCodeCommand is phone verification command

func NewConfirmationCodeCommand

func NewConfirmationCodeCommand(provider *user.Provider, grpcClient *backend.GrpcClient) *ConfirmationCodeCommand

NewConfirmationCodeCommand creates ConfirmationCodeCommand

func (ConfirmationCodeCommand) Accepted

func (c ConfirmationCodeCommand) Accepted(message string) bool

func (ConfirmationCodeCommand) Execute

Execute command

type EmptyCommand

type EmptyCommand struct {
}

func (EmptyCommand) Accepted

func (e EmptyCommand) Accepted(message string) bool

func (EmptyCommand) Execute

func (e EmptyCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error

Execute command

type GetReceiptReportCommand

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

func NewGetReceiptReportCommand

func NewGetReceiptReportCommand(provider *user.Provider, grpcClient *backend.GrpcClient) *GetReceiptReportCommand

func (GetReceiptReportCommand) Accepted

func (g GetReceiptReportCommand) Accepted(message string) bool

func (GetReceiptReportCommand) Execute

func (g GetReceiptReportCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error

Execute command

type RegisterCommand

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

func NewRegisterCommand

func NewRegisterCommand(provider *user.Provider, grpcClient *backend.GrpcClient) *RegisterCommand

func (RegisterCommand) Accepted

func (r RegisterCommand) Accepted(message string) bool

func (RegisterCommand) Execute

func (r RegisterCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error

Execute command

type Registrar

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

func NewRegistrar

func NewRegistrar() *Registrar

func (*Registrar) Get

func (r *Registrar) Get(message string) *Command

func (*Registrar) Register

func (r *Registrar) Register(c Command)

func (*Registrar) RegisterDefault

func (r *Registrar) RegisterDefault(c Command)

type StartCommand

type StartCommand struct {
}

func (StartCommand) Accepted

func (s StartCommand) Accepted(message string) bool

func (StartCommand) Execute

func (s StartCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error

Execute command

type WrongCommand

type WrongCommand struct {
}

func (WrongCommand) Accepted

func (w WrongCommand) Accepted(_ string) bool

func (WrongCommand) Execute

func (w WrongCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) error

Execute command

Jump to

Keyboard shortcuts

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