handler

package
v0.0.0-...-e1e387d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL