Documentation ¶
Index ¶
- type ProductService
- func (s *ProductService) CreateProduct(ctx context.Context, product *models.Product) error
- func (s *ProductService) DeleteProduct(ctx context.Context, id string) error
- func (s *ProductService) GetAllProducts(ctx context.Context) ([]models.Product, error)
- func (s *ProductService) GetProductByID(ctx context.Context, id string) (*models.Product, error)
- func (s *ProductService) HandleOrderPlacedEvent(ctx context.Context, data map[string]interface{}) error
- func (s *ProductService) UpdateProduct(ctx context.Context, product *models.Product) error
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
}
func NewProductService ¶
func NewProductService(repo *repositories.ProductRepository) *ProductService
func (*ProductService) CreateProduct ¶
func (*ProductService) DeleteProduct ¶
func (s *ProductService) DeleteProduct(ctx context.Context, id string) error
func (*ProductService) GetAllProducts ¶
func (*ProductService) GetProductByID ¶
func (*ProductService) HandleOrderPlacedEvent ¶
func (s *ProductService) HandleOrderPlacedEvent(ctx context.Context, data map[string]interface{}) error
func (*ProductService) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.