lookup

package
v0.0.0-...-1186e62 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: GPL-2.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FUNC = FUNC_MAPPING[cnf.DB_TYPE].(map[string]interface{})
View Source
var FUNC_MAPPING = map[uint8]interface{}{
	cnf.DB_TYPE_IPINFO: map[string]interface{}{
		"country_asn": IpInfoCountryAsn,
		"country":     IpInfoCountry,
		"city":        IpInfoCity,
		"asn":         IpInfoAsn,
		"privacy":     IpInfoPrivacy,
	},
	cnf.DB_TYPE_MAXMIND: map[string]interface{}{
		"country_asn": nil,
		"country":     MaxMindCountry,
		"city":        MaxMindCity,
		"asn":         MaxMindAsn,
		"privacy":     MaxMindPrivacy,
	},
}

Functions

func IpInfoAsn

func IpInfoAsn(ip net.IP) (interface{}, error)

func IpInfoCity

func IpInfoCity(ip net.IP) (interface{}, error)

func IpInfoCountry

func IpInfoCountry(ip net.IP) (interface{}, error)

func IpInfoCountryAsn

func IpInfoCountryAsn(ip net.IP) (interface{}, error)

func IpInfoPrivacy

func IpInfoPrivacy(ip net.IP) (interface{}, error)

func MaxMindAsn

func MaxMindAsn(ip net.IP) (interface{}, error)

func MaxMindCity

func MaxMindCity(ip net.IP) (interface{}, error)

func MaxMindCountry

func MaxMindCountry(ip net.IP) (interface{}, error)

func MaxMindPrivacy

func MaxMindPrivacy(ip net.IP) (interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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