Documentation
¶
Overview ¶
Package feed geolocation provides a simple function to get the geolocation of an IP address.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Geolocation ¶
type Geolocation struct {
IP string `json:"ip"`
CountryCode string `json:"country_code"`
CountryName string `json:"country_name"`
RegionCode string `json:"region_code"`
RegionName string `json:"region_name"`
City string `json:"city"`
ZipCode string `json:"zip_code"`
TimeZone string `json:"time_zone"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
MetroCode int `json:"metro_code"`
}
Geolocation is the IP geolocation service.
func GetGeolocation ¶
func GetGeolocation(ip string) (*Geolocation, error)
GetGeolocation returns geolocation data using IP address.
Click to show internal directories.
Click to hide internal directories.