Documentation ¶
Index ¶
- func RegisterRoutes(h *Handler, router *anor.Router)
- type AddAddressForm
- type Handler
- func (h *Handler) AddAddress(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Logout(w http.ResponseWriter, r *http.Request)
- func (h *Handler) OrdersView(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ProfileView(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Render(w http.ResponseWriter, r *http.Request, templatePath string, ...)
- type HandlerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
RegisterRoutes sets up the routing for the user-related endpoints. It maps HTTP methods and paths to their respective handler functions.
Types ¶
type AddAddressForm ¶
type AddAddressForm struct { Name string AddressLine1 string AddressLine2 string City string StateProvince string PostalCode string Country string DefaultFor string SelectedAs string }
func (*AddAddressForm) Validate ¶
func (f *AddAddressForm) Validate() error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(cfg *HandlerConfig) *Handler
func (*Handler) AddAddress ¶
func (h *Handler) AddAddress(w http.ResponseWriter, r *http.Request)
func (*Handler) OrdersView ¶
func (h *Handler) OrdersView(w http.ResponseWriter, r *http.Request)
func (*Handler) ProfileView ¶
func (h *Handler) ProfileView(w http.ResponseWriter, r *http.Request)
func (*Handler) Render ¶
func (h *Handler) Render(w http.ResponseWriter, r *http.Request, templatePath string, td templates.TemplateData)
Click to show internal directories.
Click to hide internal directories.