geoip

package
v0.0.0-...-119eded Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is a wrapper around the GeoIP2 database

func New

func New(path string) (*Database, error)

New opens a GeoIP database

func (*Database) City

func (db *Database) City(ip net.IP) (isocode string, city string, err error)

City looks up ISO code and City by IP address

func (*Database) Close

func (db *Database) Close() error

Close closes the database

Jump to

Keyboard shortcuts

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