cases

package
v0.0.0-...-791dfb5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c echo.Context, data interface{}) (interface{}, error)

New covid case

func ProcessCase

func ProcessCase(cases *models.Case, date time.Time) error

ProcessCase custom processing jsonb data

Types

type CasePayload

type CasePayload struct {
	CreatedAt  string         `json:"date"`
	Location   postgres.Jsonb `json:"location"`
	DataDetail postgres.Jsonb `json:"data_detail"`
}

CasePayload main payload for creation

type DataDetailDefs

type DataDetailDefs map[string]interface{}

DataDetailDefs map custom json data data_detail

type LocationDefs

type LocationDefs struct {
	ProvinsiMain  string `json:"provinsi_main,omitempty"`
	Provinsi      string `json:"provinsi,omitempty"`
	KotaKabupaten string `json:"kota_kabupaten,omitempty"`
}

LocationDefs mapping custom json data location

type Response

type Response struct {
	//GOTCHAS: must defined gorm column type as jsonb, if not gorm never get the data
	DataDetail postgres.Jsonb `json:"data_detail" gorm:"column:data_detail;type:jsonb"`
}

Response from latest row to diff operation for getting correct per day data

Jump to

Keyboard shortcuts

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