Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCantFindProduct = errors.New("can't find the product") ErrCantDecodeProducts = errors.New("can't decode the product") ErrUserIdIsNotValid = errors.New("this user is not valid") ErrCantUpdateUser = errors.New("can't add this product to the cart") ErrCantRemoveCartItem = errors.New("can't remove this item from the cart") ErrCantGetItem = errors.New("can't get the item to the cart") ErrCantBuyCartItem = errors.New("can't purchase") )
View Source
var Client *mongo.Client = DBSet()
Functions ¶
func AddProductToCart ¶
func AddProductToCart()
func BuyItemFromCart ¶
func BuyItemFromCart()
func InstantBuyer ¶
func InstantBuyer()
func ProductData ¶
func ProductData(client *mongo.Client, collectionName string) *mongo.Collection
func RemoveCartItem ¶
func RemoveCartItem()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.