2016-03-12 13:32:55 +01:00
|
|
|
package data
|
|
|
|
|
|
|
|
type NodeInfo struct {
|
|
|
|
NodeId string `json:"node_id"`
|
|
|
|
Network Network `json:"network"`
|
2016-10-07 22:46:57 +02:00
|
|
|
Owner *Owner `json:"-"` // Removed for privacy reasons
|
2016-03-12 13:32:55 +01:00
|
|
|
System System `json:"system"`
|
|
|
|
Hostname string `json:"hostname"`
|
|
|
|
Location *Location `json:"location,omitempty"`
|
|
|
|
Software Software `json:"software"`
|
|
|
|
Hardware Hardware `json:"hardware"`
|
|
|
|
VPN bool `json:"vpn"`
|
2016-06-29 00:04:33 +02:00
|
|
|
Wireless *Wireless `json:"wireless,omitempty"`
|
2016-03-12 13:32:55 +01:00
|
|
|
}
|
2016-04-29 08:25:45 +02:00
|
|
|
type BatInterface struct {
|
|
|
|
Interfaces struct {
|
|
|
|
Wireless []string `json:"wireless,omitempty"`
|
|
|
|
Other []string `json:"other,omitempty"`
|
|
|
|
Tunnel []string `json:"tunnel,omitempty"`
|
|
|
|
} `json:"interfaces"`
|
|
|
|
}
|
2016-03-12 13:32:55 +01:00
|
|
|
|
|
|
|
type Network struct {
|
2016-06-19 00:01:12 +02:00
|
|
|
Mac string `json:"mac"`
|
|
|
|
Addresses []string `json:"addresses"`
|
|
|
|
Mesh map[string]*BatInterface `json:"mesh"`
|
|
|
|
MeshInterfaces []string `json:"mesh_interfaces"`
|
2016-03-12 13:32:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Owner struct {
|
|
|
|
Contact string `json:"contact"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type System struct {
|
|
|
|
SiteCode string `json:"site_code"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Location struct {
|
|
|
|
Longtitude float64 `json:"longitude"`
|
|
|
|
Latitude float64 `json:"latitude"`
|
|
|
|
Altitude float64 `json:"altitude,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Software struct {
|
2016-12-15 10:43:07 +01:00
|
|
|
Autoupdater struct {
|
|
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
|
|
Branch string `json:"branch,omitempty"`
|
2016-03-12 13:32:55 +01:00
|
|
|
} `json:"autoupdater,omitempty"`
|
2016-12-15 10:43:07 +01:00
|
|
|
BatmanAdv struct {
|
|
|
|
Version string `json:"version,omitempty"`
|
|
|
|
Compat int `json:"compat,omitempty"`
|
2016-03-12 13:32:55 +01:00
|
|
|
} `json:"batman-adv,omitempty"`
|
2016-12-15 10:43:07 +01:00
|
|
|
Fastd struct {
|
|
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
|
|
Version string `json:"version,omitempty"`
|
2016-03-12 13:32:55 +01:00
|
|
|
} `json:"fastd,omitempty"`
|
2016-12-15 10:43:07 +01:00
|
|
|
Firmware struct {
|
|
|
|
Base string `json:"base,omitempty"`
|
|
|
|
Release string `json:"release,omitempty"`
|
2016-03-12 13:32:55 +01:00
|
|
|
} `json:"firmware,omitempty"`
|
2016-12-15 10:43:07 +01:00
|
|
|
StatusPage struct {
|
2016-03-12 13:32:55 +01:00
|
|
|
Api int `json:"api"`
|
|
|
|
} `json:"status-page,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Hardware struct {
|
|
|
|
Nproc int `json:"nproc"`
|
|
|
|
Model string `json:"model"`
|
|
|
|
}
|