database

package
v0.0.0-...-41b649f Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

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 DBSet

func DBSet() *mongo.Client

func InstantBuyer

func InstantBuyer()

func ProductData

func ProductData(client *mongo.Client, collectionName string) *mongo.Collection

func RemoveCartItem

func RemoveCartItem()

func UserData

func UserData(client *mongo.Client, collectionName string) *mongo.Collection

Types

This section is empty.

Jump to

Keyboard shortcuts

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