Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartHandler ¶
type CartHandler interface { NewCart(*fiber.Ctx) error AddItem(*fiber.Ctx) error GetCart(*fiber.Ctx) error DeleteCart(*fiber.Ctx) error }
func NewCartHandler ¶
func NewCartHandler( cartService services.CartService, productService services.ProductService, ) CartHandler
type OrderHandler ¶
type OrderHandler interface { CreateOrder(*fiber.Ctx) error GetTheOrders(*fiber.Ctx) error GetOrderSerializer(entity.Order) ResponseOrder GetOrdersSerializerByUserId(entity.User) ResponseOrders }
func NewOrderHandler ¶
func NewOrderHandler( orderService services.OrderService, cartService services.CartService, productService services.ProductService, ) OrderHandler
type ProductHandler ¶
type ProductHandler interface { GetProductList(*fiber.Ctx) error GetProduct(*fiber.Ctx) error NewProduct(*fiber.Ctx) error DeleteProduct(*fiber.Ctx) error }
func NewProductHandler ¶
func NewProductHandler(productService services.ProductService) ProductHandler
type ResponseOrder ¶
type ResponseOrder struct { ID uuid.UUID `json:"id"` CreatedAt time.Time `json:"created_at"` Items []ResponseOrderItem `json:"items"` }
type ResponseOrderItem ¶
type ResponseOrders ¶
type ResponseOrders struct {
Orders []ResponseOrder `json:"orders"`
}
type UserHandler ¶
func NewUserHandler ¶
func NewUserHandler(userService services.UserService) UserHandler
Click to show internal directories.
Click to hide internal directories.