mmdb

package
v1.18.7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPreader  IPReader
	ASNreader ASNReader
	IPonce    sync.Once
	ASNonce   sync.Once
)

Functions

func DownloadASN added in v1.18.2

func DownloadASN(path string) (err error)

func DownloadMMDB

func DownloadMMDB(path string) (err error)

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) ASNResult

type ASNResult added in v1.18.2

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

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