service

package
Version: v0.0.0-...-6746b86 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasketService

type BasketService struct {
	// contains filtered or unexported fields
}

func NewBasketService

func NewBasketService(db db.Db, memDb db.MemDb, promDb db.PromotionDb) *BasketService

func (*BasketService) AddProduct

func (bs *BasketService) AddProduct(basketId string, prodId string)

func (*BasketService) CreateBasket

func (bs *BasketService) CreateBasket() string

func (*BasketService) GetAllProducts

func (bs *BasketService) GetAllProducts(basketId string) []*model.Product

func (*BasketService) GetTotalAmmount

func (bs *BasketService) GetTotalAmmount(basketId string) (float64, float64, float64)

func (*BasketService) RemoveProduct

func (bs *BasketService) RemoveProduct(basketId string, prodId string)

type ProductService

type ProductService struct {
	// contains filtered or unexported fields
}

func NewProductService

func NewProductService(db db.Db) *ProductService

func (*ProductService) ListAllProducts

func (ps *ProductService) ListAllProducts() []*model.Product

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL