users

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INCOME_TX = iota
	OUTGO_TX
	BLOCKS
	OTHER
)
View Source
const (
	CT_SIGNA currencyType = iota
	CT_USD
	CT_BTC
)
View Source
const (
	NIL_STATE stateType = iota
	ADD_STATE
	DEL_STATE
	CALC_TIB_STATE
	CALC_COMMIT_STATE
	CROSSING_STATE
	FAUCET_STATE
	CONVERT_STATE
	THRESHOLD_STATE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BotMessage added in v0.9.2

type BotMessage struct {
	MessageID int // for edit existing message

	MainText string
	MainMenu interface{}

	InlineText     string
	InlineKeyboard interface{}

	Chart []byte
}

type Manager

type Manager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func InitManager

func InitManager(logger *zap.SugaredLogger, db *gorm.DB, geckoClient *geckoapi.GeckoClient, signumClient *signumapi.SignumApiClient, priceManager *prices.PriceManager, networkInfoListener *networkinfo.NetworkInfoListener, wg *sync.WaitGroup, shutdownChannel chan interface{}) *Manager

func (*Manager) GetUserByChatIdFromUpdate

func (um *Manager) GetUserByChatIdFromUpdate(update *tgbotapi.Update) *User

type User

type User struct {
	*models.DbUser
	sync.Mutex
	// contains filtered or unexported fields
}

func (*User) GetAccountKeyboard

func (user *User) GetAccountKeyboard(account string) *tgbotapi.InlineKeyboardMarkup

func (*User) GetCalcKeyboard added in v1.1.6

func (user *User) GetCalcKeyboard() *tgbotapi.InlineKeyboardMarkup

func (*User) GetConvertKeyboard added in v1.2.0

func (user *User) GetConvertKeyboard() *tgbotapi.InlineKeyboardMarkup

func (*User) GetDbAccount

func (user *User) GetDbAccount(reqAccount string) *models.DbAccount

func (*User) GetMainMenu

func (user *User) GetMainMenu() *tgbotapi.ReplyKeyboardMarkup

func (*User) GetNetworkChartKeyboard

func (user *User) GetNetworkChartKeyboard() *tgbotapi.InlineKeyboardMarkup

func (*User) GetPriceChartKeyboard

func (user *User) GetPriceChartKeyboard() *tgbotapi.InlineKeyboardMarkup

func (*User) ProcessAdd

func (user *User) ProcessAdd(message string) string

func (*User) ProcessCalc

func (user *User) ProcessCalc(message string) *BotMessage

func (*User) ProcessCallback

func (user *User) ProcessCallback(callbackQuery *tgbotapi.CallbackQuery) *BotMessage

func (*User) ProcessConvert added in v1.2.0

func (user *User) ProcessConvert(message string) *BotMessage

func (*User) ProcessCrossing

func (user *User) ProcessCrossing() string

func (*User) ProcessDel

func (user *User) ProcessDel(message string) string

func (*User) ProcessFaucet

func (user *User) ProcessFaucet(message string) string

func (*User) ProcessMessage

func (user *User) ProcessMessage(message string) *BotMessage

func (*User) ProcessThreshold added in v1.9.0

func (user *User) ProcessThreshold(message string) *BotMessage

func (*User) ResetState

func (user *User) ResetState()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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