Documentation ¶
Index ¶
- type ProductService
- func (p *ProductService) CreateProduct(product *models.Product) (*models.Product, error)
- func (p *ProductService) GetAllProducts() ([]*models.Product, error)
- func (p *ProductService) GetProductById(id int32) (*models.Product, error)
- func (p *ProductService) GetShopProducts(shopId int32) ([]*models.Product, error)
- func (p *ProductService) GetShopProductsByShopId(ctx context.Context, in *proto.ReqShopProducts) (*proto.ShopProducts, error)
- func (p *ProductService) StartProductGrpcServer()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductService ¶
type ProductService struct { proto.UnimplementedProductServiceServer // contains filtered or unexported fields }
func NewProductService ¶
func NewProductService(productRepository *repositories.ProductRepository) *ProductService
func (*ProductService) CreateProduct ¶
func (*ProductService) GetAllProducts ¶
func (p *ProductService) GetAllProducts() ([]*models.Product, error)
func (*ProductService) GetProductById ¶
func (p *ProductService) GetProductById(id int32) (*models.Product, error)
func (*ProductService) GetShopProducts ¶
func (p *ProductService) GetShopProducts(shopId int32) ([]*models.Product, error)
func (*ProductService) GetShopProductsByShopId ¶
func (p *ProductService) GetShopProductsByShopId(ctx context.Context, in *proto.ReqShopProducts) (*proto.ShopProducts, error)
func (*ProductService) StartProductGrpcServer ¶
func (p *ProductService) StartProductGrpcServer()
Click to show internal directories.
Click to hide internal directories.