ip

package
v0.0.0-...-f0a2dc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIP

func GetIP(input string) ([]string, error)

GetIP parses the input domain or IP address and returns the IP address.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL