Documentation ¶
Index ¶
- Constants
- type CategoryHandler
- func (h *CategoryHandler) CreateCategory(w http.ResponseWriter, r *http.Request)
- func (h *CategoryHandler) GetCategory(w http.ResponseWriter, r *http.Request)
- func (h *CategoryHandler) ListCategories(w http.ResponseWriter, r *http.Request)
- func (h *CategoryHandler) MiddlewareValidateCategory(next http.Handler) http.Handler
- func (h *CategoryHandler) SearchCategories(w http.ResponseWriter, r *http.Request)
- func (h *CategoryHandler) UpdateCategory(w http.ResponseWriter, r *http.Request)
- type ProductHandler
- func (h *ProductHandler) CreateProduct(w http.ResponseWriter, r *http.Request)
- func (h *ProductHandler) DeleteProduct(w http.ResponseWriter, r *http.Request)
- func (h *ProductHandler) GetProduct(w http.ResponseWriter, r *http.Request)
- func (h *ProductHandler) ListProducts(w http.ResponseWriter, r *http.Request)
- func (h *ProductHandler) MiddlewareValidateProduct(next http.Handler) http.Handler
- func (h *ProductHandler) SearchProducts(w http.ResponseWriter, r *http.Request)
- func (h *ProductHandler) UpdateProduct(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const CategoryCTXKey contextKey = "category"
View Source
const PrdCTXKey contextKey = "product"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryHandler ¶
type CategoryHandler struct {
// contains filtered or unexported fields
}
func NewCategoryHandler ¶
func NewCategoryHandler(s *product.Service, l *zerolog.Logger) *CategoryHandler
func (*CategoryHandler) CreateCategory ¶
func (h *CategoryHandler) CreateCategory(w http.ResponseWriter, r *http.Request)
func (*CategoryHandler) GetCategory ¶
func (h *CategoryHandler) GetCategory(w http.ResponseWriter, r *http.Request)
func (*CategoryHandler) ListCategories ¶
func (h *CategoryHandler) ListCategories(w http.ResponseWriter, r *http.Request)
func (*CategoryHandler) MiddlewareValidateCategory ¶
func (h *CategoryHandler) MiddlewareValidateCategory(next http.Handler) http.Handler
func (*CategoryHandler) SearchCategories ¶
func (h *CategoryHandler) SearchCategories(w http.ResponseWriter, r *http.Request)
func (*CategoryHandler) UpdateCategory ¶
func (h *CategoryHandler) UpdateCategory(w http.ResponseWriter, r *http.Request)
type ProductHandler ¶
type ProductHandler struct {
// contains filtered or unexported fields
}
func NewProductHandler ¶
func NewProductHandler(s *product.Service, l *zerolog.Logger) *ProductHandler
func (*ProductHandler) CreateProduct ¶
func (h *ProductHandler) CreateProduct(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) DeleteProduct ¶
func (h *ProductHandler) DeleteProduct(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) GetProduct ¶
func (h *ProductHandler) GetProduct(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) ListProducts ¶
func (h *ProductHandler) ListProducts(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) MiddlewareValidateProduct ¶
func (h *ProductHandler) MiddlewareValidateProduct(next http.Handler) http.Handler
func (*ProductHandler) SearchProducts ¶
func (h *ProductHandler) SearchProducts(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) UpdateProduct ¶
func (h *ProductHandler) UpdateProduct(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.