Documentation ¶
Index ¶
- func ParseRequestBody[T any](c *Context) (T, error)
- type Context
- func (c *Context) FormValue(name string) string
- func (c *Context) Get(key string) any
- func (c *Context) JSON(status int, v any) error
- func (c *Context) Param(name string) string
- func (c *Context) Query(name string) string
- func (c *Context) Redirect(url string, code int) error
- func (c *Context) Render(component templ.Component) error
- func (c *Context) Set(key string, value any)
- func (c *Context) Text(status int, t string) error
- type ErrorHandler
- type Gofur
- func (gf *Gofur) Delete(path string, h Handler, plugs ...Plug)
- func (gf *Gofur) Get(path string, h Handler, plugs ...Plug)
- func (gf *Gofur) Head(path string, h Handler, plugs ...Plug)
- func (gf *Gofur) MethodNotAllowed(h Handler)
- func (gf *Gofur) Options(path string, h Handler, plugs ...Plug)
- func (gf *Gofur) Plug(plugs ...Plug)
- func (gf *Gofur) Post(path string, h Handler, plugs ...Plug)
- func (gf *Gofur) Put(path string, h Handler, plugs ...Plug)
- func (gf *Gofur) Start() error
- type Handler
- type Plug
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRequestBody ¶
ParseRequestBody parses the request body based on the content type and returns the user given type T. Currently JSON and from-urlencoded are supported.
Types ¶
type Context ¶
type Context struct { Response http.ResponseWriter Request *http.Request // contains filtered or unexported fields }
type ErrorHandler ¶
type Gofur ¶
type Gofur struct { ErrorHandler ErrorHandler // contains filtered or unexported fields }
func (*Gofur) MethodNotAllowed ¶
Click to show internal directories.
Click to hide internal directories.