Files
gvc/messages/structure.go

29 lines
494 B
Go

package messages
// ID forces the command IDs to always be a certain type.
type ID int
// ID forces all these commands to be locked in
const (
COMMIT ID = iota
REFRESH
INFO
PUSH
PULL
REVERT
LOCK
)
// Modifiers contains any arguments/modifiers to the command ID
type Modifiers struct {
ModifierID string
ModifierData string
}
// Command is the structure that all messages must adhere to
type Command struct {
CmdID ID //locked into the ID type
Mods []Modifiers
Body []byte
}