-
Notifications
You must be signed in to change notification settings - Fork 1
/
ipapi-defs.go
27 lines (24 loc) · 934 Bytes
/
ipapi-defs.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
// IP-API JSON format, derived from:
// http://ip-api.com/docs/api:json
package main
import (
"net"
)
// IPInfoData is the data structure returned by IP-API
type IPInfoData struct {
IP net.IP `json:"query,omitempty"`
Message string `json:"message,omitempty"`
Status string `json:"status,omitempty"`
AS string `json:"as,omitempty"`
City string `json:"city,omitempty"`
Country string `json:"country,omitempty"`
CountryCode string `json:"countryCode,omitempty"`
ISP string `json:"isp,omitempty"`
Latitude float64 `json:"lat,omitempty"`
Longitude float64 `json:"lon,omitempty"`
Organization string `json:"org,omitempty"`
Region string `json:"region,omitempty"`
RegionName string `json:"regionName,omitempty"`
Timezone string `json:"timezone,omitempty"`
Zip string `json:"zip,omitempty"`
}