/
responses.go
160 lines (132 loc) · 4.83 KB
/
responses.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
package publisher
import "github.com/jkoenig134/ts-remote-app/types"
type AuthResponse struct {
Status struct {
Code int `json:"code"`
Message string `json:"message"`
} `json:"status"`
Payload AuthResponsePayload `json:"payload"`
}
type AuthResponsePayload struct {
ApiKey string `json:"apiKey"`
Connections []types.Connection `json:"connections"`
CurrentConnectionId int `json:"currentConnectionId"`
}
type ClientSelfPropertyUpdatedResponse struct {
Payload ClientSelfPropertyUpdatedResponsePayload `json:"payload"`
}
type ClientSelfPropertyUpdatedResponsePayload struct {
ConnectionId int `json:"connectionId"`
Flag string `json:"flag"`
NewValue string `json:"newValue"`
OldValue string `json:"oldValue"`
}
type ConnectStatusChangedResponse struct {
Payload ConnectStatusChangedResponsePayload `json:"payload"`
}
type ConnectStatusChangedResponsePayload struct {
ConnectionId int `json:"connectionId"`
Error int `json:"error"`
Info struct {
ClientId int `json:"clientId"`
ServerName string `json:"serverName"`
ServerUid string `json:"serverUid"`
} `json:"info"`
Status int `json:"status"`
}
type ChannelsSubscribedResponse struct {
Payload ChannelsSubscribedResponsePayload `json:"payload"`
}
type ChannelsSubscribedResponsePayload struct {
ChannelIds interface{} `json:"channelIds"` //TODO
ConnectionId int `json:"connectionId"`
}
type ClientMovedResponse struct {
Payload ClientMovedResponsePayload `json:"payload"`
}
type ClientMovedResponsePayload struct {
ClientId int `json:"clientId"`
ConnectionId int `json:"connectionId"`
Message string `json:"message"`
NewChannelId string `json:"newChannelId"`
OldChannelId string `json:"oldChannelId"`
Type int `json:"type"`
Visibility int `json:"visibility"`
Properties types.ClientProperties `json:"properties,omitempty"`
}
type ClientPropertyUpdatedResponse struct {
Payload ClientPropertyUpdatedResponsePayload `json:"payload"`
}
type ClientPropertyUpdatedResponsePayload struct {
ClientId int `json:"clientId"`
ConnectionId int `json:"connectionId"`
Properties types.ClientProperties `json:"properties"`
}
type ClientChannelGroupChangedResponse struct {
Payload ClientChannelGroupChangedResponsePayload `json:"payload"`
}
type ClientChannelGroupChangedResponsePayload struct {
ChannelGroupId string `json:"channelGroupId"`
ChannelGroupInheritedChannelId string `json:"channelGroupInheritedChannelId"`
ChannelId string `json:"channelId"`
ClientId int `json:"clientId"`
ConnectionId int `json:"connectionId"`
}
type ChannelPropertiesUpdatedResponse struct {
Payload ChannelPropertiesUpdatedResponsePayload `json:"payload"`
}
type ChannelPropertiesUpdatedResponsePayload struct {
ChannelId string `json:"channelId"`
ConnectionId int `json:"connectionId"`
Properties map[string]interface{} `json:"properties"`
}
type ChannelsResponse struct {
Payload ChannelsResponsePayload `json:"payload"`
}
type ChannelsResponsePayload struct {
ConnectionId int `json:"connectionId"`
Info types.ChannelInfo `json:"info"`
}
type GroupInfoResponse struct {
Payload GroupInfoResponsePayload `json:"payload"`
}
type GroupInfoResponsePayload struct {
ConnectionId int `json:"connectionId"`
Data []types.GroupInfo `json:"data"`
Type int `json:"type"`
}
type PermissionListResponse struct {
Payload PermissionListResponsePayload `json:"payload"`
Type string `json:"type"`
}
type PermissionListResponsePayload struct {
ConnectionId int `json:"connectionId"`
Data []types.Permission `json:"data"`
GroupEndIds interface{} `json:"groupEndIds"` //TODO
}
type ServerPropertiesUpdatedResponse struct {
Payload ServerPropertiesUpdatedResponsePayload `json:"payload"`
}
type ServerPropertiesUpdatedResponsePayload struct {
ConnectionId int `json:"connectionId"`
Properties map[string]interface{} `json:"properties"`
}
type NeededPermissionsResponse struct {
Payload NeededPermissionsResponsePayload `json:"payload"`
}
type NeededPermissionsResponsePayload struct {
ConnectionId int `json:"connectionId"`
Data map[string]int `json:"data"`
}
type ButtonPressResponse struct {
Payload struct {
Button string `json:"button"`
State bool `json:"state"`
} `json:"payload"`
ReturnCode string `json:"returnCode"`
Status struct {
Code int `json:"code"`
Message string `json:"message"`
} `json:"status"`
Type string `json:"type"`
}