mock

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBrokerWithExtras

type MockBrokerWithExtras struct {
	mock.Mock
}

MockBrokerWithExtras is an autogenerated mock type for the BrokerWithExtras type

func NewMockBrokerWithExtras

func NewMockBrokerWithExtras(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBrokerWithExtras

NewMockBrokerWithExtras creates a new instance of MockBrokerWithExtras. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBrokerWithExtras) Authenticate

func (_mock *MockBrokerWithExtras) Authenticate(ctx context.Context, creds broker.Credentials) (*broker.Token, error)

Authenticate provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) CancelOrder

func (_mock *MockBrokerWithExtras) CancelOrder(ctx context.Context, orderID string) error

CancelOrder provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) EXPECT

func (*MockBrokerWithExtras) GetBalance

func (_mock *MockBrokerWithExtras) GetBalance(ctx context.Context, accountID string) (*broker.Balance, error)

GetBalance provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) GetInstrument

func (_mock *MockBrokerWithExtras) GetInstrument(ctx context.Context, market string, symbol string) (*broker.Instrument, error)

GetInstrument provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) GetOHLCV

func (_mock *MockBrokerWithExtras) GetOHLCV(ctx context.Context, market string, symbol string, opts broker.OHLCVOpts) ([]broker.OHLCV, error)

GetOHLCV provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) GetOrder

func (_mock *MockBrokerWithExtras) GetOrder(ctx context.Context, orderID string) (*broker.OrderResult, error)

GetOrder provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) GetOrderFills

func (_mock *MockBrokerWithExtras) GetOrderFills(ctx context.Context, orderID string) ([]broker.OrderFill, error)

GetOrderFills provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) GetPositions

func (_mock *MockBrokerWithExtras) GetPositions(ctx context.Context, accountID string) ([]broker.Position, error)

GetPositions provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) GetQuote

func (_mock *MockBrokerWithExtras) GetQuote(ctx context.Context, market string, symbol string) (*broker.Quote, error)

GetQuote provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) ModifyOrder

func (_mock *MockBrokerWithExtras) ModifyOrder(ctx context.Context, orderID string, req broker.ModifyOrderRequest) (*broker.OrderResult, error)

ModifyOrder provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) Name

func (_mock *MockBrokerWithExtras) Name() string

Name provides a mock function for the type MockBrokerWithExtras

func (*MockBrokerWithExtras) PlaceOrder

PlaceOrder provides a mock function for the type MockBrokerWithExtras

type MockBrokerWithExtras_Authenticate_Call

type MockBrokerWithExtras_Authenticate_Call struct {
	*mock.Call
}

MockBrokerWithExtras_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate'

func (*MockBrokerWithExtras_Authenticate_Call) Return

func (*MockBrokerWithExtras_Authenticate_Call) Run

func (*MockBrokerWithExtras_Authenticate_Call) RunAndReturn

type MockBrokerWithExtras_CancelOrder_Call

type MockBrokerWithExtras_CancelOrder_Call struct {
	*mock.Call
}

MockBrokerWithExtras_CancelOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelOrder'

func (*MockBrokerWithExtras_CancelOrder_Call) Return

func (*MockBrokerWithExtras_CancelOrder_Call) Run

func (*MockBrokerWithExtras_CancelOrder_Call) RunAndReturn

type MockBrokerWithExtras_Expecter

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

func (*MockBrokerWithExtras_Expecter) Authenticate

func (_e *MockBrokerWithExtras_Expecter) Authenticate(ctx interface{}, creds interface{}) *MockBrokerWithExtras_Authenticate_Call

Authenticate is a helper method to define mock.On call

  • ctx context.Context
  • creds broker.Credentials

func (*MockBrokerWithExtras_Expecter) CancelOrder

func (_e *MockBrokerWithExtras_Expecter) CancelOrder(ctx interface{}, orderID interface{}) *MockBrokerWithExtras_CancelOrder_Call

CancelOrder is a helper method to define mock.On call

  • ctx context.Context
  • orderID string

func (*MockBrokerWithExtras_Expecter) GetBalance

func (_e *MockBrokerWithExtras_Expecter) GetBalance(ctx interface{}, accountID interface{}) *MockBrokerWithExtras_GetBalance_Call

GetBalance is a helper method to define mock.On call

  • ctx context.Context
  • accountID string

func (*MockBrokerWithExtras_Expecter) GetInstrument

func (_e *MockBrokerWithExtras_Expecter) GetInstrument(ctx interface{}, market interface{}, symbol interface{}) *MockBrokerWithExtras_GetInstrument_Call

GetInstrument is a helper method to define mock.On call

  • ctx context.Context
  • market string
  • symbol string

func (*MockBrokerWithExtras_Expecter) GetOHLCV

func (_e *MockBrokerWithExtras_Expecter) GetOHLCV(ctx interface{}, market interface{}, symbol interface{}, opts interface{}) *MockBrokerWithExtras_GetOHLCV_Call

GetOHLCV is a helper method to define mock.On call

  • ctx context.Context
  • market string
  • symbol string
  • opts broker.OHLCVOpts

