web

package
v0.260602.3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: CC0-1.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const CmdName = "web"

Variables

View Source
var Cmd = cli.Cmd{
	Name:   CmdName,
	Desc:   "web. control vmc via web browser",
	Action: webApp,
}
View Source
var CmdR = cli.Cmd{
	Name:   "webR",
	Desc:   "webR. control vmc via web browser",
	Action: webApp,
}

Functions

This section is empty.

Types

type EventBus

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

func NewEventBus

func NewEventBus() *EventBus

func (*EventBus) Publish

func (b *EventBus) Publish(userId int64, userType int32, event any)

func (*EventBus) Subscribe

func (b *EventBus) Subscribe(userId int64, userType int32) chan any

func (*EventBus) Unsubscribe

func (b *EventBus) Unsubscribe(userId int64, userType int32, ch chan any)

type MachineStatusBus added in v0.260520.0

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

func NewMachineStatusBus added in v0.260520.0

func NewMachineStatusBus() *MachineStatusBus

func (*MachineStatusBus) Publish added in v0.260520.0

func (b *MachineStatusBus) Publish(ev MachineStatusEvent)

func (*MachineStatusBus) Subscribe added in v0.260520.0

func (b *MachineStatusBus) Subscribe(vmid int32) chan MachineStatusEvent

func (*MachineStatusBus) Unsubscribe added in v0.260520.0

func (b *MachineStatusBus) Unsubscribe(vmid int32, ch chan MachineStatusEvent)

type MachineStatusEvent added in v0.260520.0

type MachineStatusEvent struct {
	Vmid    int32 `json:"vmid"`
	Connect bool  `json:"connect"`
	State   int32 `json:"state"`
}

type WebHandler

type WebHandler struct {
	App           *state.Global
	OrderEvents   *EventBus
	MachineStatus *MachineStatusBus
	// contains filtered or unexported fields
}

func (*WebHandler) AdminGetUsers

func (h *WebHandler) AdminGetUsers(c *gin.Context)

func (*WebHandler) AdminInviteUser

func (h *WebHandler) AdminInviteUser(c *gin.Context)

func (*WebHandler) AdminMemoUser

func (h *WebHandler) AdminMemoUser(c *gin.Context)

func (*WebHandler) AdminNotificationClick

func (h *WebHandler) AdminNotificationClick(c *gin.Context)

func (*WebHandler) AdminRenameUser

func (h *WebHandler) AdminRenameUser(c *gin.Context)

func (*WebHandler) AdminReplyAck

func (h *WebHandler) AdminReplyAck(c *gin.Context)

func (*WebHandler) AdminReplyMessage

func (h *WebHandler) AdminReplyMessage(c *gin.Context)

func (*WebHandler) AdminSendMessage

func (h *WebHandler) AdminSendMessage(c *gin.Context)

func (*WebHandler) CheckAuth

func (h *WebHandler) CheckAuth() gin.HandlerFunc

func (*WebHandler) GetAdminMessages

func (h *WebHandler) GetAdminMessages(c *gin.Context)

func (*WebHandler) GetBalance

func (h *WebHandler) GetBalance(c *gin.Context)

func (*WebHandler) GetOrders

func (h *WebHandler) GetOrders(c *gin.Context)

func (*WebHandler) GetPopular

func (h *WebHandler) GetPopular(c *gin.Context)

Получаем ТОП-5 популярных напитков из истории заказов текущего пользователя

func (*WebHandler) HandleAuth

func (h *WebHandler) HandleAuth(c *gin.Context)

func (*WebHandler) ListenMQTT

func (h *WebHandler) ListenMQTT(ctx context.Context)

func (*WebHandler) Logout

func (h *WebHandler) Logout(c *gin.Context)

func (*WebHandler) MachineStatusWS added in v0.260520.0

func (h *WebHandler) MachineStatusWS(c *gin.Context)

func (*WebHandler) OpenInvite

func (h *WebHandler) OpenInvite(c *gin.Context)

func (*WebHandler) OrderWS

func (h *WebHandler) OrderWS(c *gin.Context)

func (*WebHandler) PreviewOrder

func (h *WebHandler) PreviewOrder(c *gin.Context)

func (*WebHandler) PushPublicKey

func (h *WebHandler) PushPublicKey(c *gin.Context)

func (*WebHandler) PushSubscribe

func (h *WebHandler) PushSubscribe(c *gin.Context)

func (*WebHandler) PushUnsubscribe

func (h *WebHandler) PushUnsubscribe(c *gin.Context)

func (*WebHandler) SendAdminMessage

func (h *WebHandler) SendAdminMessage(c *gin.Context)

func (*WebHandler) SetFavorite

func (h *WebHandler) SetFavorite(c *gin.Context)

Сохранение фаворита

func (*WebHandler) StartOrder

func (h *WebHandler) StartOrder(c *gin.Context)

func (*WebHandler) UserReplyAdminMessage

func (h *WebHandler) UserReplyAdminMessage(c *gin.Context)

Jump to

Keyboard shortcuts

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