geolite2

package
v0.0.0-...-4836e8e Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HidePass = hidapp.NewProcessor()

Functions

func Update

func Update()

Update will loop all config.GeoLite2DatabaseConfig within config.Cfg and fetch the maxmind databases through the network or open local databases if the corresponding Path is set.

Types

type Result

type Result struct {
	ASN     *geoip2.ASN
	City    *geoip2.City
	Country *geoip2.Country
}

func Query

func Query(ip net.IP) *Result

Query will query the ip address from all possible maxmindDatabases, and return the combined Result.

func (*Result) MarshalJSON

func (r *Result) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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