maze

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 10 Imported by: 1

README

Maze

Go Report Card Documentation

This repository contains a set of tools to get locations (reverse search) for Geo URIs, location names, and airports. Special thanks to:

Without which this tool could not exist.

Install

go get go.hacdias.com/maze@latest

Usage

Check the documentation.

Contributing

Feel free to open an issue or a pull request.

License

MIT License © Henrique Dias

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	Latitude  float64 `json:"latitude,omitempty" yaml:"latitude,omitempty" csv:"latitude"`
	Longitude float64 `json:"longitude,omitempty" yaml:"longitude,omitempty" csv:"longitude"`
	Name      string  `json:"name,omitempty" yaml:"name,omitempty" csv:"name"`
	Locality  string  `json:"locality,omitempty" yaml:"locality,omitempty" csv:"locality"`
	Region    string  `json:"region,omitempty" yaml:"region,omitempty" csv:"region"`
	Country   string  `json:"country,omitempty" yaml:"country,omitempty" csv:"country"`
	ICAO      string  `json:"icao,omitempty" yaml:"icao,omitempty" csv:"icao"`
	IATA      string  `json:"iata,omitempty" yaml:"iata,omitempty" csv:"iata"`
}

func (*Location) Distance

func (l1 *Location) Distance(l2 *Location) float64

Distance returns the distance, in meters, between l1 and l2.

type Maze

type Maze struct {
	// contains filtered or unexported fields
}

func NewMaze

func NewMaze(client *http.Client) *Maze

func (*Maze) Airport

func (l *Maze) Airport(query string) (*Location, error)

func (*Maze) Reverse

func (l *Maze) Reverse(lang string, lon, lat float64) (*Location, error)

func (*Maze) ReverseGeoURI

func (l *Maze) ReverseGeoURI(lang, geoUri string) (*Location, error)

func (*Maze) Search

func (l *Maze) Search(lang, query string) (*Location, error)

Jump to

Keyboard shortcuts

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