Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoDB ¶
type GeoDB struct {
// contains filtered or unexported fields
}
GeoDB maps IPs to their geological location based on MaxMinds GeoLite2 or GeoIP2 database.
func (*GeoDB) CountryCodeAndCity ¶
CountryCodeAndCity looks up the country code and city for given IP. If the IP is invalid it will return an empty string. The country code is returned in lowercase.
func (*GeoDB) UpdateFromFile ¶
UpdateFromFile updates GeoDB from given file instead of downloading the database.
Click to show internal directories.
Click to hide internal directories.