v1_0

package
v2.0.0-...-3280c16 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Command channelID = iota
	Data
	Error
)

List of channels id

Variables

View Source
var Channels = map[channelID]string{
	Command: "command",
	Data:    "data",
	Error:   "error",
}

Channels contains channel names

View Source
var Instructions = map[string]plugin.Instruction{
	"start_game": plugin.StartSessionInstruction,
	"end_game":   plugin.StopSessionInstruction,
}

Instructions contains instruction names

Functions

This section is empty.

Types

type CommandPacket

type CommandPacket struct {
	Type   string `json:"type"`
	LinkID string `json:"link_id"`
	Body   struct {
		Command string        `json:"command"`
		Args    []interface{} `json:"args"`
	} `json:"body"`
}

CommandPacket implements the command packet of the protocol.

type DataPacket

type DataPacket struct {
	Type   string `json:"type"`
	LinkId string `json:"link_id"`
	Body   struct {
		Module string      `json:"module"`
		Value  interface{} `json:"value"`
	} `json:"body"`
}

DataPacket implements the data packet of the protocol.

type ErrorPacket

type ErrorPacket struct {
	Type   string `json:"type"`
	LinkID string `json:"link_id"`
	Body   struct {
		Origin string `json:"origin"`
		Reason string `json:"reason"`
	} `json:"body"`
}

ErrorPacket implements the error packet of the protocol.

Jump to

Keyboard shortcuts

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