Documentation ¶ Index ¶ type EncodedMessage type Encoder type JSON func (JSON) Decode(raw []byte) (*common.Message, error) func (JSON) Encode(msg EncodedMessage) (*ws.SentFrame, error) func (JSON) EncodeTransmission(msg string) (*ws.SentFrame, error) func (JSON) ID() string 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 Source Files ¶ View all Source files encoder.go json.go Click to show internal directories. Click to hide internal directories.