location

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(lat1, lon1, lat2, lon2 float64) float64

func HTTPLocationCodesfromHandler

func HTTPLocationCodesfromHandler(w http.ResponseWriter, r *http.Request)

func HTTPLocationQueryHandler

func HTTPLocationQueryHandler(w http.ResponseWriter, r *http.Request)

func RunLocationService

func RunLocationService(log *roggy.LogPrinter)

Types

type Location

type Location struct {
	Country string `json:"cou"`
	ZipCode string `json:"zip"`
	Address string `json:"add"`
	X       string `json:"x"`
	Y       string `json:"y"`
}

func InitializeLocationService

func InitializeLocationService(log *roggy.LogPrinter) []Location

type LocationDistance

type LocationDistance struct {
	Loc  Location `json:"location"`
	Dist float64  `json:"distance"`
}

Jump to

Keyboard shortcuts

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