func (*MockBrokerWithExtras_Expecter) GetOrder

func (_e *MockBrokerWithExtras_Expecter) GetOrder(ctx interface{}, orderID interface{}) *MockBrokerWithExtras_GetOrder_Call

GetOrder is a helper method to define mock.On call

  • ctx context.Context
  • orderID string

func (*MockBrokerWithExtras_Expecter) GetOrderFills

func (_e *MockBrokerWithExtras_Expecter) GetOrderFills(ctx interface{}, orderID interface{}) *MockBrokerWithExtras_GetOrderFills_Call

GetOrderFills is a helper method to define mock.On call

  • ctx context.Context
  • orderID string

func (*MockBrokerWithExtras_Expecter) GetPositions

func (_e *MockBrokerWithExtras_Expecter) GetPositions(ctx interface{}, accountID interface{}) *MockBrokerWithExtras_GetPositions_Call

GetPositions is a helper method to define mock.On call

  • ctx context.Context
  • accountID string

func (*MockBrokerWithExtras_Expecter) GetQuote

func (_e *MockBrokerWithExtras_Expecter) GetQuote(ctx interface{}, market interface{}, symbol interface{}) *MockBrokerWithExtras_GetQuote_Call

GetQuote is a helper method to define mock.On call

  • ctx context.Context
  • market string
  • symbol string

func (*MockBrokerWithExtras_Expecter) ModifyOrder

func (_e *MockBrokerWithExtras_Expecter) ModifyOrder(ctx interface{}, orderID interface{}, req interface{}) *MockBrokerWithExtras_ModifyOrder_Call

ModifyOrder is a helper method to define mock.On call

  • ctx context.Context
  • orderID string
  • req broker.ModifyOrderRequest

func (*MockBrokerWithExtras_Expecter) Name

Name is a helper method to define mock.On call

func (*MockBrokerWithExtras_Expecter) PlaceOrder

func (_e *MockBrokerWithExtras_Expecter) PlaceOrder(ctx interface{}, req interface{}) *MockBrokerWithExtras_PlaceOrder_Call

PlaceOrder is a helper method to define mock.On call

  • ctx context.Context
  • req broker.OrderRequest

type MockBrokerWithExtras_GetBalance_Call

type MockBrokerWithExtras_GetBalance_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance'

func (*MockBrokerWithExtras_GetBalance_Call) Return

func (*MockBrokerWithExtras_GetBalance_Call) Run

func (*MockBrokerWithExtras_GetBalance_Call) RunAndReturn

type MockBrokerWithExtras_GetInstrument_Call

type MockBrokerWithExtras_GetInstrument_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetInstrument_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstrument'

func (*MockBrokerWithExtras_GetInstrument_Call) Return

func (*MockBrokerWithExtras_GetInstrument_Call) Run

func (*MockBrokerWithExtras_GetInstrument_Call) RunAndReturn

type MockBrokerWithExtras_GetOHLCV_Call

type MockBrokerWithExtras_GetOHLCV_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetOHLCV_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOHLCV'

func (*MockBrokerWithExtras_GetOHLCV_Call) Return

func (*MockBrokerWithExtras_GetOHLCV_Call) Run

func (*MockBrokerWithExtras_GetOHLCV_Call) RunAndReturn

type MockBrokerWithExtras_GetOrderFills_Call

type MockBrokerWithExtras_GetOrderFills_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetOrderFills_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrderFills'

func (*MockBrokerWithExtras_GetOrderFills_Call) Return

func (*MockBrokerWithExtras_GetOrderFills_Call) Run

func (*MockBrokerWithExtras_GetOrderFills_Call) RunAndReturn

type MockBrokerWithExtras_GetOrder_Call

type MockBrokerWithExtras_GetOrder_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrder'

func (*MockBrokerWithExtras_GetOrder_Call) Return

func (*MockBrokerWithExtras_GetOrder_Call) Run

func (*MockBrokerWithExtras_GetOrder_Call) RunAndReturn

type MockBrokerWithExtras_GetPositions_Call

type MockBrokerWithExtras_GetPositions_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetPositions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPositions'

func (*MockBrokerWithExtras_GetPositions_Call) Return

func (*MockBrokerWithExtras_GetPositions_Call) Run

func (*MockBrokerWithExtras_GetPositions_Call) RunAndReturn

type MockBrokerWithExtras_GetQuote_Call

type MockBrokerWithExtras_GetQuote_Call struct {
	*mock.Call
}

MockBrokerWithExtras_GetQuote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuote'

func (*MockBrokerWithExtras_GetQuote_Call) Return

func (*MockBrokerWithExtras_GetQuote_Call) Run

func (*MockBrokerWithExtras_GetQuote_Call) RunAndReturn

type MockBrokerWithExtras_ModifyOrder_Call

type MockBrokerWithExtras_ModifyOrder_Call struct {
	*mock.Call
}

MockBrokerWithExtras_ModifyOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModifyOrder'

func (*MockBrokerWithExtras_ModifyOrder_Call) Return

