weather

package
v0.0.0-...-fa121f2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApi

func NewApi(key string, logger *log.Logger) api

Types

type Data

type Data struct {
	Coord struct {
		Lat float64 `json:"lat"`
		Lon float64 `json:"lon"`
	} `json:"coord"`
	Dt   int64 `json:"dt"`
	Main struct {
		Humidity float64 `json:"humidity"` // %
		Pressure float64 `json:"pressure"` // hPa
		Temp     float64 `json:"temp"`     // Celsius
		TempMin  float64 `json:"temp_min"` // Celsius
		TempMax  float64 `json:"temp_max"` // Celsius
	} `json:"main"`
	Name string `json:"name"`
	Sys  struct {
		Country string `json:"country"`
	} `json:"sys"`
	Weather []struct {
		Main        string `json:"main"`
		Description string `json:"description"`
	} `json:"weather"`
	Wind struct {
		Speed  float64 `json:"speed"` // m/s
		Degree float64 `json:"deg"`   // Degree
	} `json:"wind"`
}

Data contains weather results from OpenWeatherMap along with additional info

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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