geo

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPInfo

type IPInfo struct {
	IP                  string  `json:"ip"`
	IsAnonymousProxy    bool    `json:"is_anonymous_proxy"`
	IsSatelliteProvider bool    `json:"is_satellite_provider"`
	City                string  `json:"city"`
	ContinentName       string  `json:"continent_name"`
	ContinentCode       string  `json:"continent_code"`
	IsInEuropeanUnion   bool    `json:"is_in_european_union"`
	CountryName         string  `json:"country_name"`
	CountryCode         string  `json:"country_code"`
	TimeZone            string  `json:"timezone"`
	Latitude            float64 `json:"latitude"`
	Longitude           float64 `json:"longitude"`
	AccuracyRadius      uint16  `json:"accuracy_radius"`
	ASNOrg              string  `json:"asn_org"`
	ASN                 uint    `json:"asn"`
}

IPInfo represents IP address information from Maxmind's GeoLite2 database

func Info

func Info(ipAddr string) (*IPInfo, error)

Info returns GeoIP information from given IP address

Jump to

Keyboard shortcuts

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