ui

package
v0.230724.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: CC0-1.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCream uint8 = 4
	MaxCream     uint8 = 6
	DefaultSugar uint8 = 4
	MaxSugar     uint8 = 8
)
View Source
const (
	MsgError = "error"
)

Variables

View Source
var ScaleAlpha = []byte{
	0x94,
	0x95,
	0x96,
	0x97,
}

Functions

func Cook

func Cook(ctx context.Context) error

func Cook(ctx context.Context, rm *tele_api.FromRoboMessage) error {

func CreamMax added in v0.221111.1

func CreamMax() uint8

func CreateOrderMessageAndFillSelected added in v0.220427.0

func CreateOrderMessageAndFillSelected() tele_api.FromRoboMessage

func FillMenu

func FillMenu(ctx context.Context)

меню может меняться в нескольких конфигах. disables

func Init added in v0.210928.0

func Init(ctx context.Context) error

func OrderMenuAndTune added in v0.230216.0

func OrderMenuAndTune(o *tele_api.Order)

func ScaleTuneRate

func ScaleTuneRate(value *uint8, max uint8, center uint8) float32

func SugarMax added in v0.221111.1

func SugarMax() uint8

func VisualHash

func VisualHash(input, salt []byte) string

Types

type Menu map[string]MenuItem
type MenuItem struct {
	Name  string
	D     engine.Doer
	Price currency.Amount
	Code  string
}
func (mi *MenuItem) String() string

type UI

type UI struct {
	FrontMaxPrice currency.Amount
	// FrontResult   UIMenuResult
	Service uiService

	XXX_testHook func(types.UiState)
	// contains filtered or unexported fields
}

func (*UI) GetUiState added in v0.230424.2

func (ui *UI) GetUiState() uint32

func (*UI) Init

func (ui *UI) Init(ctx context.Context) error

func (*UI) LockDecrementWait

func (ui *UI) LockDecrementWait()

func (*UI) LockEnd

func (ui *UI) LockEnd()

LockEnd Stop locked state ignoring call balance

func (*UI) LockFunc

func (ui *UI) LockFunc(fun func()) bool

func (*UI) Loop

func (ui *UI) Loop(ctx context.Context)

func (*UI) ScheduleSync

func (ui *UI) ScheduleSync(ctx context.Context, fun types.TaskFunc) error

func (*UI) State

func (ui *UI) State() types.UiState

func (*UI) XXX_testSetState

func (ui *UI) XXX_testSetState(new types.UiState)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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