Documentation
¶
Index ¶
- Constants
- type Config
- type Ctx
- func (c *Ctx) Data() any
- func (c *Ctx) JSON(data any, code ...int) error
- func (c *Ctx) Method() string
- func (c *Ctx) Next()
- func (c *Ctx) Para(key string) string
- func (c *Ctx) Paras() map[string]string
- func (c *Ctx) Path() string
- func (c *Ctx) Set(key, v string)
- func (c *Ctx) Status(code int) *Ctx
- func (c *Ctx) String(str string, code ...int) error
- func (c *Ctx) URI() string
- func (c *Ctx) Write(p []byte) (n int, err error)
- type Floz
- type H
- type JSONMarshal
- type MiddleWare
- type ReqHandler
- type Scope
- type Server
Constants ¶
View Source
const ( MIMETextXML = "text/xml" MIMETextHTML = "text/html" MIMETextPlain = "text/plain" MIMETextJavaScript = "text/javascript" MIMETextCSS = "text/css" MIMEApplicationXML = "application/xml" MIMEApplicationJSON = "application/json" )
===== MIME type =====
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
JSONEncoder JSONMarshal
}
type Floz ¶
type Floz struct {
// contains filtered or unexported fields
}
func New ¶
func New(middleware ...*MiddleWare) *Floz
func (*Floz) Handle ¶
func (floz *Floz) Handle(c *fasthttp.RequestCtx)
func (*Floz) Wrap ¶
func (floz *Floz) Wrap(middlewares ...ReqHandler) *Floz
type JSONMarshal ¶
type MiddleWare ¶
type MiddleWare struct {
// contains filtered or unexported fields
}
func NewMW ¶
func NewMW(mws ...ReqHandler) *MiddleWare
type ReqHandler ¶
type ReqHandler func(*Ctx)
func MWRecover ¶ added in v0.1.3
func MWRecover() ReqHandler
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
func (*Scope) Wrap ¶
func (s *Scope) Wrap(middlewares ...ReqHandler) *Scope
Click to show internal directories.
Click to hide internal directories.