Cart

package
v0.0.0-...-91d8d9f Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBookToCart

func AddBookToCart(customerID string, cart database.Cart) (database.Cart, error)

AddBookToCart ...

func DeleteProductFromCart

func DeleteProductFromCart(customerID, cartID string) error

DeleteProductFromCart ...

func UpdateCartInfo

func UpdateCartInfo(customerID, cartID string, newCart database.Cart) (database.Cart, error)

UpdateCartInfo ...

Types

type CartsResponse

type CartsResponse struct {
	ID            bson.ObjectId `json:"id"`
	Amount        int           `json:"amount"`
	BookID        bson.ObjectId `json:"book_id"`
	Title         string        `json:"title"`
	Description   string        `json:"description"`
	Price         uint64        `json:"price"`
	DiscountPrice uint64        `json:"discount_price"`
}

CartsResponse ...

func GetAllCartsInfo

func GetAllCartsInfo(customerID string) ([]CartsResponse, error)

GetAllCartsInfo ...

Jump to

Keyboard shortcuts

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