wshandler

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONWsHandler

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

func NewHandler

func NewHandler(log *slog.Logger, name string, ws *websocket.Conn) *JSONWsHandler

func (*JSONWsHandler) DeleteItem

func (w *JSONWsHandler) DeleteItem(uid string) bool

func (*JSONWsHandler) IsActive

func (w *JSONWsHandler) IsActive() bool

func (*JSONWsHandler) Listen

func (w *JSONWsHandler) Listen()

func (*JSONWsHandler) NewChatMessage

func (w *JSONWsHandler) NewChatMessage(msg *model.ChatMessage) bool

func (*JSONWsHandler) SendItem

func (w *JSONWsHandler) SendItem(i *model.Item) bool

type WebMessage

type WebMessage struct {
	Typ         string             `json:"type"`
	Unit        *model.WebUnit     `json:"unit,omitempty"`
	UID         string             `json:"uid,omitempty"`
	ChatMessage *model.ChatMessage `json:"chat_msg,omitempty"`
}

Jump to

Keyboard shortcuts

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