corona

package
v0.0.0-...-7075c49 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPlotterXYbyTimeline

func GetPlotterXYbyTimeline(t Timeline) plotter.XYs

func SaveCoronaImage

func SaveCoronaImage(c *Corona, image string)

Types

type Confirmed

type Confirmed struct {
	Latest   int      `json:"latest"`
	Timeline Timeline `json:"timeline"`
}

type Coordinates

type Coordinates struct {
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
}

type Corona

type Corona struct {
	Latest    Latest      `json:"latest"`
	Locations []Locations `json:"locations"`
}

func GetCoronaData

func GetCoronaData() *Corona

type CoronaQueryData

type CoronaQueryData struct {
	CountryCode string `url:"country_code"`
	Timelines   bool   `url:"timelines"`
}

type Deaths

type Deaths struct {
	Latest   int      `json:"latest"`
	Timeline Timeline `json:"timeline"`
}

type Latest

type Latest struct {
	Confirmed int `json:"confirmed"`
	Deaths    int `json:"deaths"`
	Recovered int `json:"recovered"`
}

type Locations

type Locations struct {
	Coordinates Coordinates `json:"coordinates"`
	Country     string      `json:"country"`
	CountryCode string      `json:"country_code"`
	ID          int         `json:"id"`
	LastUpdated time.Time   `json:"last_updated"`
	Latest      Latest      `json:"latest"`
	Province    string      `json:"province"`
	Timelines   Timelines   `json:"timelines"`
}

type Recovered

type Recovered struct {
	Latest   int      `json:"latest"`
	Timeline Timeline `json:"timeline"`
}

type TimeLineData

type TimeLineData struct {
	Time  time.Time
	Count int
}

type Timeline

type Timeline map[time.Time]int

type Timelines

type Timelines struct {
	Confirmed Confirmed `json:"confirmed"`
	Deaths    Deaths    `json:"deaths"`
	Recovered Recovered `json:"recovered"`
}

Jump to

Keyboard shortcuts

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