Documentation
¶
Index ¶
- type CartService
- type CartServiceImpl
- func (s *CartServiceImpl) BulkRemoveItemsFromUserCart(ctx context.Context, userId string, itemIds []string) ([]cart.CartItem, error)
- func (s *CartServiceImpl) GetUserCartItems(ctx context.Context, userId string) ([]cart.CartItem, error)
- func (s *CartServiceImpl) SaveCartItem(ctx context.Context, item *cart.CartItem) (*cart.CartItem, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartService ¶
type CartService interface { SaveCartItem(ctx context.Context, item *cart.CartItem) (*cart.CartItem, error) GetUserCartItems(ctx context.Context, userId string) ([]cart.CartItem, error) BulkRemoveItemsFromUserCart(ctx context.Context, userId string, itemIds []string) ([]cart.CartItem, error) }
CartService is the interface that describes a cart service object.
type CartServiceImpl ¶
type CartServiceImpl struct {
// contains filtered or unexported fields
}
func NewCartService ¶
func NewCartService(cartRepo cart.Repository, tracer opentracing.Tracer) *CartServiceImpl
NewCartService returns a new cart service object.
func (*CartServiceImpl) BulkRemoveItemsFromUserCart ¶
func (*CartServiceImpl) GetUserCartItems ¶
func (*CartServiceImpl) SaveCartItem ¶
func (s *CartServiceImpl) SaveCartItem(ctx context.Context, item *cart.CartItem) (*cart.CartItem, error)
SaveCartItem is the service handler to save an item to cart.
Click to show internal directories.
Click to hide internal directories.