package rest import "encoding/json" type Command struct { Actor string `json:"actor" binding:"notblank"` // Commands carries the engine-bound payload for the order // (`PUT /api/v1/order`, validate-and-store) path. An empty array // means "the player has no orders for this turn" and is stored // as-is. Commands []json.RawMessage `json:"cmd"` } func (o Command) MarshalBinary() (data []byte, err error) { return json.Marshal(&o) } func (o *Command) UnmarshalBinary(data []byte) error { return json.Unmarshal(data, o) }