encoders

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodedMessage

type EncodedMessage interface {
	GetType() string
}

type Encoder

type Encoder interface {
	ID() string
	Encode(msg EncodedMessage) (*ws.SentFrame, error)
	EncodeTransmission(msg string) (*ws.SentFrame, error)
	Decode(payload []byte) (*common.Message, error)
}

type JSON

type JSON struct {
}

func (JSON) Decode

func (JSON) Decode(raw []byte) (*common.Message, error)

func (JSON) Encode

func (JSON) Encode(msg EncodedMessage) (*ws.SentFrame, error)

func (JSON) EncodeTransmission

func (JSON) EncodeTransmission(msg string) (*ws.SentFrame, error)

func (JSON) ID

func (JSON) ID() string

Jump to

Keyboard shortcuts

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