Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProductNotFound = fmt.Errorf("Product not found")
Functions ¶
func AddProduct ¶
func AddProduct(p *Product)
func UpdateProduct ¶
Types ¶
type Product ¶
type Product struct { // The id of the user // // required: true // min: 1 ID int `json:"id"` Name string `json:"name" validate:"required"` Description string `json:"description"` Price float32 `json:"price" validate:"gt=0"` SKU string `json:"sku" validate:"required,sku"` CreatedOn string `json:"-"` UpdatedOn string `json:"-"` DeletedOn string `json:"-"` }
swagger:model
Click to show internal directories.
Click to hide internal directories.