cockpit

package module
v0.0.0-...-6a35e63 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrKeyNotFound represent key is not found when searching in KeyValueService
	ErrKeyNotFound = errors.New("Key not found")
)

Functions

This section is empty.

Types

type CityLevelCases

type CityLevelCases struct {
	Name          string
	TotalODP      int       `json:"total_odp"`
	TotalPDP      int       `json:"total_pdp"`
	TotalPositif  int       `json:"total_positif"`
	LastUpdatedAt time.Time `json:"last_updated_at"`
	LastFetchedAt time.Time `json:"last_fetched_at"`
}

type Extractor

type Extractor func(string) (interface{}, error)

type Hospital

type Hospital struct {
	Latitude  float64
	Longitude float64
	Name      string
	Address   string
	Telephone string
}

type InfectedDetails

type InfectedDetails struct {
	Total     int `json:"total"`     // Positif COVID-19
	Recovered int `json:"sembuh"`    // Sembuh
	Died      int `json:"meninggal"` // Meninggal
}

type KeyValueService

type KeyValueService interface {
	Set(key string, value []byte) error
	SetEx(key string, value []byte, expirationInSeconds time.Duration) error
	Get(key string) ([]byte, error)
	GetHashAll(key string) (map[string]string, error)
	SetHashAll(key string, value map[string]interface{}) error
	Delete(key string) error
}

KeyValueService provide an interface to get key

type MonitoringDetails

type MonitoringDetails struct {
	Total    int `json:"total"`   // ODP
	Finished int `json:"selesai"` // Selesai ODP
	Ongoing  int `json:"proses"`  // Proses ODP
}

type NationalLevelCases

type NationalLevelCases struct {
	InfectedCases InfectedDetails `json:"positif"` // Positif COVID-19
}

type ProvinceHospitalReferences

type ProvinceHospitalReferences struct {
	Hospitals []Hospital
}

type ProvincialLevelCases

type ProvincialLevelCases struct {
	MonitoringCases   MonitoringDetails   `json:"odp"`     // ODP
	SurveillanceCases SurveillanceDetails `json:"pdp"`     // PDP
	InfectedCases     InfectedDetails     `json:"positif"` // Positif COVID-19
	LastUpdatedAt     time.Time           `json:"last_updated_at"`
	LastFetchedAt     time.Time           `json:"last_fetched_at"`
}

type SurveillanceDetails

type SurveillanceDetails struct {
	Total    int `json:"total"`   // PDP
	Finished int `json:"selesai"` // Selesai PDP
	Ongoing  int `json:"proses"`  // Proses PDP
}

Jump to

Keyboard shortcuts

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