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 (
|
2017-05-30 02:16:46 +02:00
|
|
|
MessageTypeSystemNode = "system"
|
2017-05-09 01:03:44 +02:00
|
|
|
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
|
|
|
)
|