geo

package
v0.0.0-...-4071b33 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Init initialises the GeoIP lookup service.

Types

type Data

type Data struct {
	City        string
	Country     string
	CountryCode string
	Lat         float64
	Long        float64
}

Data represents a result of a GeoIP lookup.

func Lookup

func Lookup(addr string) (*Data, error)

Lookup performs a GeoIP lookup on the given IP address.

func LookupSelf

func LookupSelf() (*Data, string, error)

LookupSelf performs a GeoIP lookup on public IP address of this node.

Jump to

Keyboard shortcuts

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