package
Version:
v0.0.0-...-39a58cf
Opens a new window with list of versions in this module.
Published: Feb 22, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CartItem struct {
Id string `json:"id"`
UserId string `json:"userId,omitempty"`
Product Product `json:"product"`
Quantity int `json:"quantity"`
TotalPrice float64 `json:"totalPrice"`
}
type CartItemRequest struct {
ProductId string `json:"productId"`
Quantity int `json:"quantity"`
TotalPrice float64 `json:"totalPrice"`
}
type Category struct {
Id string `json:"id,omitempty"`
Title string `json:"title,omitempty"`
}
type HealthCheck struct {
Id int `json:"id"`
Environment string `json:"environment"`
Status string `json:"status"`
}
type Product struct {
Id string `json:"id"`
Title string `json:"title"`
ShortDescription string `json:"shortDescription,omitempty"`
Description string `json:"description,omitempty"`
Category Category `json:"category,omitempty"`
Price float64 `json:"price,omitempty"`
Quantity int `json:"quantity,omitempty"`
ImageUrl string `json:"imageUrl"`
}
type User struct {
Id string `json:"id"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
Password string `json:"-"`
}
type UserRequest struct {
FirstName string `json:"firstName" validate:"required"`
LastName string `json:"lastName" validate:"required"`
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required,password,min=8,max=16"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.