Documentation
¶
Index ¶
- type Kline
- type KlineMessage
- type RedisStorage
- func (s *RedisStorage) Close() error
- func (s *RedisStorage) Get(key string) (string, error)
- func (s *RedisStorage) GetPairsMapping() (map[string]string, error)
- func (s *RedisStorage) GetTicker(pair string) (*Ticker, error)
- func (s *RedisStorage) SaveKline(kine *Kline, pair string) error
- func (s *RedisStorage) SaveTicker(ticker *Ticker, pair string) error
- func (s *RedisStorage) Set(key string, value string) error
- type Storage
- type Symbol
- type Ticker
- type TickerMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kline ¶
type Kline struct { E string `json:"e"` E1 int `json:"E"` Symbol string `json:"s"` Kline struct { T int `json:"t"` T1 int `json:"T"` S string `json:"s"` I string `json:"i"` F int `json:"f"` L int `json:"L"` Open string `json:"o"` Close string `json:"c"` High string `json:"h"` Low string `json:"l"` Volume string `json:"v"` Number int `json:"n"` X bool `json:"x"` Quantity string `json:"q"` TakeBuyVolume string `json:"V"` TakeBuyQuantity string `json:"Q"` B string `json:"B"` } `json:"k"` }
type KlineMessage ¶
type KlineMessage struct {
Data Kline `json:"data"`
}
type RedisStorage ¶
type RedisStorage struct {
// contains filtered or unexported fields
}
func (*RedisStorage) Close ¶
func (s *RedisStorage) Close() error
func (*RedisStorage) GetPairsMapping ¶
func (s *RedisStorage) GetPairsMapping() (map[string]string, error)
TODO: check if needed, because it's not easy to work with Rails cache structure
func (*RedisStorage) SaveTicker ¶
func (s *RedisStorage) SaveTicker(ticker *Ticker, pair string) error
type Storage ¶
type Storage interface { GetPairsMapping() (map[string]string, error) GetTicker(string) (*Ticker, error) SaveTicker(*Ticker, string) error SaveKline(*Kline, string) error Set(string, string) error Get(string) (string, error) Close() error }
func NewStorage ¶
type TickerMessage ¶
type TickerMessage struct {
Data Ticker `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.