Documentation ¶
Index ¶
- type CartDataService
- func (u *CartDataService) AddCart(cart *model.Cart) (int64, error)
- func (u *CartDataService) CleanCart(userID int64) error
- func (u *CartDataService) DecrNum(cartID int64, num int64) error
- func (u *CartDataService) DeleteCart(cartID int64) error
- func (u *CartDataService) FindAllCart(userID int64) ([]model.Cart, error)
- func (u *CartDataService) FindCartByID(cartID int64) (*model.Cart, error)
- func (u *CartDataService) IncrNum(cartID int64, num int64) error
- func (u *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) AddCart ¶
func (u *CartDataService) AddCart(cart *model.Cart) (int64, error)
func (*CartDataService) CleanCart ¶
func (u *CartDataService) CleanCart(userID int64) error
func (*CartDataService) DeleteCart ¶
func (u *CartDataService) DeleteCart(cartID int64) error
func (*CartDataService) FindAllCart ¶
func (u *CartDataService) FindAllCart(userID int64) ([]model.Cart, error)
func (*CartDataService) FindCartByID ¶
func (u *CartDataService) FindCartByID(cartID int64) (*model.Cart, error)
func (*CartDataService) UpdateCart ¶
func (u *CartDataService) UpdateCart(cart *model.Cart) error
type ICartDataService ¶
type ICartDataService interface { AddCart(*model.Cart) (int64, error) DeleteCart(int64) error UpdateCart(*model.Cart) error FindCartByID(int64) (*model.Cart, error) FindAllCart(int64) ([]model.Cart, error) CleanCart(int64) error DecrNum(int64, int64) error IncrNum(int64, int64) error }
func NewCartDataService ¶
func NewCartDataService(cartRepository repository.ICartRepository) ICartDataService
Click to show internal directories.
Click to hide internal directories.