Documentation ¶
Overview ¶
Package geoip provides allows retrieving geographical information from an incoming request.
To use this package outside of App Engine, a GeoIP database is required. See Load for more information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Country ¶
Country returns the country for the IP address associated with the given *app.Context, as an ISO
func LatLong ¶
LatLong returns the latitude and longitude for the IP address associated with the given *app.Context. The last return value indicates if the coordinates are known.
func Load ¶
Load loads the given GeoIP2 database from the given filename into the given *app.App. Databases can be downloaded from free from http://dev.maxmind.com/geoip/geoip2/geolite2/.
Note that the filename might point to either a bare .mmdb file or a gzip-compressed .mmdb.gz file.
On some platforms, notably App Engine, the filename argument might be empty, because the platform already provides GeoIP functionality.
Types ¶
This section is empty.