Documentation
¶
Index ¶
- func NewCartApp(cartRepo repository.CartRepositoryI, itemApp ItemAppInterface, ...) *cartApp
- func NewCategoryApp(categoryRepo repository.CategoryRepositoryI) *categoryApp
- func NewItemApp(itemRepo repository.ItemRepositoryI) *itemApp
- func NewPromotionApp(promotionRepo repository.PromotionRepositoryI) *promotionApp
- func NewVasItemApp(vir repository.VasItemRepositoryI, iti ItemAppInterface) *vasItemApp
- type CartAppInterface
- type CategoryAppInterface
- type ItemAppInterface
- type PromotionAppInterface
- type VasItemAppInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCartApp ¶
func NewCartApp(cartRepo repository.CartRepositoryI, itemApp ItemAppInterface, vasItemApp VasItemAppInterface, promotionApp PromotionAppInterface) *cartApp
func NewCategoryApp ¶
func NewCategoryApp(categoryRepo repository.CategoryRepositoryI) *categoryApp
func NewItemApp ¶
func NewItemApp(itemRepo repository.ItemRepositoryI) *itemApp
func NewPromotionApp ¶
func NewPromotionApp(promotionRepo repository.PromotionRepositoryI) *promotionApp
func NewVasItemApp ¶
func NewVasItemApp(vir repository.VasItemRepositoryI, iti ItemAppInterface) *vasItemApp
Types ¶
type CartAppInterface ¶
type CartAppInterface interface {
ApplyPromotion(cartId int, promotionId int) (*entity.Cart, error)
Display(cartId int) (*dto.DisplayCartDTO, error)
ResetCart(cartId int) (*entity.Cart, error)
AddItem(cartId int, item *entity.Item) (*entity.Cart, error)
UpdateCartPriceAndQuantity(cart *entity.Cart) (*entity.Cart, error)
AddVasItem(vasItem *entity.VasItem) (*entity.Cart, error)
RemoveItem(itemId int) (*entity.Cart, error)
RemoveVasItem(vasItemId int) (*entity.Cart, error)
}
type CategoryAppInterface ¶
type ItemAppInterface ¶
type PromotionAppInterface ¶
Click to show internal directories.
Click to hide internal directories.