Documentation ¶
Overview ¶
Package maxmindfile provides an OptionFactoryFunc for the backendgeopip package.
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 ¶
WithCountryFinder creates a new GeoIP2.Reader which reads the geo information from a file stored on the server.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.