Documentation ¶
Index ¶
Constants ¶
View Source
const (
// EventSendMessage is the event name for new chat messages sent
EventSendMessage = "send_message"
)
Variables ¶
View Source
var (
ErrEventNotSupported = errors.New("this event type is not supported")
)
* wsUpgrader is used to upgrade incomming HTTP requests into a persitent websocket connection
Functions ¶
func StartWebUI ¶ added in v0.4.0
func StartWebUI(queueWsOutTokenTransactions chan *totra.TokenTransaction)
Types ¶
type Event ¶ added in v0.4.0
type Event struct { // Type is the message type sent Type string `json:"type"` // Payload is the data Based on the Type Payload json.RawMessage `json:"payload"` }
Event is the Messages sent over the websocket Used to differ between different actions
type EventHandler ¶ added in v0.4.0
EventHandler is a function signature that is used to affect messages on the socket and triggered depending on the type
type SendMessageEvent ¶ added in v0.4.0
SendMessageEvent is the payload sent in the send_message event
Click to show internal directories.
Click to hide internal directories.