lib

package
v0.0.0-...-5f1485e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL    *url.URL
	HTTPClient *http.Client
}

func NewClient

func NewClient() (*Client, error)

func (*Client) GetCountries

func (client *Client) GetCountries() ([]Country, error)

type Country

type Country struct {
	Name                string  `json:"country"`
	Cases               int     `json:"cases"`
	TodayCases          int     `json:"todayCases"`
	Deaths              int     `json:"deaths"`
	TodayDeaths         int     `json:"todayDeaths"`
	Recovere            int     `json:"recovered"`
	Active              int     `json:"active"`
	Critical            int     `json:"critical"`
	CasesPerOneMission  float32 `json:"casesPerOneMillion"`
	DeathsPerOneMillion float32 `json:"deathsPerOneMillion"`
}

func (*Country) String

func (country *Country) String() string

func (*Country) ToJSON

func (country *Country) ToJSON() string

Jump to

Keyboard shortcuts

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