Documentation ¶
Index ¶
- type NewRepositoryT
- type NewServiceT
- type Repository
- func (_m *Repository) Create(ctx context.Context, buyer domain.Buyer) (domain.Buyer, error)
- func (_m *Repository) Delete(ctx context.Context, id int) error
- func (_m *Repository) GetAll(ctx context.Context) ([]domain.Buyer, error)
- func (_m *Repository) GetBuyerOrdersById(ctx context.Context, id int) (domain.BuyerTotalOrders, error)
- func (_m *Repository) GetBuyerTotalOrders(ctx context.Context) ([]domain.BuyerTotalOrders, error)
- func (_m *Repository) GetById(ctx context.Context, id int) (domain.Buyer, error)
- func (_m *Repository) Update(ctx context.Context, buyer domain.Buyer) (domain.Buyer, error)
- func (_m *Repository) ValidateCardNumberId(ctx context.Context, id int, cardNumber string) (bool, error)
- type Service
- func (_m *Service) Create(ctx context.Context, buyer domain.Buyer) (domain.Buyer, error)
- func (_m *Service) Delete(ctx context.Context, id int) error
- func (_m *Service) GetAll(ctx context.Context) ([]domain.Buyer, error)
- func (_m *Service) GetBuyerOrdersById(ctx context.Context, id int) (domain.BuyerTotalOrders, error)
- func (_m *Service) GetBuyerTotalOrders(ctx context.Context) ([]domain.BuyerTotalOrders, error)
- func (_m *Service) GetById(ctx context.Context, id int) (domain.Buyer, error)
- func (_m *Service) Update(ctx context.Context, buyer domain.Buyer) (domain.Buyer, 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) Delete ¶
func (_m *Repository) Delete(ctx context.Context, id int) error
Delete provides a mock function with given fields: ctx, id
func (*Repository) GetBuyerOrdersById ¶
func (_m *Repository) GetBuyerOrdersById(ctx context.Context, id int) (domain.BuyerTotalOrders, error)
GetBuyerOrdersById provides a mock function with given fields: ctx, id
func (*Repository) GetBuyerTotalOrders ¶
func (_m *Repository) GetBuyerTotalOrders(ctx context.Context) ([]domain.BuyerTotalOrders, error)
GetBuyerTotalOrders provides a mock function with given fields: ctx
func (*Repository) ValidateCardNumberId ¶
func (_m *Repository) ValidateCardNumberId(ctx context.Context, id int, cardNumber string) (bool, error)
ValidadeCardNumberId provides a mock function with given fields: ctx, id, cardNumber
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.
func (*Service) GetBuyerOrdersById ¶
GetBuyerOrdersById provides a mock function with given fields: ctx, id
func (*Service) GetBuyerTotalOrders ¶
GetBuyerTotalOrders provides a mock function with given fields: ctx