Documentation
¶
Index ¶
- type Binding
- type Context
- func (c *Context) Abort() *Context
- func (c *Context) Bind(data any) error
- func (c *Context) BindAll(data any) error
- func (c *Context) BindForm(data any) error
- func (c *Context) BindHeader(data any) error
- func (c *Context) BindJSON(data any) error
- func (c *Context) BindPostForm(data any) error
- func (c *Context) BindURLQuery(data any) error
- func (c *Context) Data(data render.Data)
- func (c *Context) Deadline() (deadline time.Time, ok bool)
- func (c *Context) Done() <-chan struct{}
- func (c *Context) Err() error
- func (c *Context) FC() *fasthttp.RequestCtx
- func (c *Context) Get(key any) (value any, exists bool)
- func (c *Context) Header(s string) []byte
- func (c *Context) IsDelete() bool
- func (c *Context) IsGet() bool
- func (c *Context) IsHead() bool
- func (c *Context) IsOptions() bool
- func (c *Context) IsPatch() bool
- func (c *Context) IsPost() bool
- func (c *Context) IsPut() bool
- func (c *Context) JSON(data any)
- func (c *Context) L() *zap.Logger
- func (c *Context) Next()
- func (c *Context) Param(key string) string
- func (c *Context) Reader(data render.Reader)
- func (c *Context) RemoteIP() string
- func (c *Context) RemoteIPs() []string
- func (c *Context) Render(r render.Render)
- func (c *Context) Set(key, val any)
- func (c *Context) SetContentType(v string) *Context
- func (c *Context) SetHeader(k, v string) *Context
- func (c *Context) SetLocation(v string) *Context
- func (c *Context) Status(code int) *Context
- func (c *Context) Text(fmt string, arg ...any)
- func (c *Context) Value(key any) any
- type Handler
- type Handlers
- type Store
- type THz
- func (thz *THz) AddIntercept(intercept ...Handler)
- func (thz *THz) ListenAndServe(addr string) error
- func (thz *THz) NoRoute(handlers ...Handler)
- func (thz *THz) Run(ln net.Listener) error
- func (thz *THz) RunTLS(ln net.Listener, cert, key string) error
- func (thz *THz) SetConcurrency(n int) *THz
- func (thz *THz) SetIdleTimeout(n time.Duration) *THz
- func (thz *THz) SetKeepalivePeriod(n time.Duration) *THz
- func (thz *THz) SetLog(log *zap.Logger)
- func (thz *THz) SetMaxRequestBodySize(n int) *THz
- func (thz *THz) SetReadBufferSize(n int) *THz
- func (thz *THz) SetReadTimeout(n time.Duration) *THz
- func (thz *THz) SetReduceMemoryUsage(n bool) *THz
- func (thz *THz) SetTrustedHeaders(header ...string)
- func (thz *THz) SetTrustedProxies(ip ...string) error
- func (thz *THz) SetWriteBufferSize(n int) *THz
- func (thz *THz) SetWriteTimeout(n time.Duration) *THz
- func (thz *THz) SetZapLog(level zapcore.Level)
- func (thz *THz) Stop() error
- func (thz *THz) TestHandler(c *fasthttp.RequestCtx)
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) BindHeader ¶
func (*Context) BindPostForm ¶
func (*Context) BindURLQuery ¶
func (*Context) FC ¶
func (c *Context) FC() *fasthttp.RequestCtx
func (*Context) SetContentType ¶
func (*Context) SetLocation ¶
type THz ¶
type THz struct { httprouter.IRouter[Context] // contains filtered or unexported fields }
func (*THz) AddIntercept ¶
func (*THz) ListenAndServe ¶
func (*THz) SetConcurrency ¶
func (*THz) SetMaxRequestBodySize ¶
func (*THz) SetReadBufferSize ¶
func (*THz) SetReduceMemoryUsage ¶
func (*THz) SetTrustedHeaders ¶
SetTrustedHeaders
E.g: - CF-Connecting-IP - X-Forwarded-For - X-Real-IP
Remember, order determines priority
func (*THz) SetTrustedProxies ¶
func (*THz) SetWriteBufferSize ¶
func (*THz) TestHandler ¶
func (thz *THz) TestHandler(c *fasthttp.RequestCtx)
Click to show internal directories.
Click to hide internal directories.