Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartRepo ¶
type CartRepo struct {
// contains filtered or unexported fields
}
CartRepo is the default implementation for Repository interface.
func NewRepository ¶
NewRepository returns a new cart repository object.
func (*CartRepo) BulkRemoveItemsFromUserCart ¶
func (r *CartRepo) BulkRemoveItemsFromUserCart(ctx context.Context, userId string, itemIds []string) error
BulkRemoveItemsFromUserCart removes multiple items from user by ids.
func (*CartRepo) GetUserCartItems ¶
GetUserCartItems retrieves cart items from the database, filtering by userId.
type Repository ¶
type Repository interface { SaveCartItem(ctx context.Context, item *CartItem) error GetUserCartItems(ctx context.Context, userId string) ([]CartItem, error) BulkRemoveItemsFromUserCart(ctx context.Context, userId string, itemIds []string) error }
Repository is the interface that describes a cart repository object.
Click to show internal directories.
Click to hide internal directories.