worldometer

package
v0.0.0-...-2369477 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountryStats

type CountryStats struct {
	Country             string        `json:"country"`
	CountryInfo         jsons.Country `json:"country_info"`
	TotalCases          int           `json:"total_cases"`
	NewCases            int           `json:"new_cases"`
	TotalDeaths         int           `json:"total_deaths"`
	NewDeaths           int           `json:"new_deaths"`
	TotalRecovered      int           `json:"total_recovered"`
	ActiveCases         int           `json:"active_cases"`
	SeriousCritical     int           `json:"serious_critical"`
	CasesPerOneMillion  float64       `json:"cases_per_one_million"`
	DeathsPerOneMillion float64       `json:"deaths_per_one_million"`
	TotalTests          int           `json:"total_tests"`
	TestsPerOneMillion  float64       `json:"tests_per_one_million"`
}

CountryStats struct

type Service

type Service interface {
	GetCountriesData() (*[]CountryStats, error)
	GetStatesData() (*[]StatesStats, error)
	FindCountry(string) (*CountryStats, error)
	FindState(string) (*StatesStats, error)
}

Service interface

func NewService

func NewService(h http.Client, countries jsons.CountryList, states jsons.States) Service

NewService create new service

type StateInfo

type StateInfo struct {
	Name         string `json:"name"`
	Abbreviation string `json:"abbreviation"`
}

StateInfo struct

type StatesStats

type StatesStats struct {
	State               string    `json:"state"`
	StateInfo           StateInfo `json:"state_info"`
	TotalCases          int       `json:"total_cases"`
	NewCases            int       `json:"new_cases"`
	TotalDeaths         int       `json:"total_deaths"`
	NewDeaths           int       `json:"new_deaths"`
	TotalRecovered      int       `json:"total_recovered"`
	ActiveCases         int       `json:"active_cases"`
	SeriousCritical     int       `json:"serious_critical"`
	CasesPerOneMillion  float64   `json:"cases_per_one_million"`
	DeathsPerOneMillion float64   `json:"deaths_per_one_million"`
	TotalTests          int       `json:"total_tests"`
	TestsPerOneMillion  float64   `json:"tests_per_one_million"`
}

StatesStats struct

Jump to

Keyboard shortcuts

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