Documentation ¶
Index ¶
- Variables
- func CasesValidSummaryModes() set.Set[SummaryColumn]
- func GetURL(base string, endpoint Endpoint) (string, error)
- func HospitalisationsValidSummaryModes() set.Set[SummaryColumn]
- func MortalitiesValidSummaryModes() set.Set[SummaryColumn]
- func MustGetURL(base string, endpoint Endpoint) string
- func TestResultsValidSummaryModes() set.Set[SummaryColumn]
- func VaccinationsValidSummaryModes() set.Set[SummaryColumn]
- type Case
- type Cases
- type DoseType
- type Endpoint
- type Fetcher
- type Hospitalisation
- type Hospitalisations
- type Mortalities
- type Mortality
- type SummaryColumn
- type TestResult
- type TestResults
- type TimeStamp
- type Vaccination
- type Vaccinations
- func (v Vaccinations) MarshalEasyJSON(w *jwriter.Writer)
- func (v Vaccinations) MarshalJSON() ([]byte, error)
- func (v Vaccinations) Summarize(summaryColumn SummaryColumn) (*tabulator.Tabulator, error)
- func (v *Vaccinations) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Vaccinations) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var DoseTypeNames map[string]DoseType
var SummaryColumnNames map[string]SummaryColumn
Functions ¶
func CasesValidSummaryModes ¶
func CasesValidSummaryModes() set.Set[SummaryColumn]
func HospitalisationsValidSummaryModes ¶
func HospitalisationsValidSummaryModes() set.Set[SummaryColumn]
func MortalitiesValidSummaryModes ¶
func MortalitiesValidSummaryModes() set.Set[SummaryColumn]
func MustGetURL ¶
func TestResultsValidSummaryModes ¶
func TestResultsValidSummaryModes() set.Set[SummaryColumn]
func VaccinationsValidSummaryModes ¶
func VaccinationsValidSummaryModes() set.Set[SummaryColumn]
Types ¶
type Case ¶
type Case struct { TimeStamp TimeStamp `json:"DATE"` Province string `json:"PROVINCE"` Region string `json:"REGION"` AgeGroup string `json:"AGEGROUP"` Cases int `json:"CASES"` }
func (Case) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Case) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Case) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Case) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Cases ¶
type Cases []Case
func (Cases) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Cases) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Cases) Summarize ¶
func (cs Cases) Summarize(summaryColumn SummaryColumn) (*tabulator.Tabulator, error)
func (*Cases) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Cases) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type DoseType ¶
type DoseType int
DoseType is the type of vaccination: partial, full, single dose, booster, etc.
func (DoseType) MarshalJSON ¶
func (*DoseType) UnmarshalJSON ¶
type Hospitalisation ¶
type Hospitalisations ¶
type Hospitalisations []Hospitalisation
func (Hospitalisations) Categorize ¶
func (h Hospitalisations) Categorize() *tabulator.Tabulator
func (Hospitalisations) Summarize ¶
func (h Hospitalisations) Summarize(summaryColumn SummaryColumn) (*tabulator.Tabulator, error)
type Mortalities ¶
type Mortalities []Mortality
func (Mortalities) Summarize ¶
func (m Mortalities) Summarize(summaryColumn SummaryColumn) (*tabulator.Tabulator, error)
type SummaryColumn ¶
type SummaryColumn int
const ( Total SummaryColumn = iota ByRegion ByProvince ByAgeGroup ByManufacturer ByVaccinationType ByCategory )
func (SummaryColumn) String ¶
func (s SummaryColumn) String() string
type TestResult ¶
type TestResults ¶
type TestResults []TestResult
func (TestResults) Categorize ¶
func (r TestResults) Categorize() *tabulator.Tabulator
func (TestResults) Summarize ¶
func (r TestResults) Summarize(summaryColumn SummaryColumn) (*tabulator.Tabulator, error)
type TimeStamp ¶
TimeStamp represents a timestamp in the API response. Needed for parsing purposes
func (*TimeStamp) MarshalJSON ¶
MarshalJSON marshals a TimeStamp to JSON
func (*TimeStamp) UnmarshalJSON ¶
UnmarshalJSON unmarshals a TimeStamp from the API responder.
type Vaccination ¶
type Vaccination struct { TimeStamp TimeStamp `json:"DATE"` Manufacturer string `json:"BRAND"` Region string `json:"REGION"` AgeGroup string `json:"AGEGROUP"` Gender string `json:"SEX"` Dose DoseType `json:"DOSE"` Count int `json:"COUNT"` }
func (Vaccination) GetSummaryColumnName ¶
func (v Vaccination) GetSummaryColumnName(column SummaryColumn) (string, error)
func (Vaccination) MarshalEasyJSON ¶
func (v Vaccination) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (Vaccination) MarshalJSON ¶
func (v Vaccination) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*Vaccination) UnmarshalEasyJSON ¶
func (v *Vaccination) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Vaccination) UnmarshalJSON ¶
func (v *Vaccination) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Vaccinations ¶
type Vaccinations []Vaccination
func (Vaccinations) MarshalEasyJSON ¶
func (v Vaccinations) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (Vaccinations) MarshalJSON ¶
func (v Vaccinations) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (Vaccinations) Summarize ¶
func (v Vaccinations) Summarize(summaryColumn SummaryColumn) (*tabulator.Tabulator, error)
func (*Vaccinations) UnmarshalEasyJSON ¶
func (v *Vaccinations) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Vaccinations) UnmarshalJSON ¶
func (v *Vaccinations) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface