Documentation ¶
Index ¶
- type CartDataService
- func (c CartDataService) AddCart(cart *model.Cart) (uint64, error)
- func (c CartDataService) CleanCart(userId uint64) error
- func (c CartDataService) DecrNum(cartId uint64, num uint64) error
- func (c CartDataService) DeleteCart(cartId uint64) error
- func (c CartDataService) FindAllCart(userId uint64) ([]model.Cart, error)
- func (c CartDataService) FindCartById(cartId uint64) (*model.Cart, error)
- func (c CartDataService) IncrNum(cartId uint64, num uint64) error
- func (c CartDataService) UpdateCart(cart *model.Cart) error
- type ICartDataService
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) CleanCart ¶
func (c CartDataService) CleanCart(userId 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) 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
Click to show internal directories.
Click to hide internal directories.