geo

package
v0.0.0-...-d84665c Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN struct {
	AutonomousSystemNumber       uint
	AutonomousSystemOrganization string
}

type City

type City struct {
	Name       string
	Latitude   float64
	Longitude  float64
	PostalCode string
	Timezone   string
	MetroCode  uint
	RegionName string
	RegionCode string
}

type Country

type Country struct {
	Name string
	ISO  string
	IsEU *bool
}

type Reader

type Reader interface {
	Country(net.IP) (Country, error)
	City(net.IP) (City, error)
	ASN(net.IP) (ASN, error)
	IsEmpty() bool
}

func Open

func Open(countryDB, cityDB string, asnDB string) (Reader, error)

Jump to

Keyboard shortcuts

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