Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ProductsService ¶
type ProductsService interface { // errors that this function can return: // // 1. ErrNotFound // // 2. ErrInternalServer // // 3. ErrInvalidInput GetProducts(ctx context.Context, page int) ([]dto.GetProduct, error) // errors that this function can return: // // 1. ErrInternalServer // // 2. ErrInvalidInput // // 3. ErrNotFound GetProductById(ctx context.Context, id string) (dto.GetProduct, error) // errors that this function can return: // // 1. ErrInternalServer // // 2. ErrInvalidInput SaveProduct(ctx context.Context, product dto.SaveProduct) (dto.GetProduct, error) // errors that this function can return: // // 1. ErrInternalServer // // 2. ErrInvalidInput // // 3. ErrNotFound SearchProducts(ctx context.Context, term string) ([]dto.GetProduct, error) // errors that this function can return: // // 1. ErrInternalServer // // 2. ErrInvalidInput // // 3. ErrNotFound UpdateProduct(ctx context.Context, product dto.UpdateProduct) (dto.GetProduct, error) // errors that this function can return: // // 1. ErrInternalServer // // 2. ErrInvalidInput // // 3. ErrNotFound DeleteProductById(ctx context.Context, id string) error }
func NewProductsService ¶
func NewProductsService(productsServiceCfg config.ProductsService, productsRepo repository.ProductsRepository) ProductsService
Click to show internal directories.
Click to hide internal directories.