Documentation ¶
Index ¶
Constants ¶
View Source
const (
IpAPITagKey = "ipapi"
)
Variables ¶
This section is empty.
Functions ¶
func SetHTTPClientTimeout ¶
Types ¶
type FreeGeoIPApp ¶
type FreeGeoIPApp struct {
// contains filtered or unexported fields
}
func NewFreeGeoIPApp ¶
func NewFreeGeoIPApp(ip string) *FreeGeoIPApp
func (*FreeGeoIPApp) Get ¶
func (f *FreeGeoIPApp) Get() (Geo, error)
type Geo ¶
type Geo struct { IP string `json:"ip" ipapi:"query"` CountryCode string `json:"country_code" ipapi:"countryCode"` CountryName string `json:"country_name" ipapi:"country"` RegionCode string `json:"region_code" ipapi:"region"` RegionName string `json:"region_name" ipapi:"regionName"` City string `json:"city" ipapi:"city"` ZipCode string `json:"zip_code" ipapi:"zip"` Timezone string `json:"time_zone" ipapi:"timezone"` Latitude float64 `json:"latitude" ipapi:"lat"` Longitude float64 `json:"longitude" ipapi:"lon"` MetroCode int `json:"metro_code" ipapi:"metro"` }
func GetBrowserLocation ¶
func GetBrowserLocation(g GeoLocation) Geo
type GeoLocation ¶
Click to show internal directories.
Click to hide internal directories.