Documentation ¶
Overview ¶
Package geoip helps in geolocation operations.
Package geoip helps in geolocation operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locator ¶
type Locator interface { GetCountry(ip net.IP) (string, error) GetPosition(ip net.IP) (Position, error) }
func NewGeoLite2 ¶
NewGeoLite2 opens connections to GeoIp2 databases and return a geoLite2 structure with the databases connections.
The connection uses the local database or try to download it from MaxMind's server (to download, it is required `MAXMIND_LICENSE` set).
func NewNullGeoLite ¶
func NewNullGeoLite() Locator
NewNullGeoLite opens a connection to GeoIp2 database and return a geoLite2 structure with the database connection.
The connection uses the local database or try to download it from MaxMind's server (the download required `MAXMIND_LICENSE`).
Click to show internal directories.
Click to hide internal directories.