Documentation ¶
Index ¶
Constants ¶
View Source
const ( ASN_IDC = "IDC" //hosting ASN_ISP = "ISP" //isp ASN_ORG = "ORG" //cdn edu gov mil business ASN_UNKNOWN = "UNKNOWN" )
View Source
const AllContinent = "AllContinent"
View Source
const AllCountry = "AllCountry"
View Source
const NA = "N/A"
Variables ¶
This section is empty.
Functions ¶
func GeoInfoEncode ¶
func GetContinentList ¶
func GetCountryList ¶
func GetCountryList() map[string]CountryData
func GetRegionList ¶ added in v0.0.21
func GetRegionList() map[string]RegionData
Types ¶
type CountryData ¶
type CountryData struct { CountryCode string `json:"country_code"` CountryName string `json:"country_name"` ContinentCode string `json:"continent_code"` ContinentName string `json:"continent_name"` }
func GetCountryInfo ¶
func GetCountryInfo(countryCode string) CountryData
type GeoInfo ¶
type GeoInfo struct { IP string `json:"ip"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` CountryCode string `json:"country_code"` ContinentCode string `json:"continent_code"` RegionCode string `json:"region_code"` ASN ASN `json:"asn"` }
func GeoInfoDecode ¶
type RegionData ¶ added in v0.0.21
type RegionData struct { Code string `json:"code"` Name string `json:"name"` Type string `json:"type"` }
func GetRegionInfo ¶ added in v0.0.21
func GetRegionInfo(countryCode, regionCode string) RegionData
Click to show internal directories.
Click to hide internal directories.