Documentation ¶
Index ¶
- type OrderService
- func (s *OrderService) CreateOrder(ctx context.Context, authToken string, data *models.Order, fromCart bool) (*models.Order, error)
- func (s *OrderService) GetOrder(ctx context.Context, authToken string, orderID int) (*models.Order, error)
- func (s *OrderService) GetUserOrders(ctx context.Context, authToken string, limit int, offset int) (*models.PaginationResult[*models.Order], error)
- func (s *OrderService) UpdateOrderStatus(ctx context.Context, authToken string, orderID int, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService(repo repository.OrderRepository, a auth.AuthService, i externalservices.InventoryService, p externalservices.ProductService, c externalservices.CartService, l *zerolog.Logger, ) *OrderService
func (*OrderService) CreateOrder ¶
func (*OrderService) GetUserOrders ¶
func (*OrderService) UpdateOrderStatus ¶
func (s *OrderService) UpdateOrderStatus(ctx context.Context, authToken string, orderID int, newStatus models.OrderStatus) error
Click to show internal directories.
Click to hide internal directories.