forked from saphoooo/freebox_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
107 lines (94 loc) · 2.77 KB
/
structs.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
package main
type app struct {
AppID string `json:"app_id"`
AppName string `json:"app_name"`
AppVersion string `json:"app_version"`
DeviceName string `json:"device_name"`
}
type track struct {
Success bool `json:"success"`
Result struct {
AppToken string `json:"app_token"`
TrackID int `json:"track_id"`
} `json:"result"`
}
type grant struct {
Success bool `json:"success"`
Result struct {
Status string `json:"status"`
Challenge string `json:"challenge"`
} `json:"result"`
}
type challenge struct {
Success bool `json:"success"`
Result struct {
LoggedIN bool `json:"logged_in"`
Challenge string `json:"challenge"`
} `json:"result"`
}
type session struct {
AppID string `json:"app_id"`
Password string `json:"password"`
}
type sessionToken struct {
Msg string `json:"msg,omitempty"`
Success bool `json:"success"`
UID string `json:"uid,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
Result struct {
SessionToken string `json:"session_token,omitempty"`
Challenge string `json:"challenge"`
Permissions struct {
Settings bool `json:"settings,omitempty"`
Contacts bool `json:"contacts,omitempty"`
Calls bool `json:"calls,omitempty"`
Explorer bool `json:"explorer,omitempty"`
Downloader bool `json:"downloader,omitempty"`
Parental bool `json:"parental,omitempty"`
Pvr bool `json:"pvr,omitempty"`
Home bool `json:"home,omitempty"`
Camera bool `json:"camera,omitempty"`
} `json:"permissions,omitempty"`
} `json:"result"`
}
type rrd struct {
UID string `json:"uid,omitempty"`
Success bool `json:"success"`
Msg string `json:"msg,omitempty"`
Result struct {
DateStart int `json:"date_start,omitempty"`
DateEnd int `json:"date_end,omitempty"`
Data []map[string]int `json:"data,omitempty"`
} `json:"result"`
ErrorCode string `json:"error_code"`
}
type database struct {
DB string `json:"db"`
DateStart int `json:"date_start,omitempty"`
DateEnd int `json:"date_end,omitempty"`
Precision int `json:"precision,omitempty"`
Fields []string `json:"fields"`
}
type lanHost struct {
Reachable bool `json:"reachable,omitempty"`
PrimaryName string `json:"primary_name,omitempty"`
}
type lan struct {
Success bool `json:"success"`
Result []lanHost `json:"result"`
ErrorCode string `json:"error_code"`
}
type idNameValue struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Value int `json:"value,omitempty"`
}
type systemR struct {
Sensors []idNameValue `json:"sensors"`
Fans []idNameValue `json:"fans"`
}
type system struct {
Success bool `json:"success"`
Result systemR `json:"result"`
ErrorCode string `json:"error_code"`
}