Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { Date Timestamp `json:"date"` Manufacturer string `json:"manufacturer"` Amount int `json:"amount"` }
Batch represents one batch of vaccines
func (Batch) GetAttributeNames ¶
GetAttributeNames returns the names of the types of vaccinations
func (Batch) GetAttributeValues ¶
GetAttributeValues gets the value for each supported type of vaccination
func (Batch) GetGroupFieldValue ¶
GetGroupFieldValue returns the value of a groupable field. Not used for Batch.
func (Batch) GetTimestamp ¶
GetTimestamp returns the batch's timestamp
func (Batch) GetTotalValue ¶
GetTotalValue returns the entry's total number of vaccines
type Client ¶
type Client struct { URL string HTTPClient *http.Client measurement.Cache }
Client calls the API to retrieve vaccine batches
func (*Client) GetBatches ¶
func (client *Client) GetBatches(ctx context.Context) (batches []measurement.Measurement, err error)
GetBatches returns all vaccine batches
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 {
GetBatches(ctx context.Context) (batches []measurement.Measurement, err error)
}
Getter interface retrieves vaccine batches
Click to show internal directories.
Click to hide internal directories.