Documentation ¶
Index ¶
- type MockAPIClient
- func (mac *MockAPIClient) GetIndexBars(identifier string, start, end time.Time) (response api.GetIndexBarsResponse, err error)
- func (mac *MockAPIClient) GetIndexQuotesRange(i string, sd, ed time.Time) (resp api.GetIndexQuotesRangeResponse, err error)
- func (mac *MockAPIClient) GetQuotesRange(i string, sd, ed time.Time) (resp api.GetQuotesRangeResponse, err error)
- func (mac *MockAPIClient) GetRealTimeBars(identifier string, start, end time.Time) (response api.GetBarsResponse, err error)
- func (mac *MockAPIClient) GetRealTimeQuotes(identifiers []string) (api.GetQuotesResponse, error)
- func (mac *MockAPIClient) ListIndexSymbols(indexGroup string) (api.ListIndexSymbolsResponse, error)
- func (mac *MockAPIClient) ListSymbols(exchange string) (api.ListSymbolsResponse, error)
- type MockMarketStoreWriter
- type MockQuotesWriter
- type MockSymbolsManager
- type MockTimeChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAPIClient ¶
type MockAPIClient struct{}
MockAPIClient is a no-op API client
func (*MockAPIClient) GetIndexBars ¶
func (mac *MockAPIClient) GetIndexBars(identifier string, start, end time.Time) (response api.GetIndexBarsResponse, err error)
GetIndexBars returns an empty api response
func (*MockAPIClient) GetIndexQuotesRange ¶
func (mac *MockAPIClient) GetIndexQuotesRange(i string, sd, ed time.Time, ) (resp api.GetIndexQuotesRangeResponse, err error)
GetQuotesRange returns an empty api response
func (*MockAPIClient) GetQuotesRange ¶
func (mac *MockAPIClient) GetQuotesRange(i string, sd, ed time.Time) (resp api.GetQuotesRangeResponse, err error)
GetQuotesRange returns an empty api response
func (*MockAPIClient) GetRealTimeBars ¶
func (mac *MockAPIClient) GetRealTimeBars(identifier string, start, end time.Time) (response api.GetBarsResponse, err error)
GetRealTimeBars returns an empty api response
func (*MockAPIClient) GetRealTimeQuotes ¶
func (mac *MockAPIClient) GetRealTimeQuotes(identifiers []string) (api.GetQuotesResponse, error)
GetRealTimeQuotes returns an empty api response
func (*MockAPIClient) ListIndexSymbols ¶
func (mac *MockAPIClient) ListIndexSymbols(indexGroup string) (api.ListIndexSymbolsResponse, error)
ListSymbols returns an empty api response
func (*MockAPIClient) ListSymbols ¶
func (mac *MockAPIClient) ListSymbols(exchange string) (api.ListSymbolsResponse, error)
ListSymbols returns an empty api response
type MockMarketStoreWriter ¶
type MockMarketStoreWriter struct {
WrittenCSM io.ColumnSeriesMap
}
MockMarketStoreWriter is a no-op MarketStoreWriter.
func (*MockMarketStoreWriter) Write ¶
func (m *MockMarketStoreWriter) Write(csm io.ColumnSeriesMap) error
Write stores the argument to the struct and does nothing else.
type MockQuotesWriter ¶
type MockQuotesWriter struct {
WriteCount int
}
MockQuotesWriter is a no-op QuotesWriter
func (*MockQuotesWriter) Write ¶
func (m *MockQuotesWriter) Write(resp api.GetQuotesResponse) error
Write increments the counter so that a unit test could assert how many times this function is called
type MockSymbolsManager ¶
MockSymbolsManager is a no-op SymbolsManager
func (MockSymbolsManager) GetAllIdentifiers ¶
func (msm MockSymbolsManager) GetAllIdentifiers() []string
GetAllIdentifiers returns the static identifiers
func (MockSymbolsManager) GetAllIndexIdentifiers ¶
func (msm MockSymbolsManager) GetAllIndexIdentifiers() []string
GetAllIdentifiers returns the static index identifiers
type MockTimeChecker ¶
type MockTimeChecker struct{}
MockTimeChecker always returns Open