Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocator ¶
NewLocator initializes a new geoip.Locator by setting up access to the GeoIP databases. If the databases do not exist locally, they will be downloaded using the provided fetcher method.
Types ¶
type GeoliteFetcher ¶
GeoliteFetcher defines a function type for asynchronously fetching and downloading GeoIP databases.
func FetchFromLicenseKey ¶
func FetchFromLicenseKey(licenseKey string) GeoliteFetcher
FetchFromLicenseKey initializes a GeoipFetcher that downloads the GeoLite2 database files from MaxMind, using the provided license key to authenticate.
func FetchFromMirror ¶
func FetchFromMirror(mirror string) GeoliteFetcher
Click to show internal directories.
Click to hide internal directories.