Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidationErrorResponse ¶
func ValidationErrorResponse(w http.ResponseWriter, err error)
Types ¶
type CartProductRequest ¶
type CartProductRequest struct { ID int `json:"id"` UserID int32 `json:"user_id"` Products []models.CartProducts `json:"products"` }
func (CartProductRequest) Validate ¶
func (c CartProductRequest) Validate() error
type CartRequest ¶
type LoginRequest ¶
func (LoginRequest) Validate ¶
func (c LoginRequest) Validate() error
type OrderRequest ¶
type OrderRequest struct { ID int32 `json:"id"` UserID int32 `json:"user_id"` Address string `json:"address"` PhoneNumber string `json:"phone_number"` CustomerName string `json:"customer_name"` CustomerLastname string `json:"customer_lastname"` PaymentMethod string `json:"payment_method"` Status string `json:"status"` Products []models.OrderProducts `json:"products"` }
func (OrderRequest) Validate ¶
func (c OrderRequest) Validate() error
type ProductRequest ¶
type ProductRequest struct { ID int `json:"id"` SupplierID int32 `json:"supplier_id"` Name string `json:"name"` Price float64 `json:"price"` Type string `json:"type"` Ingredients []string `json:"ingredients"` Image string `json:"image"` }
func (ProductRequest) Validate ¶
func (c ProductRequest) Validate() error
type SupplierRequest ¶
type SupplierRequest struct { ID int32 `json:"id"` Name string `json:"name"` Image string `json:"image"` }
func (SupplierRequest) Validate ¶
func (c SupplierRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.