Documentation ¶
Overview ¶
package signalsvc is a generated GoMock package.
Index ¶
- type MockSignalService
- func (m *MockSignalService) CloseDeadPositions(sourceAccountID, destinationAccountID int64, groupID string, minToExpire int32) ([]*tradetransaction.TradeRequest, error)
- func (m *MockSignalService) ConfirmByExternalID(destinationAccountID, externalID, tickerBeatsID, positionID int64, ...) error
- func (m *MockSignalService) CreateTickerBeats(sourceAccountID, destinationAccountID int64, groupID string, minToExpire int32) (int64, error)
- func (m *MockSignalService) EXPECT() *MockSignalServiceMockRecorder
- func (m *MockSignalService) GetSignalByDestination(accountID int64) ([]*signal.Signal, error)
- func (m *MockSignalService) GetTradeRequesByGroupID(destinationAccountID int64, groupID string, entry tickerbeats_v1.DealEntry) ([]*tradetransaction.TradeRequest, error)
- func (m *MockSignalService) NeedToCloseAllPositions(accountID int64, groupID string, stop int32) ([]*tradetransaction.TradeRequest, error)
- func (m *MockSignalService) RemoveDuplicatedSignals(destinationAccountID int64, groupID string) error
- func (m *MockSignalService) UpdatePositionIdBeforeClose(sourceAccountID, destinationAccountID int64, groupID string) error
- func (m *MockSignalService) UpdateStatus(sourceAccountID, destinationAccountID int64, status signal.SignalStatusEnum, ...) error
- type MockSignalServiceMockRecorder
- func (mr *MockSignalServiceMockRecorder) CloseDeadPositions(sourceAccountID, destinationAccountID, groupID, minToExpire interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) ConfirmByExternalID(...) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) CreateTickerBeats(sourceAccountID, destinationAccountID, groupID, minToExpire interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) GetSignalByDestination(accountID interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) GetTradeRequesByGroupID(destinationAccountID, groupID, entry interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) NeedToCloseAllPositions(accountID, groupID, stop interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) RemoveDuplicatedSignals(destinationAccountID, groupID interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) UpdatePositionIdBeforeClose(sourceAccountID, destinationAccountID, groupID interface{}) *gomock.Call
- func (mr *MockSignalServiceMockRecorder) UpdateStatus(sourceAccountID, destinationAccountID, status, groupID interface{}) *gomock.Call
- type SignalService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSignalService ¶ added in v0.17.0
type MockSignalService struct {
// contains filtered or unexported fields
}
MockSignalService is a mock of SignalService interface.
func NewMockSignalService ¶ added in v0.17.0
func NewMockSignalService(ctrl *gomock.Controller) *MockSignalService
NewMockSignalService creates a new mock instance.
func (*MockSignalService) CloseDeadPositions ¶ added in v0.17.0
func (m *MockSignalService) CloseDeadPositions(sourceAccountID, destinationAccountID int64, groupID string, minToExpire int32) ([]*tradetransaction.TradeRequest, error)
CloseDeadPositions mocks base method.
func (*MockSignalService) ConfirmByExternalID ¶ added in v0.17.0
func (m *MockSignalService) ConfirmByExternalID(destinationAccountID, externalID, tickerBeatsID, positionID int64, status signal.SignalStatusEnum) error
ConfirmByExternalID mocks base method.
func (*MockSignalService) CreateTickerBeats ¶ added in v0.17.0
func (m *MockSignalService) CreateTickerBeats(sourceAccountID, destinationAccountID int64, groupID string, minToExpire int32) (int64, error)
CreateTickerBeats mocks base method.
func (*MockSignalService) EXPECT ¶ added in v0.17.0
func (m *MockSignalService) EXPECT() *MockSignalServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSignalService) GetSignalByDestination ¶ added in v0.17.0
func (m *MockSignalService) GetSignalByDestination(accountID int64) ([]*signal.Signal, error)
GetSignalByDestination mocks base method.
func (*MockSignalService) GetTradeRequesByGroupID ¶ added in v0.17.0
func (m *MockSignalService) GetTradeRequesByGroupID(destinationAccountID int64, groupID string, entry tickerbeats_v1.DealEntry) ([]*tradetransaction.TradeRequest, error)
GetTradeRequesByGroupID mocks base method.
func (*MockSignalService) NeedToCloseAllPositions ¶ added in v0.17.0
func (m *MockSignalService) NeedToCloseAllPositions(accountID int64, groupID string, stop int32) ([]*tradetransaction.TradeRequest, error)
NeedToCloseAllPositions mocks base method.
func (*MockSignalService) RemoveDuplicatedSignals ¶ added in v0.17.0
func (m *MockSignalService) RemoveDuplicatedSignals(destinationAccountID int64, groupID string) error
RemoveDuplicatedSignals mocks base method.
func (*MockSignalService) UpdatePositionIdBeforeClose ¶ added in v0.17.0
func (m *MockSignalService) UpdatePositionIdBeforeClose(sourceAccountID, destinationAccountID int64, groupID string) error
UpdatePositionIdBeforeClose mocks base method.
func (*MockSignalService) UpdateStatus ¶ added in v0.17.0
func (m *MockSignalService) UpdateStatus(sourceAccountID, destinationAccountID int64, status signal.SignalStatusEnum, groupID string) error
UpdateStatus mocks base method.
type MockSignalServiceMockRecorder ¶ added in v0.17.0
type MockSignalServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockSignalServiceMockRecorder is the mock recorder for MockSignalService.
func (*MockSignalServiceMockRecorder) CloseDeadPositions ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) CloseDeadPositions(sourceAccountID, destinationAccountID, groupID, minToExpire interface{}) *gomock.Call
CloseDeadPositions indicates an expected call of CloseDeadPositions.
func (*MockSignalServiceMockRecorder) ConfirmByExternalID ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) ConfirmByExternalID(destinationAccountID, externalID, tickerBeatsID, positionID, status interface{}) *gomock.Call
ConfirmByExternalID indicates an expected call of ConfirmByExternalID.
func (*MockSignalServiceMockRecorder) CreateTickerBeats ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) CreateTickerBeats(sourceAccountID, destinationAccountID, groupID, minToExpire interface{}) *gomock.Call
CreateTickerBeats indicates an expected call of CreateTickerBeats.
func (*MockSignalServiceMockRecorder) GetSignalByDestination ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) GetSignalByDestination(accountID interface{}) *gomock.Call
GetSignalByDestination indicates an expected call of GetSignalByDestination.
func (*MockSignalServiceMockRecorder) GetTradeRequesByGroupID ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) GetTradeRequesByGroupID(destinationAccountID, groupID, entry interface{}) *gomock.Call
GetTradeRequesByGroupID indicates an expected call of GetTradeRequesByGroupID.
func (*MockSignalServiceMockRecorder) NeedToCloseAllPositions ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) NeedToCloseAllPositions(accountID, groupID, stop interface{}) *gomock.Call
NeedToCloseAllPositions indicates an expected call of NeedToCloseAllPositions.
func (*MockSignalServiceMockRecorder) RemoveDuplicatedSignals ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) RemoveDuplicatedSignals(destinationAccountID, groupID interface{}) *gomock.Call
RemoveDuplicatedSignals indicates an expected call of RemoveDuplicatedSignals.
func (*MockSignalServiceMockRecorder) UpdatePositionIdBeforeClose ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) UpdatePositionIdBeforeClose(sourceAccountID, destinationAccountID, groupID interface{}) *gomock.Call
UpdatePositionIdBeforeClose indicates an expected call of UpdatePositionIdBeforeClose.
func (*MockSignalServiceMockRecorder) UpdateStatus ¶ added in v0.17.0
func (mr *MockSignalServiceMockRecorder) UpdateStatus(sourceAccountID, destinationAccountID, status, groupID interface{}) *gomock.Call
UpdateStatus indicates an expected call of UpdateStatus.
type SignalService ¶
type SignalService interface { CloseDeadPositions(sourceAccountID, destinationAccountID int64, groupID string, minToExpire int32) ([]*tm.TradeRequest, error) ConfirmByExternalID(destinationAccountID, externalID, tickerBeatsID, positionID int64, status signal.SignalStatusEnum) error CreateTickerBeats(sourceAccountID, destinationAccountID int64, groupID string, minToExpire int32) (int64, error) GetTradeRequesByGroupID(destinationAccountID int64, groupID string, entry v1.DealEntry) ([]*tm.TradeRequest, error) GetSignalByDestination(accountID int64) ([]*signal.Signal, error) NeedToCloseAllPositions(accountID int64, groupID string, stop int32) ([]*tm.TradeRequest, error) RemoveDuplicatedSignals(destinationAccountID int64, groupID string) error UpdatePositionIdBeforeClose(sourceAccountID, destinationAccountID int64, groupID string) error UpdateStatus(sourceAccountID, destinationAccountID int64, status signal.SignalStatusEnum, groupID string) error }
SignalService is a CRUD to the database
func NewSignalService ¶
func NewSignalService(ctx context.Context, signal repo.SignalRepository) SignalService
NewSignalService creates a service to interact with PostgreSQL