@@ -0,0 +1,16 @@
|
||||
package rest
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type Command struct {
|
||||
Actor string `json:"actor" binding:"notblank"`
|
||||
Commands []json.RawMessage `json:"cmd" binding:"min=1"`
|
||||
}
|
||||
|
||||
func (o Command) MarshalBinary() (data []byte, err error) {
|
||||
return json.Marshal(&o)
|
||||
}
|
||||
|
||||
func (o *Command) UnmarshalBinary(data []byte) error {
|
||||
return json.Unmarshal(data, o)
|
||||
}
|
||||
Reference in New Issue
Block a user