Documentation
¶
Index ¶
- type MockAPIClient
- func (mac *MockAPIClient) GetIndexBars(_ context.Context, _ string, _, _ time.Time) (response api.GetIndexBarsResponse, err error)
- func (mac *MockAPIClient) GetIndexQuotesRange(_ context.Context, _ string, _, _ time.Time) (resp api.GetIndexQuotesRangeResponse, err error)
- func (mac *MockAPIClient) GetQuotesRange(_ context.Context, _ string, _, _ time.Time) (resp api.GetQuotesRangeResponse, err error)
- func (mac *MockAPIClient) GetRealTimeBars(_ context.Context, _ string, _, _ time.Time) (response api.GetBarsResponse, err error)
- func (mac *MockAPIClient) GetRealTimeQuotes(_ context.Context, _ []string) (api.GetQuotesResponse, error)
- func (mac *MockAPIClient) ListIndexSymbols(_ context.Context, _ string) (api.ListIndexSymbolsResponse, error)
- func (mac *MockAPIClient) ListSymbols(_ context.Context, _ 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(_ context.Context, _ string, _, _ time.Time, ) (response api.GetIndexBarsResponse, err error)
GetIndexBars returns an empty api response.
func (*MockAPIClient) GetIndexQuotesRange ¶
func (mac *MockAPIClient) GetIndexQuotesRange(_ context.Context, _ string, _, _ time.Time, ) (resp api.GetIndexQuotesRangeResponse, err error)
GetIndexQuotesRange returns an empty api response.
func (*MockAPIClient) GetQuotesRange ¶
func (mac *MockAPIClient) GetQuotesRange(_ context.Context, _ string, _, _ time.Time, ) (resp api.GetQuotesRangeResponse, err error)
GetQuotesRange returns an empty api response.
func (*MockAPIClient) GetRealTimeBars ¶
func (mac *MockAPIClient) GetRealTimeBars(_ context.Context, _ string, _, _ time.Time, ) (response api.GetBarsResponse, err error)
GetRealTimeBars returns an empty api response.
func (*MockAPIClient) GetRealTimeQuotes ¶
func (mac *MockAPIClient) GetRealTimeQuotes(_ context.Context, _ []string) (api.GetQuotesResponse, error)
GetRealTimeQuotes returns an empty api response.
func (*MockAPIClient) ListIndexSymbols ¶
func (mac *MockAPIClient) ListIndexSymbols(_ context.Context, _ string) (api.ListIndexSymbolsResponse, error)
ListIndexSymbols returns an empty api response.
func (*MockAPIClient) ListSymbols ¶
func (mac *MockAPIClient) ListSymbols(_ context.Context, _ 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(_ 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
GetAllIndexIdentifiers returns the static index identifiers.
type MockTimeChecker ¶
type MockTimeChecker struct{}
MockTimeChecker always returns Open.