service

package
v0.0.0-...-2068963 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (c *CategoryServiceImpl) CreateCategory(ctx context.Context, cat *pb.Category, name, desc string) (*pb.Category, error)

func (*CategoryServiceImpl) DeleteCategory

func (*CategoryServiceImpl) GetCategories

func (*CategoryServiceImpl) GetCategoryByID

func (*CategoryServiceImpl) UpdateCategory

func (c *CategoryServiceImpl) UpdateCategory(ctx context.Context, cat *pb.Category, name, desc string) (*pb.Category, 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

Jump to

Keyboard shortcuts

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