Documentation
¶
Index ¶
- func GetFlash(w http.ResponseWriter, r *http.Request, name string) string
- func GetUser(req *http.Request) string
- func SetFlash(w http.ResponseWriter, name string, value string)
- func SetFlashPath(w http.ResponseWriter, name string, value string, path string)
- func WithUser(req *http.Request, user string) *http.Request
- type Controller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFlashPath ¶
func SetFlashPath(w http.ResponseWriter, name string, value string, path string)
Types ¶
type Controller ¶
type Controller[T any] struct { // contains filtered or unexported fields }
func (*Controller[T]) Action ¶
func (ch *Controller[T]) Action(name string, handler func(writer http.ResponseWriter, request *http.Request, state *T) error) *Controller[T]
func (*Controller[T]) ServeHTTP ¶
func (ch *Controller[T]) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*Controller[T]) View ¶
func (ch *Controller[T]) View(viewTemplate *template.Template, handler func(writer http.ResponseWriter, request *http.Request, state *T) (any, error)) *Controller[T]
Click to show internal directories.
Click to hide internal directories.