Documentation ¶
Index ¶
- type APICasesResponse
- type APICasesResponseEntry
- func (v APICasesResponseEntry) GetAttributeNames() []string
- func (v APICasesResponseEntry) GetAttributeValues() (values []float64)
- func (v APICasesResponseEntry) GetGroupFieldValue(groupField int) (value string)
- func (v APICasesResponseEntry) GetTimestamp() time.Time
- func (v APICasesResponseEntry) GetTotalValue() float64
- func (v APICasesResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
- func (v APICasesResponseEntry) MarshalJSON() ([]byte, error)
- func (v *APICasesResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *APICasesResponseEntry) UnmarshalJSON(data []byte) error
- type APIHospitalisationsResponse
- type APIHospitalisationsResponseEntry
- func (v APIHospitalisationsResponseEntry) GetAttributeNames() []string
- func (v APIHospitalisationsResponseEntry) GetAttributeValues() (values []float64)
- func (v APIHospitalisationsResponseEntry) GetGroupFieldValue(groupField int) (value string)
- func (v APIHospitalisationsResponseEntry) GetTimestamp() time.Time
- func (v APIHospitalisationsResponseEntry) GetTotalValue() float64
- func (v APIHospitalisationsResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
- func (v APIHospitalisationsResponseEntry) MarshalJSON() ([]byte, error)
- func (v *APIHospitalisationsResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *APIHospitalisationsResponseEntry) UnmarshalJSON(data []byte) error
- type APIMortalityResponse
- type APIMortalityResponseEntry
- func (v APIMortalityResponseEntry) GetAttributeNames() []string
- func (v APIMortalityResponseEntry) GetAttributeValues() (values []float64)
- func (v APIMortalityResponseEntry) GetGroupFieldValue(groupField int) (value string)
- func (v APIMortalityResponseEntry) GetTimestamp() time.Time
- func (v APIMortalityResponseEntry) GetTotalValue() float64
- func (v APIMortalityResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
- func (v APIMortalityResponseEntry) MarshalJSON() ([]byte, error)
- func (v *APIMortalityResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *APIMortalityResponseEntry) UnmarshalJSON(data []byte) error
- type APITestResultsResponse
- type APITestResultsResponseEntry
- func (v APITestResultsResponseEntry) GetAttributeNames() []string
- func (v APITestResultsResponseEntry) GetAttributeValues() (values []float64)
- func (v APITestResultsResponseEntry) GetGroupFieldValue(groupField int) (value string)
- func (v APITestResultsResponseEntry) GetTimestamp() time.Time
- func (v APITestResultsResponseEntry) GetTotalValue() float64
- func (v APITestResultsResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
- func (v APITestResultsResponseEntry) MarshalJSON() ([]byte, error)
- func (v *APITestResultsResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *APITestResultsResponseEntry) UnmarshalJSON(data []byte) error
- type APIVaccinationsResponse
- type APIVaccinationsResponseEntry
- func (v APIVaccinationsResponseEntry) GetAttributeNames() []string
- func (v APIVaccinationsResponseEntry) GetAttributeValues() (values []float64)
- func (v *APIVaccinationsResponseEntry) GetGroupFieldValue(groupField int) (value string)
- func (v *APIVaccinationsResponseEntry) GetTimestamp() time.Time
- func (v APIVaccinationsResponseEntry) GetTotalValue() float64
- func (v APIVaccinationsResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
- func (v APIVaccinationsResponseEntry) MarshalJSON() ([]byte, error)
- func (v *APIVaccinationsResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *APIVaccinationsResponseEntry) UnmarshalJSON(data []byte) error
- type Client
- func (client *Client) GetCases(ctx context.Context) (results []measurement.Measurement, err error)
- func (client *Client) GetHospitalisations(ctx context.Context) (results []measurement.Measurement, err error)
- func (client *Client) GetMortality(ctx context.Context) (results []measurement.Measurement, err error)
- func (client *Client) GetTestResults(ctx context.Context) (results []measurement.Measurement, err error)
- func (client *Client) GetVaccinations(ctx context.Context) (results []measurement.Measurement, err error)
- func (client *Client) Update(ctx context.Context) (entries map[string][]measurement.Measurement, err error)
- type Getter
- type TimeStamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICasesResponse ¶
type APICasesResponse []*APICasesResponseEntry
APICasesResponse is the response of the Sciensano cases API
func (APICasesResponse) MarshalEasyJSON ¶
func (v APICasesResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APICasesResponse) MarshalJSON ¶
func (v APICasesResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APICasesResponse) UnmarshalEasyJSON ¶
func (v *APICasesResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APICasesResponse) UnmarshalJSON ¶
func (v *APICasesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APICasesResponseEntry ¶
type APICasesResponseEntry struct { TimeStamp TimeStamp `json:"DATE"` Province string `json:"PROVINCE"` Region string `json:"REGION"` AgeGroup string `json:"AGEGROUP"` Cases int `json:"CASES"` }
APICasesResponseEntry is a single entry in APICasesResponse
func (APICasesResponseEntry) GetAttributeNames ¶
func (v APICasesResponseEntry) GetAttributeNames() []string
GetAttributeNames returns the names of the types of vaccinations
func (APICasesResponseEntry) GetAttributeValues ¶
func (v APICasesResponseEntry) GetAttributeValues() (values []float64)
GetAttributeValues gets the value for each supported type of vaccination
func (APICasesResponseEntry) GetGroupFieldValue ¶
func (v APICasesResponseEntry) GetGroupFieldValue(groupField int) (value string)
GetGroupFieldValue returns the value of the specified entry's field
func (APICasesResponseEntry) GetTimestamp ¶
func (v APICasesResponseEntry) GetTimestamp() time.Time
GetTimestamp returns the entry's timestamp
func (APICasesResponseEntry) GetTotalValue ¶
func (v APICasesResponseEntry) GetTotalValue() float64
GetTotalValue returns the entry's total number of vaccinations
func (APICasesResponseEntry) MarshalEasyJSON ¶
func (v APICasesResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APICasesResponseEntry) MarshalJSON ¶
func (v APICasesResponseEntry) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APICasesResponseEntry) UnmarshalEasyJSON ¶
func (v *APICasesResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APICasesResponseEntry) UnmarshalJSON ¶
func (v *APICasesResponseEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APIHospitalisationsResponse ¶
type APIHospitalisationsResponse []*APIHospitalisationsResponseEntry
APIHospitalisationsResponse is the response of the Sciensano hospitalisations API
func (APIHospitalisationsResponse) MarshalEasyJSON ¶
func (v APIHospitalisationsResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIHospitalisationsResponse) MarshalJSON ¶
func (v APIHospitalisationsResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APIHospitalisationsResponse) UnmarshalEasyJSON ¶
func (v *APIHospitalisationsResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIHospitalisationsResponse) UnmarshalJSON ¶
func (v *APIHospitalisationsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APIHospitalisationsResponseEntry ¶
type APIHospitalisationsResponseEntry struct { TimeStamp TimeStamp `json:"DATE"` Province string `json:"PROVINCE"` Region string `json:"REGION"` TotalIn int `json:"TOTAL_IN"` TotalInICU int `json:"TOTAL_IN_ICU"` TotalInResp int `json:"TOTAL_IN_RESP"` TotalInECMO int `json:"TOTAL_IN_ECMO"` }
APIHospitalisationsResponseEntry is a single entry in APIHospitalisationsResponse
func (APIHospitalisationsResponseEntry) GetAttributeNames ¶
func (v APIHospitalisationsResponseEntry) GetAttributeNames() []string
GetAttributeNames returns the names of the types of vaccinations
func (APIHospitalisationsResponseEntry) GetAttributeValues ¶
func (v APIHospitalisationsResponseEntry) GetAttributeValues() (values []float64)
GetAttributeValues gets the value for each supported type of vaccination
func (APIHospitalisationsResponseEntry) GetGroupFieldValue ¶
func (v APIHospitalisationsResponseEntry) GetGroupFieldValue(groupField int) (value string)
GetGroupFieldValue returns the value of the specified entry's field
func (APIHospitalisationsResponseEntry) GetTimestamp ¶
func (v APIHospitalisationsResponseEntry) GetTimestamp() time.Time
GetTimestamp returns the entry's timestamp
func (APIHospitalisationsResponseEntry) GetTotalValue ¶
func (v APIHospitalisationsResponseEntry) GetTotalValue() float64
GetTotalValue returns the entry's total number of vaccinations
func (APIHospitalisationsResponseEntry) MarshalEasyJSON ¶
func (v APIHospitalisationsResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIHospitalisationsResponseEntry) MarshalJSON ¶
func (v APIHospitalisationsResponseEntry) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APIHospitalisationsResponseEntry) UnmarshalEasyJSON ¶
func (v *APIHospitalisationsResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIHospitalisationsResponseEntry) UnmarshalJSON ¶
func (v *APIHospitalisationsResponseEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APIMortalityResponse ¶
type APIMortalityResponse []*APIMortalityResponseEntry
APIMortalityResponse is the response of the Sciensano cases API
func (APIMortalityResponse) MarshalEasyJSON ¶
func (v APIMortalityResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIMortalityResponse) MarshalJSON ¶
func (v APIMortalityResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APIMortalityResponse) UnmarshalEasyJSON ¶
func (v *APIMortalityResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIMortalityResponse) UnmarshalJSON ¶
func (v *APIMortalityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APIMortalityResponseEntry ¶
type APIMortalityResponseEntry struct { TimeStamp TimeStamp `json:"DATE"` Region string `json:"REGION"` AgeGroup string `json:"AGEGROUP"` Deaths int `json:"DEATHS"` }
APIMortalityResponseEntry is a single entry in APIMortalityResponse
func (APIMortalityResponseEntry) GetAttributeNames ¶
func (v APIMortalityResponseEntry) GetAttributeNames() []string
GetAttributeNames returns the names of the types of vaccinations
func (APIMortalityResponseEntry) GetAttributeValues ¶
func (v APIMortalityResponseEntry) GetAttributeValues() (values []float64)
GetAttributeValues gets the value for each supported type of vaccination
func (APIMortalityResponseEntry) GetGroupFieldValue ¶
func (v APIMortalityResponseEntry) GetGroupFieldValue(groupField int) (value string)
GetGroupFieldValue returns the value of the specified entry's field
func (APIMortalityResponseEntry) GetTimestamp ¶
func (v APIMortalityResponseEntry) GetTimestamp() time.Time
GetTimestamp returns the entry's timestamp
func (APIMortalityResponseEntry) GetTotalValue ¶
func (v APIMortalityResponseEntry) GetTotalValue() float64
GetTotalValue returns the entry's total number of vaccinations
func (APIMortalityResponseEntry) MarshalEasyJSON ¶
func (v APIMortalityResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIMortalityResponseEntry) MarshalJSON ¶
func (v APIMortalityResponseEntry) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APIMortalityResponseEntry) UnmarshalEasyJSON ¶
func (v *APIMortalityResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIMortalityResponseEntry) UnmarshalJSON ¶
func (v *APIMortalityResponseEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APITestResultsResponse ¶
type APITestResultsResponse []*APITestResultsResponseEntry
APITestResultsResponse is the response of the Sciensano test results API
func (APITestResultsResponse) MarshalEasyJSON ¶
func (v APITestResultsResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APITestResultsResponse) MarshalJSON ¶
func (v APITestResultsResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APITestResultsResponse) UnmarshalEasyJSON ¶
func (v *APITestResultsResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APITestResultsResponse) UnmarshalJSON ¶
func (v *APITestResultsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APITestResultsResponseEntry ¶
type APITestResultsResponseEntry struct { TimeStamp TimeStamp `json:"DATE"` Province string `json:"PROVINCE"` Region string `json:"REGION"` Total int `json:"TESTS_ALL"` Positive int `json:"TESTS_ALL_POS"` }
APITestResultsResponseEntry is a single entry in APITestResultsResponse
func (APITestResultsResponseEntry) GetAttributeNames ¶
func (v APITestResultsResponseEntry) GetAttributeNames() []string
GetAttributeNames returns the names of the types of vaccinations
func (APITestResultsResponseEntry) GetAttributeValues ¶
func (v APITestResultsResponseEntry) GetAttributeValues() (values []float64)
GetAttributeValues gets the value for each supported type of vaccination
func (APITestResultsResponseEntry) GetGroupFieldValue ¶
func (v APITestResultsResponseEntry) GetGroupFieldValue(groupField int) (value string)
GetGroupFieldValue returns the value of the specified entry's field
func (APITestResultsResponseEntry) GetTimestamp ¶
func (v APITestResultsResponseEntry) GetTimestamp() time.Time
GetTimestamp returns the entry's timestamp
func (APITestResultsResponseEntry) GetTotalValue ¶
func (v APITestResultsResponseEntry) GetTotalValue() float64
GetTotalValue returns the entry's total number of vaccinations
func (APITestResultsResponseEntry) MarshalEasyJSON ¶
func (v APITestResultsResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APITestResultsResponseEntry) MarshalJSON ¶
func (v APITestResultsResponseEntry) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APITestResultsResponseEntry) UnmarshalEasyJSON ¶
func (v *APITestResultsResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APITestResultsResponseEntry) UnmarshalJSON ¶
func (v *APITestResultsResponseEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APIVaccinationsResponse ¶
type APIVaccinationsResponse []*APIVaccinationsResponseEntry
APIVaccinationsResponse is the response of the Sciensano vaccinations API
func (APIVaccinationsResponse) MarshalEasyJSON ¶
func (v APIVaccinationsResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIVaccinationsResponse) MarshalJSON ¶
func (v APIVaccinationsResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APIVaccinationsResponse) UnmarshalEasyJSON ¶
func (v *APIVaccinationsResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIVaccinationsResponse) UnmarshalJSON ¶
func (v *APIVaccinationsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type APIVaccinationsResponseEntry ¶
type APIVaccinationsResponseEntry struct { TimeStamp TimeStamp `json:"DATE"` Region string `json:"REGION"` AgeGroup string `json:"AGEGROUP"` Gender string `json:"SEX"` Dose string `json:"DOSE"` Count int `json:"COUNT"` }
APIVaccinationsResponseEntry is a single entry in APIVaccinationResponse
func (APIVaccinationsResponseEntry) GetAttributeNames ¶
func (v APIVaccinationsResponseEntry) GetAttributeNames() []string
GetAttributeNames returns the names of the types of vaccinations
func (APIVaccinationsResponseEntry) GetAttributeValues ¶
func (v APIVaccinationsResponseEntry) GetAttributeValues() (values []float64)
GetAttributeValues gets the value for each supported type of vaccination
func (*APIVaccinationsResponseEntry) GetGroupFieldValue ¶
func (v *APIVaccinationsResponseEntry) GetGroupFieldValue(groupField int) (value string)
GetGroupFieldValue returns the value of the specified entry's field
func (*APIVaccinationsResponseEntry) GetTimestamp ¶
func (v *APIVaccinationsResponseEntry) GetTimestamp() time.Time
GetTimestamp returns the entry's timestamp
func (APIVaccinationsResponseEntry) GetTotalValue ¶
func (v APIVaccinationsResponseEntry) GetTotalValue() float64
GetTotalValue returns the entry's total number of vaccinations
func (APIVaccinationsResponseEntry) MarshalEasyJSON ¶
func (v APIVaccinationsResponseEntry) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (APIVaccinationsResponseEntry) MarshalJSON ¶
func (v APIVaccinationsResponseEntry) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*APIVaccinationsResponseEntry) UnmarshalEasyJSON ¶
func (v *APIVaccinationsResponseEntry) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*APIVaccinationsResponseEntry) UnmarshalJSON ¶
func (v *APIVaccinationsResponseEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Client ¶
Client calls the different Sciensano APIs
func (*Client) GetCases ¶
func (client *Client) GetCases(ctx context.Context) (results []measurement.Measurement, err error)
GetCases retrieves all recorded COVID-19 cases
func (*Client) GetHospitalisations ¶
func (client *Client) GetHospitalisations(ctx context.Context) (results []measurement.Measurement, err error)
GetHospitalisations retrieves all recorded COVID-19 cases
func (*Client) GetMortality ¶
func (client *Client) GetMortality(ctx context.Context) (results []measurement.Measurement, err error)
GetMortality retrieves all recorded COVID-19 mortality figures
func (*Client) GetTestResults ¶
func (client *Client) GetTestResults(ctx context.Context) (results []measurement.Measurement, err error)
GetTestResults retrieves all COVID-19 test results.
func (*Client) GetVaccinations ¶
func (client *Client) GetVaccinations(ctx context.Context) (results []measurement.Measurement, err error)
GetVaccinations retrieves all COVID-19 vaccinations.
func (*Client) Update ¶
func (client *Client) Update(ctx context.Context) (entries map[string][]measurement.Measurement, err error)
Update calls all endpoints and returns this to the caller. This is used by a cache to refresh its content
type Getter ¶
type Getter interface { GetTestResults(ctx context.Context) (results []measurement.Measurement, err error) GetVaccinations(ctx context.Context) (results []measurement.Measurement, err error) GetCases(ctx context.Context) (results []measurement.Measurement, err error) GetMortality(ctx context.Context) (results []measurement.Measurement, err error) GetHospitalisations(ctx context.Context) (results []measurement.Measurement, err error) AutoRefresh(ctx context.Context) }
Getter interface exposes the different supported Sciensano APIs