Documentation ¶
Index ¶
- type CartService
- type OrderService
- func (service *OrderService) GetById(orderId int) (models.OrderModel, error)
- func (service *OrderService) GetUnProcessedOrders(status string) []models.OrderModel
- func (service *OrderService) ListOrders(userId int) (DTO.OrdersDTO, error)
- func (service *OrderService) ProcessNewOrder(cardDTO DTO.CartDTO) (DTO.OrderDTO, error)
- func (service *OrderService) Update(model models.OrderModel) (bool, error)
- type ProductService
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartService ¶
type CartService struct { interfaces.ICartRepository interfaces.IProductService interfaces.IUserService }
func (*CartService) AddProductToCart ¶
func (service *CartService) AddProductToCart(userId int, productId int) (bool, error)
func (*CartService) DeleteFromCart ¶
func (service *CartService) DeleteFromCart(userId int) (bool, error)
type OrderService ¶
type OrderService struct { interfaces.IOrderRepository interfaces.IProductService interfaces.IUserService }
func (*OrderService) GetById ¶
func (service *OrderService) GetById(orderId int) (models.OrderModel, error)
func (*OrderService) GetUnProcessedOrders ¶
func (service *OrderService) GetUnProcessedOrders(status string) []models.OrderModel
func (*OrderService) ListOrders ¶
func (service *OrderService) ListOrders(userId int) (DTO.OrdersDTO, error)
func (*OrderService) ProcessNewOrder ¶
func (*OrderService) Update ¶
func (service *OrderService) Update(model models.OrderModel) (bool, error)
type ProductService ¶
type ProductService struct { interfaces.IProductRepository interfaces.ICartRepository }
func (*ProductService) GetById ¶
func (service *ProductService) GetById(id int) (models.ProductModel, error)
func (*ProductService) GetProduct ¶
func (service *ProductService) GetProduct(userId int, productId int) (DTO.ProductDTO, error)
type UserService ¶
type UserService struct {
interfaces.IUserRepository
}
Click to show internal directories.
Click to hide internal directories.