Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GeoLocationResponse ¶
type GeoLocationResponse struct {
Country string `json:"country"`
CountryName string `json:"country_name"`
Region string `json:"region"`
City string `json:"city"`
Latitude string `json:"latitude"`
Longitude string `json:"longitude"`
Loc string `json:"loc"`
}
GeoLocationResponse represents the geolocation data returned by the API.
func GetRegionByIp ¶
func GetRegionByIp(ip string) (*GeoLocationResponse, error)
GetRegionByIp queries the geolocation of an IP address using supported services.
Click to show internal directories.
Click to hide internal directories.