Documentation ¶
Index ¶
- type NewRepositoryT
- type NewServiceT
- type Repository
- func (_m *Repository) CheckProductCode(ctx context.Context, id int, productCode string) bool
- func (_m *Repository) CheckProductType(ctx context.Context, productTypeId int) bool
- func (_m *Repository) Delete(ctx context.Context, id int) error
- func (_m *Repository) GetAll(ctx context.Context) ([]products.Product, error)
- func (_m *Repository) GetById(ctx context.Context, id int) (products.Product, error)
- func (_m *Repository) Store(ctx context.Context, prod products.Product) (products.Product, error)
- func (_m *Repository) Update(ctx context.Context, prod products.Product, id int) (products.Product, error)
- type Service
- func (_m *Service) Delete(ctx context.Context, id int) error
- func (_m *Service) GetAll(ctx context.Context) ([]products.Product, error)
- func (_m *Service) GetById(ctx context.Context, id int) (products.Product, error)
- func (_m *Service) Store(ctx context.Context, prod products.Product) (products.Product, error)
- func (_m *Service) Update(ctx context.Context, prod products.Product, id int) (products.Product, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewRepositoryT ¶
type NewServiceT ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t NewRepositoryT) *Repository
NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Repository) CheckProductCode ¶
CheckProductCode provides a mock function with given fields: ctx, id, productCode
func (*Repository) CheckProductType ¶
func (_m *Repository) CheckProductType(ctx context.Context, productTypeId int) bool
CheckProductType provides a mock function with given fields: ctx, productTypeId
func (*Repository) Delete ¶
func (_m *Repository) Delete(ctx context.Context, id int) error
Delete provides a mock function with given fields: ctx, id
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
func NewService(t NewServiceT) *Service
NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.