freifunkmanager/websocket/msg.go

18 lines
440 B
Go
Raw Normal View History

2017-05-08 19:13:29 +02:00
package websocket
import "github.com/FreifunkBremen/freifunkmanager/runtime"
type Message struct {
2017-05-30 16:39:14 +02:00
Type string `json:"type"`
Body interface{} `json:"body,omitempty"`
Node *runtime.Node `json:"node,omitempty"`
Command *runtime.Command `json:"cmd,omitempty"`
2017-05-08 19:13:29 +02:00
}
const (
MessageTypeSystemNode = "system"
MessageTypeCurrentNode = "current"
2017-05-15 21:59:48 +02:00
MessageTypeStats = "stats"
2017-05-30 16:39:14 +02:00
MessageTypeCommand = "cmd"
2017-05-08 19:13:29 +02:00
)