Back to

Package rest

Latest Go to latest

The latest major version is .

Published: Apr 10, 2020 | License: MIT | Module:


type BasicError

type BasicError struct {
	Message string `json:"message"`


type Handler

type Handler struct {
	R     storage.Storage
	UpSrv updating.Service


func (Handler) FindCountry

func (h Handler) FindCountry(c echo.Context) error

FindCountry godoc @Tags Worldometer @Summary Find Country @Description find covid19 related data by country @Produce json @Param country path string true "country name / code (philippines/ph/608/phl)" @Success 200 {object} worldometer.CountryStats @Failure 404 {object} BasicError @Router /countries/{country} [get]

func (Handler) FindCountryHistories

func (h Handler) FindCountryHistories(c echo.Context) error

FindCountryHistories @Tags World Health Organization (WHO) @Summary Find Country Histories @Description find covid19 related historical data by country @Produce json @Param country path string true "country name / code (philippines/ph/608/phl)" @Success 200 {object} who.HistoryData @Failure 404 {object} BasicError @Router /histories/{country} [get]

func (Handler) FindStates

func (h Handler) FindStates(c echo.Context) error

FindStates godoc @Tags Worldometer @Summary Find State @Description find covid19 related data by state @Produce json @Param state path string true "State Name / State Abbreviation" @Success 200 {object} worldometer.StatesStats @Failure 404 {object} BasicError @Router /states/{state} [get]

func (Handler) GetCountriesData

func (h Handler) GetCountriesData(c echo.Context) error

GetCountriesData get all countries @Tags Worldometer @Summary Get all countries data @Description get current covid data @Produce json @Success 200 {array} worldometer.CountryStats @Router /countries [get]

func (Handler) GetHistories

func (h Handler) GetHistories(c echo.Context) error

GetHistories @Tags World Health Organization (WHO) @Summary Get all countries historical data @Description get histories @Produce json @Success 200 {array} who.HistoryData @Router /histories [get]

func (Handler) GetPHHospitalPUIs

func (h Handler) GetPHHospitalPUIs(c echo.Context) error

GetPHHospitalPUIs godoc @Tags Unavailable @Summary GET DOH PHILIPPINES DATA (HOSPITAL PUIs) @Description get doh philippines official data (HOSPITAL PUIs) from @Produce json @Success 200 {array} philippines.HsPUIsAttributes @Router /doh/ph/hospital-pui [get]

func (Handler) GetPHStats

func (h Handler) GetPHStats(c echo.Context) error

GetPHStats godoc @Tags Unavailable @Summary GET DOH PHILIPPINES DATA @Description get doh philippines official data from @Produce json @Success 200 {array} philippines.StatsAttributes @Router /doh/ph [get]

func (Handler) GetStatesData

func (h Handler) GetStatesData(c echo.Context) error

GetStatesData godoc @Tags Worldometer @Summary Get all US-States data @Description get current US-States covid data @Produce json @Success 200 {array} worldometer.StatesStats @Router /states [get]

func (Handler) UpdateData

func (h Handler) UpdateData(c echo.Context) error

UpdateData - update

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier