freifunkmanager/websocket/msg.go

16 lines
344 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 {
Type string `json:"type"`
2017-05-15 21:59:48 +02:00
Body interface{} `json:"body,omitempty"`
Node *runtime.Node `json:"node,omitempty"`
2017-05-08 19:13:29 +02:00
}
const (
MessageTypeUpdateNode = "to-update"
MessageTypeCurrentNode = "current"
2017-05-15 21:59:48 +02:00
MessageTypeStats = "stats"
2017-05-08 19:13:29 +02:00
)