Documentation ¶
Overview ¶
Package classification Product Api.
Documentation for Product Api ¶
Schemes: http BasePath: / Version: 1.0.0 License: BSD-3
Consumes: - application/json
Produces: - application/json swagger:meta
Index ¶
- type ProductHandler
- func (p ProductHandler) AddProduct(w http.ResponseWriter, r *http.Request)
- func (p ProductHandler) DeleteProduct(w http.ResponseWriter, r *http.Request)
- func (p ProductHandler) GetProducts(w http.ResponseWriter, r *http.Request)
- func (p ProductHandler) MiddlewareProductValidator(next http.Handler) http.Handler
- func (p ProductHandler) UpdateProduct(w http.ResponseWriter, r *http.Request)
- type ProductIDParameterWrapper
- type ProductKey
- type ProductsNoContentWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductHandler ¶
type ProductHandler struct {
// contains filtered or unexported fields
}
func NewProducts ¶
func NewProducts(l *log.Logger, c *protos.CurrencyClient) *ProductHandler
func (ProductHandler) AddProduct ¶
func (p ProductHandler) AddProduct(w http.ResponseWriter, r *http.Request)
AddProduct adds a new product into the dataStore
func (ProductHandler) DeleteProduct ¶
func (p ProductHandler) DeleteProduct(w http.ResponseWriter, r *http.Request)
DeleteProduct deletes a product from database
func (ProductHandler) GetProducts ¶
func (p ProductHandler) GetProducts(w http.ResponseWriter, r *http.Request)
GetProducts returns all Products in the API
func (ProductHandler) MiddlewareProductValidator ¶
func (p ProductHandler) MiddlewareProductValidator(next http.Handler) http.Handler
func (ProductHandler) UpdateProduct ¶
func (p ProductHandler) UpdateProduct(w http.ResponseWriter, r *http.Request)
UpdateProduct updates a product in database
type ProductIDParameterWrapper ¶
type ProductIDParameterWrapper struct { // ID of product to delete from dataStrore // in: path // required: true ID int `json:"id"` }
swagger:parameters deleteProduct updateProduct
type ProductKey ¶
type ProductKey struct{}
type ProductsNoContentWrapper ¶
type ProductsNoContentWrapper struct { }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.