Documentation ¶
Overview ¶
package dealsrepo is a generated GoMock package.
Index ¶
- type DealsRepository
- type MockDealsRepository
- func (m *MockDealsRepository) Delete(accountID, dealID int64) error
- func (m *MockDealsRepository) EXPECT() *MockDealsRepositoryMockRecorder
- func (m *MockDealsRepository) GetByID(accountID, dealID int64) (*deals.Deal, error)
- func (m *MockDealsRepository) GetTickerBeats(accountID int64, from time.Time) ([]*deals.Deal, error)
- func (m *MockDealsRepository) Insert(ac *deals.Deal) error
- func (m *MockDealsRepository) Update(ac *deals.Deal) error
- func (m *MockDealsRepository) UpdateOrderIdByPosition(accountID, positionID, orderID int64) error
- type MockDealsRepositoryMockRecorder
- func (mr *MockDealsRepositoryMockRecorder) Delete(accountID, dealID interface{}) *gomock.Call
- func (mr *MockDealsRepositoryMockRecorder) GetByID(accountID, dealID interface{}) *gomock.Call
- func (mr *MockDealsRepositoryMockRecorder) GetTickerBeats(accountID, from interface{}) *gomock.Call
- func (mr *MockDealsRepositoryMockRecorder) Insert(ac interface{}) *gomock.Call
- func (mr *MockDealsRepositoryMockRecorder) Update(ac interface{}) *gomock.Call
- func (mr *MockDealsRepositoryMockRecorder) UpdateOrderIdByPosition(accountID, positionID, orderID interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DealsRepository ¶
type DealsRepository interface { Insert(ac *deals.Deal) error GetByID(accountID, dealID int64) (*deals.Deal, error) Update(ac *deals.Deal) error Delete(accountID, dealID int64) error GetTickerBeats(accountID int64, from time.Time) ([]*deals.Deal, error) UpdateOrderIdByPosition(accountID, positionID, orderID int64) error }
DealsRepository is a CRUD to the database
func NewDealsRepo ¶
func NewDealsRepo(ctx context.Context, dbCon *sqlx.DB) DealsRepository
NewDealsRepo creates a service to interact with PostgreSQL
type MockDealsRepository ¶ added in v0.17.0
type MockDealsRepository struct {
// contains filtered or unexported fields
}
MockDealsRepository is a mock of DealsRepository interface.
func NewMockDealsRepository ¶ added in v0.17.0
func NewMockDealsRepository(ctrl *gomock.Controller) *MockDealsRepository
NewMockDealsRepository creates a new mock instance.
func (*MockDealsRepository) Delete ¶ added in v0.17.0
func (m *MockDealsRepository) Delete(accountID, dealID int64) error
Delete mocks base method.
func (*MockDealsRepository) EXPECT ¶ added in v0.17.0
func (m *MockDealsRepository) EXPECT() *MockDealsRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDealsRepository) GetByID ¶ added in v0.17.0
func (m *MockDealsRepository) GetByID(accountID, dealID int64) (*deals.Deal, error)
GetByID mocks base method.
func (*MockDealsRepository) GetTickerBeats ¶ added in v0.17.0
func (m *MockDealsRepository) GetTickerBeats(accountID int64, from time.Time) ([]*deals.Deal, error)
GetTickerBeats mocks base method.
func (*MockDealsRepository) Insert ¶ added in v0.17.0
func (m *MockDealsRepository) Insert(ac *deals.Deal) error
Insert mocks base method.
func (*MockDealsRepository) Update ¶ added in v0.17.0
func (m *MockDealsRepository) Update(ac *deals.Deal) error
Update mocks base method.
func (*MockDealsRepository) UpdateOrderIdByPosition ¶ added in v0.17.0
func (m *MockDealsRepository) UpdateOrderIdByPosition(accountID, positionID, orderID int64) error
UpdateOrderIdByPosition mocks base method.
type MockDealsRepositoryMockRecorder ¶ added in v0.17.0
type MockDealsRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockDealsRepositoryMockRecorder is the mock recorder for MockDealsRepository.
func (*MockDealsRepositoryMockRecorder) Delete ¶ added in v0.17.0
func (mr *MockDealsRepositoryMockRecorder) Delete(accountID, dealID interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockDealsRepositoryMockRecorder) GetByID ¶ added in v0.17.0
func (mr *MockDealsRepositoryMockRecorder) GetByID(accountID, dealID interface{}) *gomock.Call
GetByID indicates an expected call of GetByID.
func (*MockDealsRepositoryMockRecorder) GetTickerBeats ¶ added in v0.17.0
func (mr *MockDealsRepositoryMockRecorder) GetTickerBeats(accountID, from interface{}) *gomock.Call
GetTickerBeats indicates an expected call of GetTickerBeats.
func (*MockDealsRepositoryMockRecorder) Insert ¶ added in v0.17.0
func (mr *MockDealsRepositoryMockRecorder) Insert(ac interface{}) *gomock.Call
Insert indicates an expected call of Insert.
func (*MockDealsRepositoryMockRecorder) Update ¶ added in v0.17.0
func (mr *MockDealsRepositoryMockRecorder) Update(ac interface{}) *gomock.Call
Update indicates an expected call of Update.
func (*MockDealsRepositoryMockRecorder) UpdateOrderIdByPosition ¶ added in v0.17.0
func (mr *MockDealsRepositoryMockRecorder) UpdateOrderIdByPosition(accountID, positionID, orderID interface{}) *gomock.Call
UpdateOrderIdByPosition indicates an expected call of UpdateOrderIdByPosition.