menu

package
v0.0.0-...-38f52fd Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainLevel = iota
	ModLevel
	RelayLevel
)

Variables

This section is empty.

Functions

This section is empty.

Types

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

MainMenu Main menu struct

func NewMainMenu

func NewMainMenu(log *utils.Log, ath *auth.Authorization) *MainMenu

NewMainMenu make new struct

func (m *MainMenu) SendError(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string)

SendError Send error tg message

func (m *MainMenu) SendMessage(bot *tgbotapi.BotAPI, text string, message *tgbotapi.Message) bool

SendMessage sends message with buttons to user

func (m *MainMenu) UpdateMessage(message *tgbotapi.Message, bot *tgbotapi.BotAPI, menu *MenuLevel) bool

UpdateMessage update telegram message

type MenuLevel struct {
	// contains filtered or unexported fields
}
func (m *MenuLevel) Building() string
func (m *MenuLevel) Device() string
func (m *MenuLevel) Level() int
func (m *MenuLevel) SetBuilding(building string)
func (m *MenuLevel) SetDevice(device string)
func (m *MenuLevel) SetLevel(level int)

type ModMenu

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

ModMenu Main menu struct

func NewModMenu

func NewModMenu(log *utils.Log, ath *auth.Authorization) *ModMenu

NewModMenu make new struct

func (*ModMenu) SendError

func (m *ModMenu) SendError(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string)

SendError Send error tg message

func (*ModMenu) SendMessage

func (m *ModMenu) SendMessage(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string, mn *MenuLevel) bool

SendMessage sends message with buttons to user

func (*ModMenu) UpdateMessage

func (m *ModMenu) UpdateMessage(message *tgbotapi.Message, bot *tgbotapi.BotAPI, menu *MenuLevel) bool

UpdateMessage update telegram message

type RelayMenu

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

RelayMenu Main menu struct

func NewRelayMenu

func NewRelayMenu(log *utils.Log, ath *auth.Authorization) *RelayMenu

NewRelayMenu make new struct

func (*RelayMenu) SendError

func (r *RelayMenu) SendError(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string) bool

SendError Send error tg message

func (*RelayMenu) SendMessage

func (r *RelayMenu) SendMessage(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string, mn *MenuLevel) bool

SendMessage sends message with buttons to user

func (*RelayMenu) UpdateMessage

func (r *RelayMenu) UpdateMessage(message *tgbotapi.Message, bot *tgbotapi.BotAPI, menu *MenuLevel) bool

UpdateMessage update telegram message

type RelaySingleMenu

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

RelaySingleMenu Main menu struct

func NewRelaySingleMenu

func NewRelaySingleMenu(log *utils.Log, ath *auth.Authorization) *RelaySingleMenu

NewRelaySingleMenu make new struct

func (*RelaySingleMenu) SendError

func (r *RelaySingleMenu) SendError(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string)

SendError Send error tg message

func (*RelaySingleMenu) SendMessage

func (r *RelaySingleMenu) SendMessage(bot *tgbotapi.BotAPI, message *tgbotapi.Message, text string, mn *MenuLevel) bool

SendMessage sends message with buttons to user

func (*RelaySingleMenu) UpdateMessage

func (r *RelaySingleMenu) UpdateMessage(message *tgbotapi.Message, bot *tgbotapi.BotAPI, menu *MenuLevel) bool

UpdateMessage update telegram message

Jump to

Keyboard shortcuts

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