Documentation ¶
Index ¶
- func RegisterRoutes(h *Handler, router *anor.Router)
- type AddToCartRequest
- type Handler
- func (h *Handler) AddToCart(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CartView(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RemoveCartItem(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Render(w http.ResponseWriter, r *http.Request, templatePath string, ...)
- func (h *Handler) UpdateCartItem(w http.ResponseWriter, r *http.Request)
- func (h *Handler) VerifyCartItemOwnership(next http.Handler) http.Handler
- type HandlerConfig
- type UpdateCartItemRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
Types ¶
type AddToCartRequest ¶
func (*AddToCartRequest) Validate ¶
func (req *AddToCartRequest) Validate() error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(cfg *HandlerConfig) *Handler
func (*Handler) RemoveCartItem ¶
func (h *Handler) RemoveCartItem(w http.ResponseWriter, r *http.Request)
func (*Handler) Render ¶
func (h *Handler) Render(w http.ResponseWriter, r *http.Request, templatePath string, td templates.TemplateData)
func (*Handler) UpdateCartItem ¶
func (h *Handler) UpdateCartItem(w http.ResponseWriter, r *http.Request)
type HandlerConfig ¶
type UpdateCartItemRequest ¶
func (*UpdateCartItemRequest) Validate ¶
func (req *UpdateCartItemRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.