common

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReciveBandwidth

func ReciveBandwidth(call Tgcalls, max, min C.Bwidth) (C.Bwidth, error)

recived as GB, max, min should be in byte format, return as GB,

func ReciveInt

func ReciveInt(call Tgcalls, max, min int) (int, error)

func ReciveString

func ReciveString(call Tgcalls) (string, error)

Types

type Alertsender

type Alertsender func(msg string)

type Callbackreciver

type Callbackreciver func(msg any, btns *botapi.Buttons) (*tgbotapi.CallbackQuery, error)

type Initer

type Initer interface {
	Init()
}

type OptionExcutors

type OptionExcutors struct {
	//Common
	Tgcalls
	Upx            *update.Updatectx
	Btns           *botapi.Buttons
	Usersession    *controller.CtrlSession
	MessageSession *botapi.Msgsession
	Ctrl           *controller.Controller
	Logger         *zap.Logger
}

type Sendreciver

type Sendreciver func(msg any) (*tgbotapi.Message, error) //sendreciver should support only recive mode (when msg == nil)

type Tgcalls

type Tgcalls struct {
	Callbackreciver Callbackreciver
	Sendreciver     Sendreciver
	Alertsender     Alertsender
}

Jump to

Keyboard shortcuts

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