services

package
v0.0.0-...-01a1143 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 (s *ProductService) CreateProduct(ctx context.Context, product *models.Product) error

func (*ProductService) DeleteProduct

func (s *ProductService) DeleteProduct(ctx context.Context, id string) error

func (*ProductService) GetAllProducts

func (s *ProductService) GetAllProducts(ctx context.Context) ([]models.Product, error)

func (*ProductService) GetProductByID

func (s *ProductService) GetProductByID(ctx context.Context, id string) (*models.Product, error)

func (*ProductService) HandleOrderPlacedEvent

func (s *ProductService) HandleOrderPlacedEvent(ctx context.Context, data map[string]interface{}) error

func (*ProductService) UpdateProduct

func (s *ProductService) UpdateProduct(ctx context.Context, product *models.Product) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL