Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Countries = map[string]bool{ "AE": true, "AR": true, "AU": true, "BG": true, "BM": true, "BR": true, "CA": true, "CH": true, "CL": true, "CO": true, "CR": true, "CZ": true, "DK": true, "DO": true, "GB": true, "HU": true, "IS": true, "MA": true, "MX": true, "NO": true, "NZ": true, "PA": true, "PE": true, "PL": true, "RU": true, "SA": true, "SE": true, "TR": true, "US": true, "UY": true, "ZW": false, "UA": false, "YE": false, "TH": false, "CN": false, "RO": false, "VN": false, } )
Functions ¶
This section is empty.
Types ¶
type IP ¶
type IP struct { IP string `json:"ip"` ASNum uint `json:"asnum,omitempty"` City string `json:"city"` Country string `json:"country"` CountryISO string `json:"country-iso"` Continent string `json:"continent"` Latitude float64 `json:"lat"` Longitude float64 `json:"lng"` TimeZone string `json:"time-zone"` Distance float64 `json:"distance,omitempty"` Hostnames []string `json:"hostnames,omitempty"` ASOrg string `json:"asorg,omitempty"` ISP string `json:"isp,omitempty"` Org string `json:"org,omitempty"` CIDRReport string `json:"cidr-report,omitempty"` CleanTalkReport string `json:"cleantalk-report,omitempty"` IPInfoReport string `json:"ipinfo-report,omitempty"` PeeringDBReport string `json:"peering-db-report,omitempty"` }
type IPDatabase ¶
type IPDatabase struct { Isp *geoip2.Reader City *geoip2.Reader }
func OpenDatabases ¶
func OpenDatabases() *IPDatabase
Click to show internal directories.
Click to hide internal directories.