services

package
v0.0.0-...-10548b9 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 9 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 {
	proto.UnimplementedProductServiceServer
	// contains filtered or unexported fields
}

func NewProductService

func NewProductService(productRepository *repositories.ProductRepository) *ProductService

func (*ProductService) CreateProduct

func (p *ProductService) CreateProduct(product *models.Product) (*models.Product, error)

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()

Jump to

Keyboard shortcuts

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