location

package
v0.0.0-...-e7fbf99 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: GPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Geoname

type Geoname struct {
	GeonameID   int    `json:"geonameId"`
	CountryID   string `json:"countryId"`
	ToponymName string `json:"toponymName"`
	Population  int    `json:"population"`
	CountryCode string `json:"countryCode"`
	Name        string `json:"name"`
	CountryName string `json:"countryName"`
	Lat         string `json:"lat"`
	Lng         string `json:"lng"`
}

Geoname : location geonames struct

type LocationResultData

type LocationResultData struct {
	ResultCount int       `json:"totalResultsCount"`
	Geonames    []Geoname `json:"geonames"`
}

LocationResultData : location struct

func New

func New(user string, locationName string) (result LocationResultData, err error)

New creates and returns location struct

func (LocationResultData) GetCoordinates

func (l LocationResultData) GetCoordinates() (string, string)

GetCoordinates returns latitude and longitude

Jump to

Keyboard shortcuts

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