geoip

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoIP

type GeoIP struct {
	// contains filtered or unexported fields
}

GeoIP is an instance of GeoIP look up object

func New

func New(countryDB string) (g *GeoIP, err error)

New returns an instance of GeoIP

func (*GeoIP) LookupCountry

func (g *GeoIP) LookupCountry(ip net.IP) (name string, err error)

LookupCountry looks up country in a geoip db

func (*GeoIP) Metadata

func (g *GeoIP) Metadata() maxminddb.Metadata

Metadata returns maxmind metadata

Jump to

Keyboard shortcuts

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