internal

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

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

Write increments the counter so that a unit test could assert how many times this function is called.

type MockSymbolsManager

type MockSymbolsManager struct {
	Identifiers      []string
	IndexIdentifiers []string
}

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.

func (*MockTimeChecker) IsOpen

func (m *MockTimeChecker) IsOpen(_ time.Time) bool

IsOpen always returns Open.

func (*MockTimeChecker) Sub

func (m *MockTimeChecker) Sub(dateInJST time.Time, _ int) (time.Time, error)

Sub always returns a date provided at the first argument.

Jump to

Keyboard shortcuts

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