service

package
v0.0.0-...-04224c6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartDataService

type CartDataService struct {
	CartRepository repository.ICartRepository
}

func (CartDataService) AddCart

func (c CartDataService) AddCart(cart *model.Cart) (uint64, error)

func (CartDataService) CleanCart

func (c CartDataService) CleanCart(userId uint64) error

func (CartDataService) DecrNum

func (c CartDataService) DecrNum(cartId uint64, num uint64) error

func (CartDataService) DeleteCart

func (c CartDataService) DeleteCart(cartId uint64) error

func (CartDataService) FindAllCart

func (c CartDataService) FindAllCart(userId uint64) ([]model.Cart, error)

func (CartDataService) FindCartById

func (c CartDataService) FindCartById(cartId uint64) (*model.Cart, error)

func (CartDataService) IncrNum

func (c CartDataService) IncrNum(cartId uint64, num uint64) error

func (CartDataService) UpdateCart

func (c CartDataService) UpdateCart(cart *model.Cart) error

type ICartDataService

type ICartDataService interface {
	AddCart(cart *model.Cart) (uint64, error)
	DeleteCart(uint64) error
	UpdateCart(*model.Cart) error
	FindCartById(uint64) (*model.Cart, error)
	FindAllCart(uint64) ([]model.Cart, error)
	CleanCart(uint64) error
	IncrNum(uint64, uint64) error
	DecrNum(uint64, uint64) error
}

func NewCartDataService

func NewCartDataService(cartRepository repository.ICartRepository) ICartDataService

Jump to

Keyboard shortcuts

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