-
Notifications
You must be signed in to change notification settings - Fork 2
/
response.go
46 lines (38 loc) · 1.1 KB
/
response.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
package homehub
type response struct {
body string
ResponseBody responseBody
}
type responseBody struct {
Reply *reply `json:"reply"`
}
type reply struct {
UID int `json:"uid"`
ID int `json:"id"`
ReplyError replyError `json:"error"`
ResponseActions []responseAction `json:"actions"`
}
type replyError struct {
Code int `json:"code"`
Description string `json:"description"`
}
type responseAction struct {
UID int `json:"uid"`
ID int `json:"id"`
ReplyError replyError `json:"error"`
ResponseCallbacks []responseCallback `json:"callbacks"`
ResponseEvents []responseEvent `json:"events"`
}
type responseCallback struct {
UID int `json:"uid"`
Result result `json:"result"`
XPath string `json:"xpath"`
Parameters parameters `json:"parameters"`
}
type result struct {
Code int `json:"code"`
Description string `json:"description"`
}
type responseEvent struct {
//TODO: Events not supported right now
}