dataloader

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalOrderBook added in v1.1.13

func UnmarshalOrderBook(raw *bson.Raw, ob *OrderBook)

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 added in v1.2.2

func (l *CsvDataLoader) ReadOrderBooks() (result []*OrderBook)

func (*CsvDataLoader) ReadRecords added in v1.2.2

func (l *CsvDataLoader) ReadRecords(limit int) []*Record

func (*CsvDataLoader) Setup added in v1.1.13

func (l *CsvDataLoader) Setup(start time.Time, end time.Time) error

type Data

type Data struct {
	// contains filtered or unexported fields
}

func NewCsvData

func NewCsvData(filename string) *Data

func NewData added in v1.1.13

func NewData(loader DataLoader) *Data

func NewMongoDBData added in v1.1.13

func NewMongoDBData(uri string, db string, exchange string, symbol string) *Data

func (*Data) GetDataRel added in v1.2.7

func (d *Data) GetDataRel() *Data

func (*Data) GetIndex

func (d *Data) GetIndex() int

func (*Data) GetMaxIndex

func (d *Data) GetMaxIndex() int

func (*Data) GetOrderBook

func (d *Data) GetOrderBook() *OrderBook

func (*Data) GetOrderBookByNS added in v1.2.6

func (d *Data) GetOrderBookByNS(symbol string, ns int64) *OrderBook

func (*Data) GetOrderBookRaw added in v1.2.6

func (d *Data) GetOrderBookRaw(offset int) *OrderBook

func (*Data) GetRecords added in v1.2.2

func (d *Data) GetRecords(size int) []*Record

func (*Data) Len

func (d *Data) Len() int

func (*Data) Next

func (d *Data) Next() bool

func (*Data) Reset

func (d *Data) Reset(start time.Time, end time.Time)

func (*Data) SetDataRel added in v1.2.7

func (d *Data) SetDataRel(relData *Data)

type DataLoader

type DataLoader interface {
	Setup(start time.Time, end time.Time) error
	ReadOrderBooks() []*OrderBook
	ReadRecords(limit int) []*Record
	HasMoreData() bool
}

type MongoDBDataLoader added in v1.1.13

type MongoDBDataLoader struct {
	// contains filtered or unexported fields
}

func NewMongoDBDataLoader added in v1.1.13

func NewMongoDBDataLoader(uri string, db string, exchange string, symbol string) *MongoDBDataLoader

func (*MongoDBDataLoader) HasMoreData added in v1.1.13

func (l *MongoDBDataLoader) HasMoreData() bool

func (*MongoDBDataLoader) ReadOrderBooks added in v1.2.2

func (l *MongoDBDataLoader) ReadOrderBooks() (result []*OrderBook)

func (*MongoDBDataLoader) ReadRecords added in v1.2.2

func (l *MongoDBDataLoader) ReadRecords(limit int) []*Record

func (*MongoDBDataLoader) Setup added in v1.1.13

func (l *MongoDBDataLoader) Setup(start time.Time, end time.Time) error

Jump to

Keyboard shortcuts

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