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.
Click to show internal directories.
Click to hide internal directories.