models

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeMessagePropUpdate          = "message_prop_update"
	MessageTypeConversationPropertyUpdate = "conversation_prop_update"
	MessageTypeNewMessage                 = "new_message"
	MessageTypeNewConversation            = "new_conversation"
	MessageTypeNewNotification            = "new_notification"
	MessageTypeError                      = "error"
)

Action constants for WebSocket messages.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastMessage

type BroadcastMessage struct {
	Data  []byte `json:"data"`
	Users []int  `json:"users"`
}

BroadcastMessage represents a message to be pushed to users.

type Message

type Message struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

Message represents a WebSocket message to be sent.

type WSMessage

type WSMessage struct {
	MessageType int
	Data        []byte
}

WSMessage represents a WS message.

Jump to

Keyboard shortcuts

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