geoip

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB holds the DB reader

func New

func New(dbpath string) (DB, error)

New creates a new DB reader based on the mmdb path

func (DB) CountryCode

func (g DB) CountryCode(ip net.IP) (string, error)

CountryCode returns the ISO country code of the target IP

func (DB) HasDB

func (g DB) HasDB() bool

HasDB returns true when the DB was configured properly

Jump to

Keyboard shortcuts

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