Documentation ¶
Index ¶
- type Product
- type ReadProductRepository
- type ReadProductService
- func (s *ReadProductService) GetProductByID(ctx context.Context, productID string) (*Product, error)
- func (s *ReadProductService) ListProductByCategory(ctx context.Context, categoryName string) ([]Product, error)
- func (s *ReadProductService) ListProductsByName(ctx context.Context, limit, offset int, name string) ([]Product, error)
- type WriteProductRepository
- type WriteProductService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadProductRepository ¶
type ReadProductRepository interface { GetProductByID(ctx context.Context, id string) (*Product, error) ListProducts(ctx context.Context, limit, offset int) ([]Product, error) // no se va a usar por lo visto ListProductsByName(ctx context.Context, limit, offset int, description string) ([]Product, error) ListProductByCategory(ctx context.Context, categoryID string) ([]Product, error) }
type ReadProductService ¶
type ReadProductService struct {
// contains filtered or unexported fields
}
func NewReadProductService ¶
func NewReadProductService(readProductRepo ReadProductRepository, readCategoryRepo domain.ReadCategoryRepository) *ReadProductService
func (*ReadProductService) GetProductByID ¶
func (*ReadProductService) ListProductByCategory ¶
func (*ReadProductService) ListProductsByName ¶
type WriteProductRepository ¶
type WriteProductService ¶
type WriteProductService struct {
// contains filtered or unexported fields
}
func NewWriteProductService ¶
func NewWriteProductService(writeProductRepo WriteProductRepository, writeCategoryRepo domain.WriteCategoryRepository, readCategoryRepo domain.ReadCategoryRepository) *WriteProductService
func (*WriteProductService) CreateProduct ¶
func (*WriteProductService) DeleteProduct ¶
func (s *WriteProductService) DeleteProduct(ctx context.Context, productID string) error
func (*WriteProductService) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.