Documentation
¶
Index ¶
- type ProductService
- func (s *ProductService) CreateProduct(productName, baseURL string) error
- func (s *ProductService) DeleteProduct(id int64) error
- func (s *ProductService) GetProduct(id int64) (*entity.Product, error)
- func (s *ProductService) ListProducts() ([]*entity.Product, error)
- func (s *ProductService) UpdateProduct(e *entity.Product) error
- type Reader
- type Repository
- type UseCase
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
Service product usecase
func NewProductService ¶
func NewProductService(r Repository) *ProductService
NewProductService create new product service
func (*ProductService) CreateProduct ¶
func (s *ProductService) CreateProduct(productName, baseURL string) error
CreateProduct create a product
func (*ProductService) DeleteProduct ¶
func (s *ProductService) DeleteProduct(id int64) error
DeleteProduct delete a product record
func (*ProductService) GetProduct ¶
func (s *ProductService) GetProduct(id int64) (*entity.Product, error)
GerProduct get a product record
func (*ProductService) ListProducts ¶
func (s *ProductService) ListProducts() ([]*entity.Product, error)
ListProducts lists product records
func (*ProductService) UpdateProduct ¶
func (s *ProductService) UpdateProduct(e *entity.Product) error
UpdateProduct update a product record
Click to show internal directories.
Click to hide internal directories.