vaccination

package
v0.0.0-...-bcb8294 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Area              string `json:"area"`
	AreaID            int    `json:"areaid"`
	DailyShot1        int    `json:"dailydose1"`
	DailyShot2        int    `json:"dailydose2"`
	DayDiff           int    `json:"daydiff"`
	DayTotal          int    `json:"daytotal"`
	TotalPersons      int    `json:"totaldistinctpersons"`
	TotalShot1        int    `json:"totaldose1"`
	TotalShot2        int    `json:"totaldose2"`
	TotalVaccinations int    `json:"totalvaccinations"`
	ReferenceDate     string `json:"referencedate"`
}

Data describes the data returned by the vaccination API.

type Endpoint

type Endpoint struct{}

Endpoint is vaccination API endpoint.

func (Endpoint) GetName

func (v Endpoint) GetName() string

GetName returns the endpoint name.

func (Endpoint) GetPath

func (v Endpoint) GetPath() string

GetPath returns the endpoint path.

type List

type List []Data

List is a representation of a Data array.

func Get

func Get(client *api.Client, params *api.GetParams) (List, error)

Get returns a list of vaccinations found based on the given parameters.

func (List) FilterByArea

func (l List) FilterByArea(areaName string) List

FilterByArea filters a vaccination List by the given area name and returns a new list that contains only the filtered data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL