types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OnErrorHandler = func(c *wshelper.Connection, err error) {
		log.Fatal(err)
	}
	OnCloseHandler = func(c *wshelper.Connection, code websocket.StatusCode, reason string) {
		log.Printf("The connection '%v' has been closed with code '%v' and reason '%v'", c.UUID(), code, reason)
	}
)

Functions

This section is empty.

Types

type Hello

type Hello struct {
	Message string `json:"message"`
}

type Message

type Message struct {
	Op   uint8           `json:"op"`
	Data json.RawMessage `json:"data"`
}

func (Message) DataTo

func (p Message) DataTo(v interface{}) error

type SendData

type SendData struct {
	Op   uint8       `json:"op"`
	Data interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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