mmdb

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFromBytes

func LoadFromBytes(buffer []byte)

func ReloadASN added in v1.18.2

func ReloadASN()

func ReloadIP added in v1.18.2

func ReloadIP()

func Verify

func Verify(path string) bool

Types

type ASNReader added in v1.18.2

type ASNReader struct {
	*maxminddb.Reader
}

func ASNInstance added in v1.18.2

func ASNInstance() ASNReader

func (ASNReader) LookupASN added in v1.18.2

func (r ASNReader) LookupASN(ip net.IP) (string, string)

type GeoLite2 added in v1.19.0

type GeoLite2 struct {
	AutonomousSystemNumber       uint32 `maxminddb:"autonomous_system_number"`
	AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"`
}

type IPInfo added in v1.19.0

type IPInfo struct {
	ASN  string `maxminddb:"asn"`
	Name string `maxminddb:"name"`
}

type IPReader added in v1.18.2

type IPReader struct {
	*maxminddb.Reader
	// contains filtered or unexported fields
}

func IPInstance added in v1.18.2

func IPInstance() IPReader

func (IPReader) LookupCode added in v1.18.2

func (r IPReader) LookupCode(ipAddress net.IP) []string

Jump to

Keyboard shortcuts

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