forked from nytlabs/st-core
/
update.go
73 lines (59 loc) · 1.09 KB
/
update.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package server
import "github.com/nytlabs/st-core/core"
type Update struct {
Action string `json:"action"`
Type string `json:"type"`
Data interface{} `json:"data"`
}
type wsId struct {
Id int `json:"id"`
}
type wsLabel struct {
wsId
Label string `json:"label"`
}
type wsPosition struct {
wsId
Position Position `json:"position"`
}
// type BLOCK
type wsBlock struct {
Block interface{} `json:"block"`
}
// type GROUP
type wsGroup struct {
Group interface{} `json:"group"`
}
// type SOURCE
type wsSource struct {
Source interface{} `json:"source"`
}
// type LINK
type wsLink struct {
Link interface{} `json:"link"`
}
// type CONNECTION
type wsConnection struct {
Connection interface{} `json:"connection"`
}
// type CHILD
type wsGroupChild struct {
Group wsId `json:"group"`
Child wsId `json:"child"`
}
// type ROUTE
type wsRouteModify struct {
ConnectionNode
Value *core.InputValue `json:"value"`
}
// type PARAM
type wsSourceModify struct {
wsId
Param string `json:"param"`
Value string `json:"value"`
}
//type Info
type wsInfo struct {
wsId
core.MonitorMessage
}