repo

package
v0.0.0-...-3b72d5c Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DateFormat = "2006-01-02"

Variables

This section is empty.

Functions

This section is empty.

Types

type Countries

type Countries interface {
	Info() RecordInfo
	Entries() map[string]Country
}

type Country

type Country interface {
	Info() RecordInfo
	CountryCode() string
	CountryName() string
	Dates() map[time.Time]RecordInfo
	Add(rec *readers.Record)
}

type RecordInfo

type RecordInfo interface {
	ConfirmedCases() int
	PositiveRate() float64
	Path() string
	Add(r *readers.Record)
}

type Repo

type Repo interface {
	Countries() map[string]Country
	// country(code string) string
	CountryDates(code string) map[time.Time]RecordInfo
	CountryDate(code string, date time.Time) RecordInfo
	Fetch() error
	Watch(period time.Duration)
}

Repo retrieve all statistics

func NewRepo

func NewRepo(factory readers.Factory) Repo

Jump to

Keyboard shortcuts

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