Documentation ¶
Index ¶
- type MockController
- func (_m *MockController) CreateProduct(p *model.Product) (string, error)
- func (_m *MockController) DeleteProduct(id string) error
- func (_m *MockController) EXPECT() *MockControllerMockRecorder
- func (_m *MockController) GetProduct(id string) (*model.Product, error)
- func (_m *MockController) GetProducts(s *scope.Scope) ([]*model.Product, int, error)
- type MockControllerMockRecorder
- func (_mr *MockControllerMockRecorder) CreateProduct(arg0 interface{}) *gomock.Call
- func (_mr *MockControllerMockRecorder) DeleteProduct(arg0 interface{}) *gomock.Call
- func (_mr *MockControllerMockRecorder) GetProduct(arg0 interface{}) *gomock.Call
- func (_mr *MockControllerMockRecorder) GetProducts(arg0 interface{}) *gomock.Call
- type MockRepository
- func (_m *MockRepository) Create(p *model.Product) (string, error)
- func (_m *MockRepository) Delete(id string) error
- func (_m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (_m *MockRepository) Product(id string) (*model.Product, error)
- func (_m *MockRepository) Products(s *scope.Scope) ([]*model.Product, int, error)
- type MockRepositoryMockRecorder
- func (_mr *MockRepositoryMockRecorder) Create(arg0 interface{}) *gomock.Call
- func (_mr *MockRepositoryMockRecorder) Delete(arg0 interface{}) *gomock.Call
- func (_mr *MockRepositoryMockRecorder) Product(arg0 interface{}) *gomock.Call
- func (_mr *MockRepositoryMockRecorder) Products(arg0 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockController ¶
type MockController struct {
// contains filtered or unexported fields
}
MockController is a mock of Controller interface
func NewMockController ¶
func NewMockController(ctrl *gomock.Controller) *MockController
NewMockController creates a new mock instance
func (*MockController) CreateProduct ¶
func (_m *MockController) CreateProduct(p *model.Product) (string, error)
CreateProduct mocks base method
func (*MockController) DeleteProduct ¶
func (_m *MockController) DeleteProduct(id string) error
DeleteProduct mocks base method
func (*MockController) EXPECT ¶
func (_m *MockController) EXPECT() *MockControllerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockController) GetProduct ¶
func (_m *MockController) GetProduct(id string) (*model.Product, error)
GetProduct mocks base method
func (*MockController) GetProducts ¶
GetProducts mocks base method
type MockControllerMockRecorder ¶
type MockControllerMockRecorder struct {
// contains filtered or unexported fields
}
MockControllerMockRecorder is the mock recorder for MockController
func (*MockControllerMockRecorder) CreateProduct ¶
func (_mr *MockControllerMockRecorder) CreateProduct(arg0 interface{}) *gomock.Call
CreateProduct indicates an expected call of CreateProduct
func (*MockControllerMockRecorder) DeleteProduct ¶
func (_mr *MockControllerMockRecorder) DeleteProduct(arg0 interface{}) *gomock.Call
DeleteProduct indicates an expected call of DeleteProduct
func (*MockControllerMockRecorder) GetProduct ¶
func (_mr *MockControllerMockRecorder) GetProduct(arg0 interface{}) *gomock.Call
GetProduct indicates an expected call of GetProduct
func (*MockControllerMockRecorder) GetProducts ¶
func (_mr *MockControllerMockRecorder) GetProducts(arg0 interface{}) *gomock.Call
GetProducts indicates an expected call of GetProducts
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface
func NewMockRepository ¶
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance
func (*MockRepository) Create ¶
func (_m *MockRepository) Create(p *model.Product) (string, error)
Create mocks base method
func (*MockRepository) Delete ¶
func (_m *MockRepository) Delete(id string) error
Delete mocks base method
func (*MockRepository) EXPECT ¶
func (_m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository
func (*MockRepositoryMockRecorder) Create ¶
func (_mr *MockRepositoryMockRecorder) Create(arg0 interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockRepositoryMockRecorder) Delete ¶
func (_mr *MockRepositoryMockRecorder) Delete(arg0 interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockRepositoryMockRecorder) Product ¶
func (_mr *MockRepositoryMockRecorder) Product(arg0 interface{}) *gomock.Call
Product indicates an expected call of Product
func (*MockRepositoryMockRecorder) Products ¶
func (_mr *MockRepositoryMockRecorder) Products(arg0 interface{}) *gomock.Call
Products indicates an expected call of Products