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