Documentation
¶
Index ¶
- func ErrorHandler(ctx *fiber.Ctx, err error) error
- type Application
- type Cookie
- type Handler
- type HandlerCtx
- func (c *HandlerCtx) Accepts(offers ...string) string
- func (c *HandlerCtx) AcceptsCharsets(offers ...string) string
- func (c *HandlerCtx) AcceptsEncodings(offers ...string) string
- func (c *HandlerCtx) AcceptsLanguages(offers ...string) string
- func (c *HandlerCtx) AllParams() map[string]string
- func (c *HandlerCtx) Append(field string, values ...string)
- func (c *HandlerCtx) Attachment(filename ...string)
- func (c *HandlerCtx) BaseURL() string
- func (c *HandlerCtx) Body() []byte
- func (c *HandlerCtx) BodyParser(out interface{}) error
- func (c *HandlerCtx) BodyRaw() []byte
- func (c *HandlerCtx) ClearCookie(key ...string)
- func (c *HandlerCtx) ClientHelloInfo() *tls.ClientHelloInfo
- func (c *HandlerCtx) Context() *fasthttp.RequestCtx
- func (c *HandlerCtx) Cookie(cookie Cookie)
- func (c *HandlerCtx) CookieParser(out interface{}) error
- func (c *HandlerCtx) Cookies(key string, defaultValue ...string) string
- func (c *HandlerCtx) Download(file string, filename ...string) error
- func (c *HandlerCtx) EngineCtx() *fiber.Ctx
- func (c *HandlerCtx) FormFile(key string) (*multipart.FileHeader, error)
- func (c *HandlerCtx) FormValue(key string, defaultValue ...string) string
- func (c *HandlerCtx) Format(body interface{}) error
- func (c *HandlerCtx) Fresh() bool
- func (c *HandlerCtx) Get(key string, defaultValue ...string) string
- func (c *HandlerCtx) GetReqHeaders() map[string][]string
- func (c *HandlerCtx) GetRespHeader(key string, defaultValue ...string) string
- func (c *HandlerCtx) GetRespHeaders() map[string][]string
- func (c *HandlerCtx) Hostname() string
- func (c *HandlerCtx) IP() string
- func (c *HandlerCtx) IPs() []string
- func (c *HandlerCtx) Is(extension string) bool
- func (c *HandlerCtx) IsFromLocal() bool
- func (c *HandlerCtx) IsProxyTrusted() bool
- func (c *HandlerCtx) JSON(data interface{}, ctype ...string) error
- func (c *HandlerCtx) JSONP(data interface{}, callback ...string) error
- func (c *HandlerCtx) Links(link ...string)
- func (c *HandlerCtx) Locals(key interface{}, value ...interface{}) interface{}
- func (c *HandlerCtx) Location(path string)
- func (c *HandlerCtx) Method(override ...string) string
- func (c *HandlerCtx) MultipartForm() (*multipart.Form, error)
- func (c *HandlerCtx) Next() error
- func (c *HandlerCtx) OriginalURL() string
- func (c *HandlerCtx) Params(key string, defaultValue ...string) string
- func (c *HandlerCtx) ParamsInt(key string, defaultValue ...int) (int, error)
- func (c *HandlerCtx) ParamsParser(out interface{}) error
- func (c *HandlerCtx) Path(override ...string) string
- func (c *HandlerCtx) Port() string
- func (c *HandlerCtx) Protocol() string
- func (c *HandlerCtx) Queries() map[string]string
- func (c *HandlerCtx) Query(key string, defaultValue ...string) string
- func (c *HandlerCtx) QueryBool(key string, defaultValue ...bool) bool
- func (c *HandlerCtx) QueryFloat(key string, defaultValue ...float64) float64
- func (c *HandlerCtx) QueryInt(key string, defaultValue ...int) int
- func (c *HandlerCtx) QueryParser(out interface{}) error
- func (c *HandlerCtx) Redirect(location string, status ...int) error
- func (c *HandlerCtx) RedirectBack(fallback string, status ...int) error
- func (c *HandlerCtx) Render(name string, bind interface{}, layouts ...string) error
- func (c *HandlerCtx) ReqHeaderParser(out interface{}) error
- func (c *HandlerCtx) Request() *fasthttp.Request
- func (c *HandlerCtx) Response() *fasthttp.Response
- func (c *HandlerCtx) RestartRouting() error
- func (c *HandlerCtx) Secure() bool
- func (c *HandlerCtx) Send(body []byte) error
- func (c *HandlerCtx) SendFile(file string, compress ...bool) error
- func (c *HandlerCtx) SendStatus(status int) error
- func (c *HandlerCtx) SendStream(stream io.Reader, size ...int) error
- func (c *HandlerCtx) SendString(body string) error
- func (c *HandlerCtx) Set(key, val string)
- func (c *HandlerCtx) SetUserContext(ctx context.Context)
- func (c *HandlerCtx) Stale() bool
- func (c *HandlerCtx) Status(status int) *HandlerCtx
- func (c *HandlerCtx) String() string
- func (c *HandlerCtx) Subdomains(offset ...int) []string
- func (c *HandlerCtx) Type(extension string, charset ...string) *HandlerCtx
- func (c *HandlerCtx) UserContext() context.Context
- func (c *HandlerCtx) Vary(fields ...string)
- func (c *HandlerCtx) Write(p []byte) (int, error)
- func (c *HandlerCtx) WriteString(s string) (int, error)
- func (c *HandlerCtx) Writef(f string, a ...interface{}) (int, error)
- func (c *HandlerCtx) XHR() bool
- func (c *HandlerCtx) XML(data interface{}) error
- type Option
- type Router
- func (r *Router) Connect(path string, handlers ...Handler)
- func (r *Router) Delete(path string, handlers ...Handler)
- func (r *Router) Get(path string, handlers ...Handler)
- func (r *Router) Group(prefix string, handlers ...Handler) *Router
- func (r *Router) Head(path string, handlers ...Handler)
- func (r *Router) Options(path string, handlers ...Handler)
- func (r *Router) Patch(path string, handlers ...Handler)
- func (r *Router) Post(path string, handlers ...Handler)
- func (r *Router) Put(path string, handlers ...Handler)
- func (r *Router) Trace(path string, handlers ...Handler)
- func (r *Router) Use(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) *Application
func (*Application) Router ¶ added in v1.0.0
func (a *Application) Router() *Router
func (*Application) Run ¶
func (a *Application) Run()
func (*Application) Shutdown ¶ added in v1.0.0
func (a *Application) Shutdown() error
type Cookie ¶ added in v1.0.0
type Cookie struct { Name string `json:"name"` Value string `json:"value"` Path string `json:"path"` Domain string `json:"domain"` MaxAge int `json:"max_age"` Expires time.Time `json:"expires"` Secure bool `json:"secure"` HTTPOnly bool `json:"http_only"` SameSite string `json:"same_site"` SessionOnly bool `json:"session_only"` }
type Handler ¶ added in v1.0.0
type Handler = func(c *HandlerCtx) error
type HandlerCtx ¶ added in v1.0.0
type HandlerCtx struct {
// contains filtered or unexported fields
}
func WrapEngineContext ¶ added in v1.0.0
func WrapEngineContext(c *fiber.Ctx) *HandlerCtx
func (*HandlerCtx) Accepts ¶ added in v1.0.0
func (c *HandlerCtx) Accepts(offers ...string) string
func (*HandlerCtx) AcceptsCharsets ¶ added in v1.0.0
func (c *HandlerCtx) AcceptsCharsets(offers ...string) string
func (*HandlerCtx) AcceptsEncodings ¶ added in v1.0.0
func (c *HandlerCtx) AcceptsEncodings(offers ...string) string
func (*HandlerCtx) AcceptsLanguages ¶ added in v1.0.0
func (c *HandlerCtx) AcceptsLanguages(offers ...string) string
func (*HandlerCtx) AllParams ¶ added in v1.0.0
func (c *HandlerCtx) AllParams() map[string]string
func (*HandlerCtx) Append ¶ added in v1.0.0
func (c *HandlerCtx) Append(field string, values ...string)
func (*HandlerCtx) Attachment ¶ added in v1.0.0
func (c *HandlerCtx) Attachment(filename ...string)
func (*HandlerCtx) BaseURL ¶ added in v1.0.0
func (c *HandlerCtx) BaseURL() string
func (*HandlerCtx) Body ¶ added in v1.0.0
func (c *HandlerCtx) Body() []byte
func (*HandlerCtx) BodyParser ¶ added in v1.0.0
func (c *HandlerCtx) BodyParser(out interface{}) error
func (*HandlerCtx) BodyRaw ¶ added in v1.0.0
func (c *HandlerCtx) BodyRaw() []byte
func (*HandlerCtx) ClearCookie ¶ added in v1.0.0
func (c *HandlerCtx) ClearCookie(key ...string)
func (*HandlerCtx) ClientHelloInfo ¶ added in v1.0.0
func (c *HandlerCtx) ClientHelloInfo() *tls.ClientHelloInfo
func (*HandlerCtx) Context ¶ added in v1.0.0
func (c *HandlerCtx) Context() *fasthttp.RequestCtx
func (*HandlerCtx) Cookie ¶ added in v1.0.0
func (c *HandlerCtx) Cookie(cookie Cookie)
func (*HandlerCtx) CookieParser ¶ added in v1.0.0
func (c *HandlerCtx) CookieParser(out interface{}) error
func (*HandlerCtx) Cookies ¶ added in v1.0.0
func (c *HandlerCtx) Cookies(key string, defaultValue ...string) string
func (*HandlerCtx) Download ¶ added in v1.0.0
func (c *HandlerCtx) Download(file string, filename ...string) error
func (*HandlerCtx) EngineCtx ¶ added in v1.0.0
func (c *HandlerCtx) EngineCtx() *fiber.Ctx
func (*HandlerCtx) FormFile ¶ added in v1.0.0
func (c *HandlerCtx) FormFile(key string) (*multipart.FileHeader, error)
func (*HandlerCtx) FormValue ¶ added in v1.0.0
func (c *HandlerCtx) FormValue(key string, defaultValue ...string) string
func (*HandlerCtx) Format ¶ added in v1.0.0
func (c *HandlerCtx) Format(body interface{}) error
func (*HandlerCtx) Fresh ¶ added in v1.0.0
func (c *HandlerCtx) Fresh() bool
func (*HandlerCtx) Get ¶ added in v1.0.0
func (c *HandlerCtx) Get(key string, defaultValue ...string) string
func (*HandlerCtx) GetReqHeaders ¶ added in v1.0.0
func (c *HandlerCtx) GetReqHeaders() map[string][]string
func (*HandlerCtx) GetRespHeader ¶ added in v1.0.0
func (c *HandlerCtx) GetRespHeader(key string, defaultValue ...string) string
func (*HandlerCtx) GetRespHeaders ¶ added in v1.0.0
func (c *HandlerCtx) GetRespHeaders() map[string][]string
func (*HandlerCtx) Hostname ¶ added in v1.0.0
func (c *HandlerCtx) Hostname() string
func (*HandlerCtx) IP ¶ added in v1.0.0
func (c *HandlerCtx) IP() string
func (*HandlerCtx) IPs ¶ added in v1.0.0
func (c *HandlerCtx) IPs() []string
func (*HandlerCtx) Is ¶ added in v1.0.0
func (c *HandlerCtx) Is(extension string) bool
func (*HandlerCtx) IsFromLocal ¶ added in v1.0.0
func (c *HandlerCtx) IsFromLocal() bool
func (*HandlerCtx) IsProxyTrusted ¶ added in v1.0.0
func (c *HandlerCtx) IsProxyTrusted() bool
func (*HandlerCtx) JSON ¶ added in v1.0.0
func (c *HandlerCtx) JSON(data interface{}, ctype ...string) error
func (*HandlerCtx) JSONP ¶ added in v1.0.0
func (c *HandlerCtx) JSONP(data interface{}, callback ...string) error
func (*HandlerCtx) Links ¶ added in v1.0.0
func (c *HandlerCtx) Links(link ...string)
func (*HandlerCtx) Locals ¶ added in v1.0.0
func (c *HandlerCtx) Locals(key interface{}, value ...interface{}) interface{}
func (*HandlerCtx) Location ¶ added in v1.0.0
func (c *HandlerCtx) Location(path string)
func (*HandlerCtx) Method ¶ added in v1.0.0
func (c *HandlerCtx) Method(override ...string) string
func (*HandlerCtx) MultipartForm ¶ added in v1.0.0
func (c *HandlerCtx) MultipartForm() (*multipart.Form, error)
func (*HandlerCtx) Next ¶ added in v1.0.0
func (c *HandlerCtx) Next() error
func (*HandlerCtx) OriginalURL ¶ added in v1.0.0
func (c *HandlerCtx) OriginalURL() string
func (*HandlerCtx) Params ¶ added in v1.0.0
func (c *HandlerCtx) Params(key string, defaultValue ...string) string
func (*HandlerCtx) ParamsInt ¶ added in v1.0.0
func (c *HandlerCtx) ParamsInt(key string, defaultValue ...int) (int, error)
func (*HandlerCtx) ParamsParser ¶ added in v1.0.0
func (c *HandlerCtx) ParamsParser(out interface{}) error
func (*HandlerCtx) Path ¶ added in v1.0.0
func (c *HandlerCtx) Path(override ...string) string
func (*HandlerCtx) Port ¶ added in v1.0.0
func (c *HandlerCtx) Port() string
func (*HandlerCtx) Protocol ¶ added in v1.0.0
func (c *HandlerCtx) Protocol() string
func (*HandlerCtx) Queries ¶ added in v1.0.0
func (c *HandlerCtx) Queries() map[string]string
func (*HandlerCtx) Query ¶ added in v1.0.0
func (c *HandlerCtx) Query(key string, defaultValue ...string) string
func (*HandlerCtx) QueryBool ¶ added in v1.0.0
func (c *HandlerCtx) QueryBool(key string, defaultValue ...bool) bool
func (*HandlerCtx) QueryFloat ¶ added in v1.0.0
func (c *HandlerCtx) QueryFloat(key string, defaultValue ...float64) float64
func (*HandlerCtx) QueryInt ¶ added in v1.0.0
func (c *HandlerCtx) QueryInt(key string, defaultValue ...int) int
func (*HandlerCtx) QueryParser ¶ added in v1.0.0
func (c *HandlerCtx) QueryParser(out interface{}) error
func (*HandlerCtx) Redirect ¶ added in v1.0.0
func (c *HandlerCtx) Redirect(location string, status ...int) error
func (*HandlerCtx) RedirectBack ¶ added in v1.0.0
func (c *HandlerCtx) RedirectBack(fallback string, status ...int) error
func (*HandlerCtx) Render ¶ added in v1.0.0
func (c *HandlerCtx) Render(name string, bind interface{}, layouts ...string) error
func (*HandlerCtx) ReqHeaderParser ¶ added in v1.0.0
func (c *HandlerCtx) ReqHeaderParser(out interface{}) error
func (*HandlerCtx) Request ¶ added in v1.0.0
func (c *HandlerCtx) Request() *fasthttp.Request
func (*HandlerCtx) Response ¶ added in v1.0.0
func (c *HandlerCtx) Response() *fasthttp.Response
func (*HandlerCtx) RestartRouting ¶ added in v1.0.0
func (c *HandlerCtx) RestartRouting() error
func (*HandlerCtx) Secure ¶ added in v1.0.0
func (c *HandlerCtx) Secure() bool
func (*HandlerCtx) Send ¶ added in v1.0.0
func (c *HandlerCtx) Send(body []byte) error
func (*HandlerCtx) SendFile ¶ added in v1.0.0
func (c *HandlerCtx) SendFile(file string, compress ...bool) error
func (*HandlerCtx) SendStatus ¶ added in v1.0.0
func (c *HandlerCtx) SendStatus(status int) error
func (*HandlerCtx) SendStream ¶ added in v1.0.0
func (c *HandlerCtx) SendStream(stream io.Reader, size ...int) error
func (*HandlerCtx) SendString ¶ added in v1.0.0
func (c *HandlerCtx) SendString(body string) error
func (*HandlerCtx) Set ¶ added in v1.0.0
func (c *HandlerCtx) Set(key, val string)
func (*HandlerCtx) SetUserContext ¶ added in v1.0.0
func (c *HandlerCtx) SetUserContext(ctx context.Context)
func (*HandlerCtx) Stale ¶ added in v1.0.0
func (c *HandlerCtx) Stale() bool
func (*HandlerCtx) Status ¶ added in v1.0.0
func (c *HandlerCtx) Status(status int) *HandlerCtx
func (*HandlerCtx) String ¶ added in v1.0.0
func (c *HandlerCtx) String() string
func (*HandlerCtx) Subdomains ¶ added in v1.0.0
func (c *HandlerCtx) Subdomains(offset ...int) []string
func (*HandlerCtx) Type ¶ added in v1.0.0
func (c *HandlerCtx) Type(extension string, charset ...string) *HandlerCtx
func (*HandlerCtx) UserContext ¶ added in v1.0.0
func (c *HandlerCtx) UserContext() context.Context
func (*HandlerCtx) Vary ¶ added in v1.0.0
func (c *HandlerCtx) Vary(fields ...string)
func (*HandlerCtx) WriteString ¶ added in v1.0.0
func (c *HandlerCtx) WriteString(s string) (int, error)
func (*HandlerCtx) Writef ¶ added in v1.0.0
func (c *HandlerCtx) Writef(f string, a ...interface{}) (int, error)
func (*HandlerCtx) XHR ¶ added in v1.0.0
func (c *HandlerCtx) XHR() bool
func (*HandlerCtx) XML ¶ added in v1.0.0
func (c *HandlerCtx) XML(data interface{}) error
Click to show internal directories.
Click to hide internal directories.