1
0
Fork 0
keyserver/cmd/keyserver/types.go

51 lines
1.3 KiB
Go

package main
type Hood struct {
Version uint64 `json:"version"`
Network HoodNetwork `json:"network"`
Vpn []VpnEndpoint `json:"vpn"`
HoodInfo HoodInfo `json:"hood"`
// one coordinate: voronoi
// two coordinates: invalid
// three or more coordinates: polygon
Location []Coordinate `json:"location,omitempty"`
}
type HoodNetwork struct {
UlaPrefix string `json:"ula_prefix"`
}
type VpnEndpoint 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"`
}
type Coordinate struct {
Lat float64 `json:"lat"`
Long float64 `json:"long"`
}