func (*MockBrokerWithExtras_ModifyOrder_Call) Run

func (*MockBrokerWithExtras_ModifyOrder_Call) RunAndReturn

type MockBrokerWithExtras_Name_Call

type MockBrokerWithExtras_Name_Call struct {
	*mock.Call
}

MockBrokerWithExtras_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'

func (*MockBrokerWithExtras_Name_Call) Return

func (*MockBrokerWithExtras_Name_Call) Run

func (*MockBrokerWithExtras_Name_Call) RunAndReturn

type MockBrokerWithExtras_PlaceOrder_Call

type MockBrokerWithExtras_PlaceOrder_Call struct {
	*mock.Call
}

MockBrokerWithExtras_PlaceOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PlaceOrder'

func (*MockBrokerWithExtras_PlaceOrder_Call) Return

func (*MockBrokerWithExtras_PlaceOrder_Call) Run

func (*MockBrokerWithExtras_PlaceOrder_Call) RunAndReturn

type MockinstrumentGetter

type MockinstrumentGetter struct {
	mock.Mock
}

MockinstrumentGetter is an autogenerated mock type for the instrumentGetter type

func NewMockinstrumentGetter

func NewMockinstrumentGetter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockinstrumentGetter

NewMockinstrumentGetter creates a new instance of MockinstrumentGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockinstrumentGetter) EXPECT

func (*MockinstrumentGetter) GetInstrument

func (_mock *MockinstrumentGetter) GetInstrument(ctx context.Context, market string, symbol string) (*broker.Instrument, error)

GetInstrument provides a mock function for the type MockinstrumentGetter

type MockinstrumentGetter_Expecter

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

func (*MockinstrumentGetter_Expecter) GetInstrument

func (_e *MockinstrumentGetter_Expecter) GetInstrument(ctx interface{}, market interface{}, symbol interface{}) *MockinstrumentGetter_GetInstrument_Call

GetInstrument is a helper method to define mock.On call

  • ctx context.Context
  • market string
  • symbol string

type MockinstrumentGetter_GetInstrument_Call

type MockinstrumentGetter_GetInstrument_Call struct {
	*mock.Call
}

MockinstrumentGetter_GetInstrument_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstrument'

func (*MockinstrumentGetter_GetInstrument_Call) Return

func (*MockinstrumentGetter_GetInstrument_Call) Run

func (*MockinstrumentGetter_GetInstrument_Call) RunAndReturn

type MockorderFillsGetter

type MockorderFillsGetter struct {
	mock.Mock
}

MockorderFillsGetter is an autogenerated mock type for the orderFillsGetter type

func NewMockorderFillsGetter

func NewMockorderFillsGetter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockorderFillsGetter

NewMockorderFillsGetter creates a new instance of MockorderFillsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockorderFillsGetter) EXPECT

func (*MockorderFillsGetter) GetOrderFills

func (_mock *MockorderFillsGetter) GetOrderFills(ctx context.Context, orderID string) ([]broker.OrderFill, error)

GetOrderFills provides a mock function for the type MockorderFillsGetter

type MockorderFillsGetter_Expecter

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

func (*MockorderFillsGetter_Expecter) GetOrderFills

func (_e *MockorderFillsGetter_Expecter) GetOrderFills(ctx interface{}, orderID interface{}) *MockorderFillsGetter_GetOrderFills_Call

GetOrderFills is a helper method to define mock.On call

  • ctx context.Context
  • orderID string

type MockorderFillsGetter_GetOrderFills_Call

type MockorderFillsGetter_GetOrderFills_Call struct {
	*mock.Call
}

MockorderFillsGetter_GetOrderFills_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrderFills'

func (*MockorderFillsGetter_GetOrderFills_Call) Return

func (*MockorderFillsGetter_GetOrderFills_Call) Run

func (*MockorderFillsGetter_GetOrderFills_Call) RunAndReturn

type MockorderGetter

type MockorderGetter struct {
	mock.Mock
}

MockorderGetter is an autogenerated mock type for the orderGetter type

func NewMockorderGetter

func NewMockorderGetter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockorderGetter

NewMockorderGetter creates a new instance of MockorderGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockorderGetter) EXPECT

func (*MockorderGetter) GetOrder

func (_mock *MockorderGetter) GetOrder(ctx context.Context, orderID string) (*broker.OrderResult, error)

GetOrder provides a mock function for the type MockorderGetter

type MockorderGetter_Expecter

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

func (*MockorderGetter_Expecter) GetOrder

func (_e *MockorderGetter_Expecter) GetOrder(ctx interface{}, orderID interface{}) *MockorderGetter_GetOrder_Call

GetOrder is a helper method to define mock.On call

  • ctx context.Context
  • orderID string

type MockorderGetter_GetOrder_Call

type MockorderGetter_GetOrder_Call struct {
	*mock.Call
}

MockorderGetter_GetOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrder'

func (*MockorderGetter_GetOrder_Call) Return

func (*MockorderGetter_GetOrder_Call) Run

func (*MockorderGetter_GetOrder_Call) RunAndReturn

Jump to

Keyboard shortcuts

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