Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxRetries = maxRetries
Functions ¶
This section is empty.
Types ¶
type Backfiller ¶
type Backfiller struct { Client CovidGetter Store CovidStoreAdder }
Backfiller retrieves historic COVID19 data and adds it to the database
func New ¶ added in v1.0.0
func New(store CovidStoreAdder) *Backfiller
New creates a new Backfiller object
func (*Backfiller) Run ¶
func (b *Backfiller) Run() error
Run the backfiller. Get all supported countries from the API Then add any historical record that is older than the first record in the DB
type Client ¶ added in v1.3.3
type Client struct {
URL string
}
func (Client) GetCountries ¶ added in v1.3.3
func (Client) GetHistoricalData ¶ added in v1.3.3
func (c Client) GetHistoricalData(slug string) ([]CountryData, error)
type CountryData ¶ added in v1.3.3
type CovidGetter ¶ added in v1.3.3
type CovidGetter interface { GetCountries() (Countries, error) GetHistoricalData(string) ([]CountryData, error) }
type CovidStoreAdder ¶ added in v1.3.3
type CovidStoreAdder interface {
Add([]models.CountryEntry) error
}
Click to show internal directories.
Click to hide internal directories.