maxmind

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMaxmindGeoIPResolver

func NewMaxmindGeoIPResolver(opts ...Option) (networkd.IPResolver, error)

NewMaxmindGeoIPResolver returns a new IPResolver that uses the Maxmind GeoIP databases.

see: https://github.com/P3TERX/GeoLite.mmdb

Types

type Option

type Option func(m *maxmindGeoIPResolver) error

Option is a functional option for configuring the Maxmind GeoIP resolver.

func WithASNDatabase

func WithASNDatabase(path string) Option

WithASNDatabase loads the ASN database from the given path.

func WithCityDatabase

func WithCityDatabase(path string) Option

WithCityDatabase loads the city database from the given path.

func WithConnectionTypeDatabase

func WithConnectionTypeDatabase(path string) Option

WithConnectionTypeDatabase loads the Connection-Type database from the given path.

func WithCountryDatabase

func WithCountryDatabase(path string) Option

WithCountryDatabase loads the country database from the given path.

func WithDomainDatabase

func WithDomainDatabase(path string) Option

WithDomainDatabase loads the Domain database from the given path.

func WithEnterpriseDatabase

func WithEnterpriseDatabase(path string) Option

WithEnterpriseDatabase loads the Enterprise database from the given path.

func WithISPDatabase

func WithISPDatabase(path string) Option

WithISPDatabase loads the ISP database from the given path.

Jump to

Keyboard shortcuts

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