-
Notifications
You must be signed in to change notification settings - Fork 2
/
device_detail.go
51 lines (47 loc) · 2.98 KB
/
device_detail.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
package homehub
// DeviceDetail defines a device connected to the Home Hub
type DeviceDetail struct {
UID int `json:"uid,omitempty"`
Alias string `json:"Alias,omitempty"`
PhysicalAddress string `json:"PhysAddress,omitempty"`
IPAddress string `json:"IPAddress,omitempty"`
AddressSource string `json:"AddressSource,omitempty"`
DHCPClient string `json:"DHCPClient,omitempty"`
LeaseTimeRemaining int `json:"LeaseTimeRemaining,omitempty"`
AssociatedDevice string `json:"AssociatedDevice,omitempty"`
HostName string `json:"HostName,omitempty"`
Active bool `json:"Active,omitempty"`
LeaseStart int `json:"LeaseStart,omitempty"`
LeaseDuration int `json:"LeaseDuration,omitempty"`
InterfaceType string `json:"InterfaceType,omitempty"`
DetectedDeviceType string `json:"DetectedDeviceType,omitempty"`
LastStateChange string `json:"LastStateChange,omitempty"`
UserFriendlyName string `json:"UserFriendlyName,omitempty"`
UserHostName string `json:"UserHostName,omitempty"`
UserDeviceType string `json:"UserDeviceType,omitempty"`
BlacklistEnable bool `json:"BlacklistEnable,omitempty"`
UnblockHours int `json:"UnblockHoursCount,omitempty"`
Blacklisted bool `json:"Blacklisted,omitempty"`
BlacklistStatus bool `json:"BlacklistStatus,omitempty"`
BlacklistedAccordingToSchedule bool `json:"BlacklistedAccordingToSchedule,omitempty"`
Hidden bool `json:"Hidden,omitempty"`
IPv4Addresses []IPAddress `json:"IPv4Addresses,omitempty"`
IPv6Addresses []IPAddress `json:"IPv6Addresses,omitempty"`
LastConnections []ConnectionDetail `json:"LastConnections,omitempty"`
ConnectionsAtLastReboot int `json:"ConnectionsNbreAtLastReboot,omitempty"`
}
type host struct {
DeviceDetail `json:"Host,omitempty"`
}
// IPAddress defines an IPV4 or IPV6 address
type IPAddress struct {
UID int `json:"uid,omitempty"`
IPAddress string `json:"IPAddress,omitempty"`
Active bool `json:"Active,omitempty"`
}
// ConnectionDetail defines connection information related to a device connected to the Home Hub
type ConnectionDetail struct {
UID int `json:"uid,omitempty"`
ConnectionTimestamp string `json:"ConnectionTimestamp,omitempty"`
DisconnectTimestamp string `json:"DisconnectionTimestamp,omitempty"`
}