Documentation ¶
Index ¶
- type CategoryService
- type CategoryServiceImpl
- func (c *CategoryServiceImpl) CreateCategory(ctx context.Context, cat *pb.Category, name, desc string) (*pb.Category, error)
- func (c *CategoryServiceImpl) DeleteCategory(ctx context.Context, filter *pb.GetCategoryFilter) (*pb.DeleteCategoryResponse, error)
- func (c *CategoryServiceImpl) GetCategories(ctx context.Context, fil *pb.GetCategoryFilter) (*pb.GetCategoryResponse, error)
- func (c *CategoryServiceImpl) GetCategoryByID(ctx context.Context, fil *pb.GetCategoryFilter) (*pb.GetCategoryResponse, error)
- func (c *CategoryServiceImpl) UpdateCategory(ctx context.Context, cat *pb.Category, name, desc string) (*pb.Category, error)
- type ProductService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryService ¶
type CategoryService interface { CreateCategory(c context.Context, cat *pb.Category, name, desc string) (*pb.Category, error) GetCategoryByID(c context.Context, fil *pb.GetCategoryFilter) (*pb.GetCategoryResponse, error) GetCategories(c context.Context, fil *pb.GetCategoryFilter) (*pb.GetCategoryResponse, error) UpdateCategory(c context.Context, cat *pb.Category, name, desc string) (*pb.Category, error) DeleteCategory(c context.Context, fil *pb.GetCategoryFilter) (*pb.DeleteCategoryResponse, error) }
func NewCategoryService ¶
func NewCategoryService(catRepo repository.CategoryRepository, logger *logger.Log) CategoryService
type CategoryServiceImpl ¶
type CategoryServiceImpl struct {
// contains filtered or unexported fields
}
func (*CategoryServiceImpl) CreateCategory ¶
func (*CategoryServiceImpl) DeleteCategory ¶
func (c *CategoryServiceImpl) DeleteCategory(ctx context.Context, filter *pb.GetCategoryFilter) (*pb.DeleteCategoryResponse, error)
func (*CategoryServiceImpl) GetCategories ¶
func (c *CategoryServiceImpl) GetCategories(ctx context.Context, fil *pb.GetCategoryFilter) (*pb.GetCategoryResponse, error)
func (*CategoryServiceImpl) GetCategoryByID ¶
func (c *CategoryServiceImpl) GetCategoryByID(ctx context.Context, fil *pb.GetCategoryFilter) (*pb.GetCategoryResponse, error)
type ProductService ¶
type ProductService interface { CreateProduct(context.Context, *pb.Product, string, string) (*pb.Product, error) GetProductByID(context.Context, *pb.GetProductFilter) (*pb.GetProductResponse, error) GetAllProducts(context.Context, *pb.GetProductFilter) (*pb.GetProductResponse, error) UpdateProduct(context.Context, *pb.Product) (*pb.Product, error) ApproveProduct(context.Context, *pb.ApproveProductRequest) (*pb.ApproveProductResponse, error) }
func NewProductService ¶
func NewProductService(productRepo repository.ProductRepository, logger *logger.Log) ProductService
Click to show internal directories.
Click to hide internal directories.