Documentation ¶
Index ¶
- Constants
- Variables
- type Case
- type Cases
- type DoseType
- type Hospitalisation
- type Hospitalisations
- type Mortalities
- type Mortality
- type SummaryColumn
- type TestResult
- type TestResults
- type TimeStamp
- type Vaccination
- type Vaccinations
- func (v Vaccinations) Categorize() *tabulator.Tabulator
- 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 ¶
const BaseURL = "https://epistat.sciensano.be"
Variables ¶
var Routes = map[string]string{
"cases": "/Data/COVID19BE_CASES_AGESEX.json",
"hospitalisations": "/Data/COVID19BE_HOSP.json",
"mortalities": "/Data/COVID19BE_MORT.json",
"testResults": "/Data/COVID19BE_tests.json",
"vaccinations": "/Data/COVID19BE_VACC.json",
}
Functions ¶
This section is empty.
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: first, full, singledose, 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 )
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) 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) Categorize ¶
func (v Vaccinations) Categorize() *tabulator.Tabulator
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