iplocation

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCantResolve indicates that geoinformation couldn't be resolved for a host.
	ErrCantResolve = errors.New("can't resolve multiaddr location information")
)

Functions

This section is empty.

Types

type Location

type Location struct {
	Country   string
	Latitude  float64
	Longitude float64
}

Location contains geoinformation.

type LocationResolver

type LocationResolver interface {
	Resolve(mas []multiaddr.Multiaddr) (Location, error)
}

LocationResolver resolver gets location information from a set of multiaddresses of a single host.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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