-
Notifications
You must be signed in to change notification settings - Fork 0
/
requests.go
57 lines (48 loc) · 1.7 KB
/
requests.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
package shared
import "encoding/json"
// SystemModificationRequest is sent from the client to the server to request
// the modification of a system.
type SystemModificationRequest struct {
Name string `json:"name"`
}
// GroupCreationRequest is sent from the client to the server to request the
// creation of a group.
type GroupCreationRequest struct {
Name string `json:"name"`
PluginIndex int `json:"pluginIndex"`
GroupTemplateIndex int `json:"groupTemplateIndex"`
}
// GroupModificationRequest is sent from the client to the server to request
// the modification of a group.
type GroupModificationRequest struct {
Name string `json:"name"`
SystemIndex int `json:"systemIndex"`
}
// SceneCreationRequest is sent from the client to the server to request the
// creation of a scene.
type SceneCreationRequest struct {
Name string `json:"name"`
PluginIndex int `json:"pluginIndex"`
SceneTemplateIndex int `json:"sceneTemplateIndex"`
}
// SceneModificationRequest is sent from the client to the server to request the
// modification of a scene's name and modules.
type SceneModificationRequest struct {
Name string `json:"name"`
Modules []bool `json:"modules"`
}
// HeroModificationRequest is sent from the client to the server to request the
// modification of a hero.
type HeroModificationRequest struct {
Name string `json:"name"`
Description string `json:"description"`
}
type StateRequest struct {
Action string `json:"action"`
Index int `json:"index"`
}
type StateResponse struct {
ActiveGroup int `json:"activeGroup"`
ActiveScene int `json:"activeScene"`
Modules []json.RawMessage `json:"modules"`
}