seclient: add discover method

This commit is contained in:
Vladislav Yarmak
2021-03-26 22:09:37 +02:00
parent 738a5c329b
commit eb97beadca
3 changed files with 67 additions and 3 deletions
+16 -3
View File
@@ -61,13 +61,26 @@ type SERegisterDeviceResponse struct {
}
type SEGeoEntry struct {
Country string `json:"country"`
Country string `json:"country,omitempty"`
CountryCode string `json:"country_code"`
}
type SEGeoListResponse struct {
Data struct {
Geos []SEGeoEntry `json:"geos"`
}
Status SEStatusPair
} `json:"data"`
Status SEStatusPair `json:"return_code"`
}
type SEIPEntry struct {
Geo SEGeoEntry `json:"geo"`
IP string `json:"ip"`
Ports []uint16 `json:"ports"`
}
type SEDiscoverResponse struct {
Data struct {
IPs []SEIPEntry `json:"ips"`
} `json:"data"`
Status SEStatusPair `json:"return_code"`
}