Documentation ¶
Index ¶
- Variables
- type CatalogUsecase
- func (uc *CatalogUsecase) GetProduct(ctx context.Context, productId string) (product.Product, error)
- func (uc *CatalogUsecase) ListProducts(ctx context.Context, pageSize int, pageToken string) ([]product.Product, error)
- func (uc *CatalogUsecase) SearchProducts(ctx context.Context, query string, pageSize int, pageToken string) ([]product.Product, error)
- type ProductRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewCatalogUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type CatalogUsecase ¶
type CatalogUsecase struct {
// contains filtered or unexported fields
}
CartUsecase is a Cart usecase.
func NewCatalogUsecase ¶
func NewCatalogUsecase(repo ProductRepo, logger log.Logger) *CatalogUsecase
NewCartUsecase new a Cart usecase.
func (*CatalogUsecase) GetProduct ¶
func (uc *CatalogUsecase) GetProduct(ctx context.Context, productId string) (product.Product, error)
GetCart get cart of a user.
func (*CatalogUsecase) ListProducts ¶
func (uc *CatalogUsecase) ListProducts(ctx context.Context, pageSize int, pageToken string) ([]product.Product, error)
AddItem add cart item into a cart for a user.
Click to show internal directories.
Click to hide internal directories.