writer

package
v4.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BarWriter

type BarWriter interface {
	Write(symbol string, bars []api.Bar, isIndexSymbol bool) error
}

BarWriter is an interface to write chart data to the marketstore

type BarWriterImpl

type BarWriterImpl struct {
	MarketStoreWriter MarketStoreWriter
	Timeframe         string
	// BarWriterImpl writes data with the timezone
	Timezone *time.Location
}

BarWriterImpl is an implementation of the BarWriter interface

func (BarWriterImpl) Write

func (b BarWriterImpl) Write(symbol string, bars []api.Bar, isIndexSymbol bool) error

Write converts the Response of the GetBars API to a ColumnSeriesMap and write it to the local marketstore server. When "isIndexSymbol" is true, bar data with "Volume=0" symbol will also be written to marketstore

type MarketStoreWriter

type MarketStoreWriter interface {
	Write(csm io.ColumnSeriesMap) error
}

MarketStoreWriter is an interface to write data to marketstore. this interface is necessary for writing unit tests of XigniteFeeder without actually saving data to the marketstore.

type MarketStoreWriterImpl

type MarketStoreWriterImpl struct{}

MarketStoreWriterImpl writes the column series map data to the local marketstore data.

func (*MarketStoreWriterImpl) Write

type QuotesRangeWriter

type QuotesRangeWriter interface {
	Write(symbol string, quotes []api.EndOfDayQuote, isIndexSymbol bool) error
}

QuotesRangeWriter is an interface to write the historical daily chart data to the marketstore

type QuotesRangeWriterImpl

type QuotesRangeWriterImpl struct {
	MarketStoreWriter MarketStoreWriter
	Timeframe         string
}

QuotesRangeWriterImpl is an implementation of the QuotesRangeWriter interface

func (*QuotesRangeWriterImpl) Write

func (q *QuotesRangeWriterImpl) Write(symbol string, quotes []api.EndOfDayQuote, isIndexSymbol bool) error

Write converts the Response of the QuickEquityHistorical/GetQuotesRange API to a ColumnSeriesMap and write it to the local marketstore server.

type QuotesWriter

type QuotesWriter interface {
	Write(resp api.GetQuotesResponse) error
}

QuotesWriter is an interface to write the realtime stock data to the marketstore

type QuotesWriterImpl

type QuotesWriterImpl struct {
	MarketStoreWriter MarketStoreWriter
	Timeframe         string
	// QuotesWriterImpl writes data with the timezone
	Timezone *time.Location
}

QuotesWriterImpl is an implementation of the QuotesWriter interface

func (QuotesWriterImpl) Write

func (q QuotesWriterImpl) Write(quotes api.GetQuotesResponse) error

Write converts the Response of the GetQuotes API to a ColumnSeriesMap and write it to the local marketstore server.

Jump to

Keyboard shortcuts

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