loctools

package
v3.0.1-0...-781ade8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocTools

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

func NewLocTools

func NewLocTools(client *http.Client) *LocTools

func (*LocTools) Airport

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

func (*LocTools) FromGeoURI

func (l *LocTools) FromGeoURI(lang, geouri string) (*Location, error)

func (*LocTools) Reverse

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

func (*LocTools) Search

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

type Location

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

Jump to

Keyboard shortcuts

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