Documentation
¶
Index ¶
Constants ¶
View Source
const ( LocalEnglish string = "en" // English localization LocalGerman string = "de" // German localization LocalSpanish string = "es" // Spanish localization LocalArgentina string = "pt-BR" // Argentina spanish localization LocalFrench string = "fr" // French localization LocalJapanese string = "ja" // Japanese localization LocalChinese string = "zh-CN" // Chinese localization LocalRussia string = "ru" // Russia localization )
All localization
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNS ¶
type DNS struct {
DNS struct {
IP string `json:"ip"`
Geo string `json:"geo"`
} `json:"dns"`
Edns struct {
IP string `json:"ip"`
Geo string `json:"geo"`
} `json:"edns"`
}
DNS response struct
type Geolocation ¶
type Geolocation struct {
Query string `json:"query"`
Status string `json:"status"`
Continent string `json:"continent"`
ContinentCode string `json:"continentCode"`
Country string `json:"country"`
CountryCode string `json:"countryCode"`
Region string `json:"region"`
RegionName string `json:"regionName"`
City string `json:"city"`
District string `json:"district"`
Zip string `json:"zip"`
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
Timezone string `json:"timezone"`
Currency string `json:"currency"`
Isp string `json:"isp"`
Org string `json:"org"`
AS string `json:"as"`
ASname string `json:"asname"`
Reverse string `json:"reverse"`
Mobile bool `json:"mobile"`
Proxy bool `json:"proxy"`
}
Geolocation response struct
func GetLocation ¶
func GetLocation(ip string, localization string) (Geolocation, error)
GetLocation get geolocation by IP in localization
Click to show internal directories.
Click to hide internal directories.