Documentation ¶
Index ¶
- func UnmarshalOrderBook(raw *bson.Raw, ob *OrderBook)
- type CsvDataLoader
- type Data
- func (d *Data) GetDataRel() *Data
- func (d *Data) GetIndex() int
- func (d *Data) GetMaxIndex() int
- func (d *Data) GetOrderBook() *OrderBook
- func (d *Data) GetOrderBookByNS(symbol string, ns int64) *OrderBook
- func (d *Data) GetOrderBookRaw(offset int) *OrderBook
- func (d *Data) GetRecords(size int) []*Record
- func (d *Data) Len() int
- func (d *Data) Next() bool
- func (d *Data) Reset(start time.Time, end time.Time)
- func (d *Data) SetDataRel(relData *Data)
- type DataLoader
- type MongoDBDataLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalOrderBook ¶
Types ¶
type CsvDataLoader ¶
type CsvDataLoader struct {
// contains filtered or unexported fields
}
func NewCsvDataLoader ¶
func NewCsvDataLoader(filename string) *CsvDataLoader
func (*CsvDataLoader) HasMoreData ¶
func (l *CsvDataLoader) HasMoreData() bool
func (*CsvDataLoader) ReadOrderBooks ¶
func (l *CsvDataLoader) ReadOrderBooks() (result []*OrderBook)
func (*CsvDataLoader) ReadRecords ¶
func (l *CsvDataLoader) ReadRecords(limit int) []*Record
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func NewCsvData ¶
func NewData ¶
func NewData(loader DataLoader) *Data
func NewMongoDBData ¶
func (*Data) GetDataRel ¶
func (*Data) GetMaxIndex ¶
func (*Data) GetOrderBook ¶
func (d *Data) GetOrderBook() *OrderBook
func (*Data) GetOrderBookByNS ¶
func (*Data) GetOrderBookRaw ¶
func (*Data) GetRecords ¶
func (*Data) SetDataRel ¶
type DataLoader ¶
type MongoDBDataLoader ¶
type MongoDBDataLoader struct {
// contains filtered or unexported fields
}
func NewMongoDBDataLoader ¶
func NewMongoDBDataLoader(uri string, db string, exchange string, symbol string) *MongoDBDataLoader
func (*MongoDBDataLoader) HasMoreData ¶
func (l *MongoDBDataLoader) HasMoreData() bool
func (*MongoDBDataLoader) ReadOrderBooks ¶
func (l *MongoDBDataLoader) ReadOrderBooks() (result []*OrderBook)
func (*MongoDBDataLoader) ReadRecords ¶
func (l *MongoDBDataLoader) ReadRecords(limit int) []*Record
Click to show internal directories.
Click to hide internal directories.