util

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidWSCommand = errors.New("invalid webssocket command")
)

Functions

func SubsciptionReqAuth

func SubsciptionReqAuth(cmd string) bool

func ValidSubscription

func ValidSubscription(cmd string) bool

func WSJSON

func WSJSON(cmd, id string, payload interface{}) ([][]byte, error)

WSJSON returns the JSON representation of a wire command. This function must always match WSWrite.

func WSRead

func WSRead(c *websocket.Conn) (string, string, interface{}, error)

func WSWrite

func WSWrite(c *websocket.Conn, cmd, id string, payload interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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