locator

package
v0.0.0-...-cb310a5 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetLocation gets the location for the given ip
	GetLocation(ctx context.Context, ip string) (*WorldLocation, error)
}

Client is a client for the locator service.

func New

func New(cc *grpc.ClientConn) Client

New instantiates a new locator service client.

type WorldLocation

type WorldLocation struct {
	// Lat is the latitude of the location.
	Lat float64
	// Long is the longitude of the location.
	Long float64
	// City is the city of the location.
	City string
	// Region is the region/state of the location.
	Region string
	// Country is the country of the location.
	Country string
}

WorldLocation represents the location for the given IP address.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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