Documentation ¶
Index ¶
- Constants
- func MonitoringHandler(h http.Handler, rich chan<- ResponseInfo) http.Handler
- type App
- type Finance
- type GetIndicatorHandler
- type GetMonitoringHandler
- type Indicator
- type Meta
- 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 MonitoringResponseWriterWithCloseNotify
- type ResponseInfo
- type ResultMonitor
- type Srv
- type Store
- type TradingPeriod
- type Unixtime
Constants ¶
View Source
const ( AccessLogPath = "./log" WwwPath = "./www" RootDataPath = "./data" )
View Source
const RootDomain = "asset.unko.in"
Variables ¶
This section is empty.
Functions ¶
func MonitoringHandler ¶
func MonitoringHandler(h http.Handler, rich chan<- ResponseInfo) http.Handler
MonitoringHandler モニタリング用ハンドラ生成
Types ¶
type Finance ¶
type Finance struct { Chart struct { Result []struct { Meta struct { Currency string `json:"currency"` Symbol string `json:"symbol"` ExchangeName string `json:"exchangeName"` InstrumentType string `json:"instrumentType"` FirstTradeDate Unixtime `json:"firstTradeDate"` RegularMarketTime Unixtime `json:"regularMarketTime"` Gmtoffset int64 `json:"gmtoffset"` Timezone string `json:"timezone"` ExchangeTimezoneName string `json:"exchangeTimezoneName"` RegularMarketPrice float64 `json:"regularMarketPrice"` ChartPreviousClose float64 `json:"chartPreviousClose"` PriceHint int64 `json:"priceHint"` CurrentTradingPeriod struct { Pre TradingPeriod `json:"pre"` Regular TradingPeriod `json:"regular"` Post TradingPeriod `json:"post"` } `json:"currentTradingPeriod"` DataGranularity string `json:"dataGranularity"` Range string `json:"range"` ValidRanges []string `json:"validRanges"` } `json:"meta"` Timestamp []Unixtime `json:"timestamp"` Indicators struct { Quote []struct { Open []float64 `json:"open"` High []float64 `json:"high"` Volume []float64 `json:"volume"` Low []float64 `json:"low"` Close []float64 `json:"close"` } `json:"quote"` Adjclose []struct { Adjclose []float64 `json:"adjclose"` } `json:"adjclose"` } `json:"indicators"` } `json:"result"` Error string `json:"error,omitempty"` } `json:"chart"` }
type GetIndicatorHandler ¶
type GetIndicatorHandler struct {
// contains filtered or unexported fields
}
func (*GetIndicatorHandler) ServeHTTP ¶
func (h *GetIndicatorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetMonitoringHandler ¶
type GetMonitoringHandler struct {
// contains filtered or unexported fields
}
func (*GetMonitoringHandler) ServeHTTP ¶
func (h *GetMonitoringHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Meta ¶
type Meta struct { Currency string `json:"currency"` Symbol string `json:"symbol"` ExchangeName string `json:"exchangeName"` InstrumentType string `json:"instrumentType"` FirstTradeDate Unixtime `json:"firstTradeDate"` RegularMarketTime Unixtime `json:"regularMarketTime"` DataGranularity string `json:"dataGranularity"` Range string `json:"range"` }
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 MonitoringResponseWriterWithCloseNotify ¶
type MonitoringResponseWriterWithCloseNotify struct {
*MonitoringResponseWriter
}
func (*MonitoringResponseWriterWithCloseNotify) CloseNotify ¶
func (mrw *MonitoringResponseWriterWithCloseNotify) CloseNotify() <-chan bool
CloseNotify http.CloseNotifier interface
type ResponseInfo ¶
type ResponseInfo struct {
// contains filtered or unexported fields
}
type ResultMonitor ¶
type TradingPeriod ¶
type Unixtime ¶
func (Unixtime) MarshalBinary ¶
func (Unixtime) MarshalJSON ¶
func (*Unixtime) UnmarshalBinary ¶
func (*Unixtime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.