ws

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(ctx context.Context, conn *websocket.Conn, h *hub.Hub, d *radio.Discoverer)

Types

type Command

type Command struct {
	Subscribe *CommandSubscribe `json:"subscribe"`
	State     *CommandState     `json:"state"`
}

type CommandState

type CommandState struct {
	UUID    string `json:"uuid" validate:"required"`
	Partial bool   `json:"partial" validate:"required"`
}

type CommandSubscribe

type CommandSubscribe struct {
	Topics []pubsub.Topic `json:"topics" validate:"required"`
}

type Event

type Event struct {
	Topic pubsub.Topic `json:"topic" validate:"required"`
	Data  any          `json:"data" validate:"required"`
}

Jump to

Keyboard shortcuts

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