Documentation ¶
Index ¶
- Constants
- func MonitoringHandler(h http.Handler, rich chan<- responseInfo) http.Handler
- func New() *application
- type CountrySummary
- type Dataset
- type DatasetSimple
- type GetMonitoringHandler
- type MonitoringResponseWriter
- func (mrw *MonitoringResponseWriter) Close() error
- func (mrw *MonitoringResponseWriter) Flush()
- func (mrw *MonitoringResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (mrw *MonitoringResponseWriter) Push(target string, opts *http.PushOptions) error
- func (mrw *MonitoringResponseWriter) Write(buf []byte) (int, error)
- func (mrw *MonitoringResponseWriter) WriteHeader(statusCode int)
- type TimeDaily
- type Unixtime
- type WorldSummary
Constants ¶
View Source
const ( RootDomain = "covid-19.unko.in" DataRepoURL = "https://github.com/CSSEGISandData/COVID-19" GitPath = "./data/git/COVID-19" RepoDataPath = "./data/git/COVID-19/csse_covid_19_data/csse_covid_19_daily_reports" PublicPath = "./www" ConvertDataPath = "./www/data/daily_reports/json" SummaryDataPath = "./www/data/daily_reports/summary.json" AccessLogPath = "./log" NowJSONDefaultName = "2020-01-22.json" GitTimeoutDuration = 3 * time.Minute UpdateCycleDuration = 1 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func MonitoringHandler ¶
MonitoringHandler モニタリング用ハンドラ生成
Types ¶
type CountrySummary ¶
type CountrySummary struct { Daily []DatasetSimple `json:"daily"` CDR [3]uint64 `json:"cdr"` }
type Dataset ¶
type Dataset struct { Confirmed uint64 `json:"confirmed"` Deaths uint64 `json:"deaths"` Recovered uint64 `json:"recovered"` LastUpdate *Unixtime `json:"last_update,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` Children map[string]*Dataset `json:"children,omitempty"` }
type DatasetSimple ¶
type GetMonitoringHandler ¶
type GetMonitoringHandler struct {
// contains filtered or unexported fields
}
func (*GetMonitoringHandler) ServeHTTP ¶
func (h *GetMonitoringHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MonitoringResponseWriter ¶
type MonitoringResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func (*MonitoringResponseWriter) Close ¶
func (mrw *MonitoringResponseWriter) Close() error
Close io.Closerのような感じにしたけど特に意味は無い
func (*MonitoringResponseWriter) Flush ¶
func (mrw *MonitoringResponseWriter) Flush()
Flush http.Flusher interface
func (*MonitoringResponseWriter) Hijack ¶
func (mrw *MonitoringResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
Hijack implements http.Hijacker. If the underlying ResponseWriter is a Hijacker, its Hijack method is returned. Otherwise an error is returned.
func (*MonitoringResponseWriter) Push ¶
func (mrw *MonitoringResponseWriter) Push(target string, opts *http.PushOptions) error
Push http.Pusher interface go1.8以上が必要
func (*MonitoringResponseWriter) Write ¶
func (mrw *MonitoringResponseWriter) Write(buf []byte) (int, error)
Write メソッドをオーバーライド
func (*MonitoringResponseWriter) WriteHeader ¶
func (mrw *MonitoringResponseWriter) WriteHeader(statusCode int)
WriteHeader メソッドをオーバーライド
type TimeDaily ¶
func (TimeDaily) MarshalJSON ¶
type Unixtime ¶
func (Unixtime) MarshalBinary ¶
func (Unixtime) MarshalJSON ¶
func (*Unixtime) UnmarshalBinary ¶
func (*Unixtime) UnmarshalJSON ¶
type WorldSummary ¶
type WorldSummary struct { Countrys map[string]CountrySummary `json:"countrys"` CDR [3]uint64 `json:"cdr"` }
Click to show internal directories.
Click to hide internal directories.