maxmindfile

package
v0.0.0-...-202847b Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package maxmindfile provides an OptionFactoryFunc for the backendgeopip package.

https://www.maxmind.com/en/geoip2-services-and-databases

Index

Constants

View Source
const OptionName = `file`

OptionName identifies this package within the register of the backendgeoip.Configuration type.

Variables

This section is empty.

Functions

func NewOptionFactory

func NewOptionFactory(maxmindLocalFile cfgmodel.Str) (optionName string, _ geoip.OptionFactoryFunc)

NewOptionFactory specifies the file on the server to retrieve geo information. Alternatively you can choose the MaxMind web service via package maxmind.NewOptionFactoryWebservice(). This function will be triggered when you choose in backendgeoip.Configuration.DataSource the value `file`.

func WithCountryFinder

func WithCountryFinder(filename string) geoip.Option

WithCountryFinder creates a new GeoIP2.Reader which reads the geo information from a file stored on the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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