geoip

package
v0.0.0-...-ca83848 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDB

func OpenDB(cityDBFile string, asnDBFile string)

OpenDB opens the geoip2 databases

Types

type AS

type AS struct {
	Number uint
	Name   string
}

AS contains the Geoip2 AS data

func ASNByIP

func ASNByIP(ipAddr string) *AS

ASNByIP returns the corresponding AS data

type Location

type Location struct {
	CountryCode string
	City        string
}

Location contains the Geoip2 Location data

func LocationByIP

func LocationByIP(ipAddr string) *Location

LocationByIP returns the corresponding Location data

Jump to

Keyboard shortcuts

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