forked from fbl/keyserver
61 lines
1.6 KiB
Go
61 lines
1.6 KiB
Go
package main
|
|
|
|
type root struct {
|
|
Id uint `json:"id"`
|
|
Active uint `json:"active"`
|
|
Name string `json:"name"`
|
|
Lat float64 `json:"lat"`
|
|
Long float64 `json:"lon"`
|
|
Polygons [][]GeoCoordinate `json:"polygons"`
|
|
Hood Hood
|
|
}
|
|
|
|
type GeoCoordinate struct {
|
|
Lat float64 `json:"lat"`
|
|
Long float64 `json:"lon"`
|
|
}
|
|
|
|
type Hood struct {
|
|
Version uint64 `json:"version"`
|
|
Network HoodNetwork `json:"network"`
|
|
Vpn []HoodVpnEndpoint `json:"vpn"`
|
|
HoodInfo HoodInfo `json:"hood"`
|
|
|
|
// one coordinate: voronoi
|
|
// two coordinates: invalid
|
|
// three or more coordinates: polygon
|
|
Location []GeoCoordinate `json:"location,omitempty"`
|
|
}
|
|
|
|
type HoodNetwork struct {
|
|
UlaPrefix string `json:"ula_prefix"`
|
|
}
|
|
|
|
type HoodVpnEndpoint struct {
|
|
Name string `json:"name"`
|
|
Protocol string `json:"protocol"`
|
|
Address string `json:"address"`
|
|
Port uint16 `json:"port"`
|
|
Key string `json:"key"`
|
|
Contact string `json:"contact"`
|
|
}
|
|
|
|
type HoodInfo struct {
|
|
Id uint64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Essid string `json:"essid"`
|
|
MeshBssid string `json:"mesh_bssid"`
|
|
MeshEssid string `json:"mesh_essid"`
|
|
MeshId string `json:"mesh_id"`
|
|
Protocol string `json:"protocol"`
|
|
Channel2 uint64 `json:"channel2"`
|
|
Mode2 string `json:"mode2"`
|
|
MeshType2 string `json:"mesh_type2"`
|
|
Channel5 uint64 `json:"channel5"`
|
|
Mode5 string `json:"mode5"`
|
|
MeshType5 string `json:"mesh_type5"`
|
|
UpgradePath string `json:"upgrade_path"`
|
|
NtpIp string `json:"ntp_ip"`
|
|
Timestamp uint64 `json:"timestamp"`
|
|
}
|