Documentation
¶
Index ¶
- type Context
- func (c *Context) BadRequest(e error) error
- func (c *Context) BindForm() (url.Values, error)
- func (c *Context) BindJSON(dest interface{}) error
- func (c *Context) BindMultipartForm(maxMemory int64) error
- func (c *Context) BindXML(dest interface{}) error
- func (c *Context) Context() context.Context
- func (c *Context) Cookie(name string) (*http.Cookie, error)
- func (c *Context) Done() <-chan struct{}
- func (c *Context) Err() error
- func (c *Context) FormInt(name string) (int, error)
- func (c *Context) FormIntDefault(name string, defaultValue int) int
- func (c *Context) FormValue(name string) string
- func (c *Context) FormValueDefault(name, defaultValue string) string
- func (c *Context) InternalServerError(e error) error
- func (c *Context) JSON(status int, data any) error
- func (c *Context) NoContent()
- func (c *Context) NotFound()
- func (c *Context) Param(name string) string
- func (c *Context) ParamInt(name string) (int, error)
- func (c *Context) ParamIntDefault(name string, defaultValue int) int
- func (c *Context) Params() httprouter.Params
- func (c *Context) Query(name string) string
- func (c *Context) QueryDefault(name, defaultValue string) string
- func (c *Context) QueryInt(name string) (int, error)
- func (c *Context) QueryIntDefault(name string, defaultValue int) int
- func (c *Context) Redirect(status int, urlStr string)
- func (c *Context) Request() *http.Request
- func (c *Context) Response() http.ResponseWriter
- func (c *Context) SetCookie(cookie *http.Cookie)
- func (c *Context) SetValue(key, val any)
- func (c *Context) Status(code int)
- func (c *Context) String(status int, s string) error
- func (c *Context) Value(key any) any
- func (c *Context) Write(data []byte) (int, error)
- func (c *Context) XML(status int, data any) error
- type ErrorHandler
- type Group
- func (g *Group) DELETE(path string, h Handler, mws ...Middleware)
- func (g *Group) GET(path string, h Handler, mws ...Middleware)
- func (g *Group) HEAD(path string, h Handler, mws ...Middleware)
- func (g *Group) OPTIONS(path string, h Handler, mws ...Middleware)
- func (g *Group) PATCH(path string, h Handler, mws ...Middleware)
- func (g *Group) POST(path string, h Handler, mws ...Middleware)
- func (g *Group) PUT(path string, h Handler, mws ...Middleware)
- func (g *Group) Static(relativePath, root string)
- func (g *Group) Use(m ...Middleware)
- type Handler
- type Middleware
- type Wisp
- func (w *Wisp) DELETE(path string, h Handler, mws ...Middleware)
- func (w *Wisp) GET(path string, h Handler, mws ...Middleware)
- func (w *Wisp) Group(prefix string, middlewares ...Middleware) *Group
- func (w *Wisp) HEAD(path string, h Handler, mws ...Middleware)
- func (w *Wisp) OPTIONS(path string, h Handler, mws ...Middleware)
- func (w *Wisp) PATCH(path string, h Handler, mws ...Middleware)
- func (w *Wisp) POST(path string, h Handler, mws ...Middleware)
- func (w *Wisp) PUT(path string, h Handler, mws ...Middleware)
- func (w *Wisp) SetErrorHandler(errorHandler ErrorHandler)
- func (w *Wisp) Start(addr string) error
- func (w *Wisp) StartWithTLS(addr, certFile, keyFile string) error
- func (w *Wisp) Static(path, root string)
- func (w *Wisp) Use(m ...Middleware)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) BadRequest ¶
func (*Context) BindMultipartForm ¶
func (*Context) FormIntDefault ¶
func (*Context) FormValueDefault ¶
func (*Context) InternalServerError ¶
func (*Context) ParamIntDefault ¶
func (*Context) Params ¶
func (c *Context) Params() httprouter.Params
func (*Context) QueryDefault ¶
func (*Context) QueryIntDefault ¶
func (*Context) Response ¶
func (c *Context) Response() http.ResponseWriter
type ErrorHandler ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) Use ¶
func (g *Group) Use(m ...Middleware)
type Middleware ¶
type Wisp ¶
type Wisp struct {
// contains filtered or unexported fields
}
func (*Wisp) SetErrorHandler ¶
func (w *Wisp) SetErrorHandler(errorHandler ErrorHandler)
func (*Wisp) StartWithTLS ¶
func (*Wisp) Use ¶
func (w *Wisp) Use(m ...Middleware)
Click to show internal directories.
Click to hide internal directories.