networking

package
v0.0.0-...-f7464b4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeMessageData

func DeserializeMessageData(message *Message, dataStruct interface{}) error

Types

type Message

type Message struct {
	Type string          `json:"action"`
	Data json.RawMessage `json:"data,omitempty"`
}

func DeserializeToMessage

func DeserializeToMessage(jsonString []byte) (*Message, error)

func NewMessage

func NewMessage(messageType string, dataStruct interface{}) (*Message, error)

func (*Message) Serialize

func (m *Message) Serialize() ([]byte, error)

Jump to

Keyboard shortcuts

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