client

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BacktestCreationPayload

type BacktestCreationPayload struct {
	Accounts    map[string]account.Account
	StartTime   time.Time
	EndTime     *time.Time
	Mode        *backtest.Mode
	PricePeriod *period.Symbol
}

type Client

type Client interface {
	Advance(ctx context.Context, backtestID uuid.UUID) error
	Create(ctx context.Context, payload BacktestCreationPayload) (uuid.UUID, error)
	CreateOrder(ctx context.Context, payload client.OrderCreationPayload) error
	Get(ctx context.Context, backtestID uuid.UUID) (backtest.Backtest, error)
	GetAccounts(ctx context.Context, backtestID uuid.UUID) (map[string]account.Account, error)
	Subscribe(ctx context.Context, backtestID uuid.UUID, exchange, pair string) error
	ListenEvents(ctx context.Context, backtestID uuid.UUID) (<-chan event.Event, error)
	List(ctx context.Context) ([]backtest.Backtest, error)
	ListOrders(ctx context.Context, backtestID uuid.UUID) ([]order.Order, error)

	ServiceInfo(ctx context.Context) (client.ServiceInfo, error)
	Close(ctx context.Context)
}

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) Advance

func (m *MockClient) Advance(ctx context.Context, backtestID uuid.UUID) error

Advance mocks base method.

func (*MockClient) Close

func (m *MockClient) Close(ctx context.Context)

Close mocks base method.

func (*MockClient) Create

func (m *MockClient) Create(ctx context.Context, payload BacktestCreationPayload) (uuid.UUID, error)

Create mocks base method.

func (*MockClient) CreateOrder

func (m *MockClient) CreateOrder(ctx context.Context, payload client.OrderCreationPayload) error

CreateOrder mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) Get

func (m *MockClient) Get(ctx context.Context, backtestID uuid.UUID) (backtest.Backtest, error)

Get mocks base method.

func (*MockClient) GetAccounts

func (m *MockClient) GetAccounts(ctx context.Context, backtestID uuid.UUID) (map[string]account.Account, error)

GetAccounts mocks base method.

func (*MockClient) List

func (m *MockClient) List(ctx context.Context) ([]backtest.Backtest, error)

List mocks base method.

func (*MockClient) ListOrders

func (m *MockClient) ListOrders(ctx context.Context, backtestID uuid.UUID) ([]order.Order, error)

ListOrders mocks base method.

func (*MockClient) ListenEvents

func (m *MockClient) ListenEvents(ctx context.Context, backtestID uuid.UUID) (<-chan event.Event, error)

ListenEvents mocks base method.

func (*MockClient) ServiceInfo

func (m *MockClient) ServiceInfo(ctx context.Context) (client.ServiceInfo, error)

ServiceInfo mocks base method.

func (*MockClient) Subscribe

func (m *MockClient) Subscribe(ctx context.Context, backtestID uuid.UUID, exchange, pair string) error

Subscribe mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) Advance

func (mr *MockClientMockRecorder) Advance(ctx, backtestID interface{}) *gomock.Call

Advance indicates an expected call of Advance.

func (*MockClientMockRecorder) Close

func (mr *MockClientMockRecorder) Close(ctx interface{}) *gomock.Call

Close indicates an expected call of Close.

func (*MockClientMockRecorder) Create

func (mr *MockClientMockRecorder) Create(ctx, payload interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockClientMockRecorder) CreateOrder

func (mr *MockClientMockRecorder) CreateOrder(ctx, payload interface{}) *gomock.Call

CreateOrder indicates an expected call of CreateOrder.

func (*MockClientMockRecorder) Get

func (mr *MockClientMockRecorder) Get(ctx, backtestID interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockClientMockRecorder) GetAccounts

func (mr *MockClientMockRecorder) GetAccounts(ctx, backtestID interface{}) *gomock.Call

GetAccounts indicates an expected call of GetAccounts.

func (*MockClientMockRecorder) List

func (mr *MockClientMockRecorder) List(ctx interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockClientMockRecorder) ListOrders

func (mr *MockClientMockRecorder) ListOrders(ctx, backtestID interface{}) *gomock.Call

ListOrders indicates an expected call of ListOrders.

func (*MockClientMockRecorder) ListenEvents

func (mr *MockClientMockRecorder) ListenEvents(ctx, backtestID interface{}) *gomock.Call

ListenEvents indicates an expected call of ListenEvents.

func (*MockClientMockRecorder) ServiceInfo

func (mr *MockClientMockRecorder) ServiceInfo(ctx interface{}) *gomock.Call

ServiceInfo indicates an expected call of ServiceInfo.

func (*MockClientMockRecorder) Subscribe

func (mr *MockClientMockRecorder) Subscribe(ctx, backtestID, exchange, pair interface{}) *gomock.Call

Subscribe indicates an expected call of Subscribe.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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