Documentation ¶
Overview ¶
package accountsrepo is a generated GoMock package.
Index ¶
- type AccountRepository
- type MockAccountRepository
- func (m *MockAccountRepository) Delete(accountID int64) error
- func (m *MockAccountRepository) EXPECT() *MockAccountRepositoryMockRecorder
- func (m *MockAccountRepository) GetByID(accountID int64) (*accounts.Account, error)
- func (m *MockAccountRepository) Insert(ac *accounts.Account, serverTime int64) error
- func (m *MockAccountRepository) Update(ac *accounts.Account) error
- type MockAccountRepositoryMockRecorder
- func (mr *MockAccountRepositoryMockRecorder) Delete(accountID interface{}) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) GetByID(accountID interface{}) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) Insert(ac, serverTime interface{}) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) Update(ac interface{}) *gomock.Call
- type MockAccountsRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository interface { Insert(ac *model.Account, serverTime int64) error GetByID(accountID int64) (*model.Account, error) Update(ac *model.Account) error Delete(accountID int64) error }
AccountRepository is a CRUD to the database
func NewAccountsRepo ¶
func NewAccountsRepo(ctx context.Context, dbCon *sqlx.DB) AccountRepository
NewAccountsRepo creates a service to interact with PostgreSQL
type MockAccountRepository ¶ added in v0.17.0
type MockAccountRepository struct {
// contains filtered or unexported fields
}
MockAccountRepository is a mock of AccountRepository interface.
func NewMockAccountRepository ¶ added in v0.17.0
func NewMockAccountRepository(ctrl *gomock.Controller) *MockAccountRepository
NewMockAccountRepository creates a new mock instance.
func (*MockAccountRepository) Delete ¶ added in v0.17.0
func (m *MockAccountRepository) Delete(accountID int64) error
Delete mocks base method.
func (*MockAccountRepository) EXPECT ¶ added in v0.17.0
func (m *MockAccountRepository) EXPECT() *MockAccountRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAccountRepository) GetByID ¶ added in v0.17.0
func (m *MockAccountRepository) GetByID(accountID int64) (*accounts.Account, error)
GetByID mocks base method.
type MockAccountRepositoryMockRecorder ¶ added in v0.17.0
type MockAccountRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockAccountRepositoryMockRecorder is the mock recorder for MockAccountRepository.
func (*MockAccountRepositoryMockRecorder) Delete ¶ added in v0.17.0
func (mr *MockAccountRepositoryMockRecorder) Delete(accountID interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockAccountRepositoryMockRecorder) GetByID ¶ added in v0.17.0
func (mr *MockAccountRepositoryMockRecorder) GetByID(accountID interface{}) *gomock.Call
GetByID indicates an expected call of GetByID.
func (*MockAccountRepositoryMockRecorder) Insert ¶ added in v0.17.0
func (mr *MockAccountRepositoryMockRecorder) Insert(ac, serverTime interface{}) *gomock.Call
Insert indicates an expected call of Insert.
func (*MockAccountRepositoryMockRecorder) Update ¶ added in v0.17.0
func (mr *MockAccountRepositoryMockRecorder) Update(ac interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockAccountsRepo ¶
MockAccountsRepo is an autogenerated mock type for the DealsRepository type
func (*MockAccountsRepo) Delete ¶
func (_m *MockAccountsRepo) Delete(accountID int64) error
Delete provides a mock function with given fields: accountID
func (*MockAccountsRepo) GetByID ¶
func (_m *MockAccountsRepo) GetByID(accountID int64) (*accounts.Account, error)
GetByID provides a mock function with given fields: accountID