types

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AutoResponseGzipSize int //响应数据达到指定大小自动触发gzip压缩

Functions

This section is empty.

Types

type DataError added in v0.5.0

type DataError struct {
	// contains filtered or unexported fields
}

func NewDataError added in v0.5.0

func NewDataError(text string, data any) *DataError

func (*DataError) Data added in v0.5.0

func (err *DataError) Data() any

func (*DataError) Error added in v0.5.0

func (err *DataError) Error() string

type RequestCtx added in v0.5.0

type RequestCtx fasthttp.RequestCtx

func (*RequestCtx) Conn added in v0.5.0

func (ctx *RequestCtx) Conn() net.Conn

func (*RequestCtx) ConnID added in v0.5.0

func (ctx *RequestCtx) ConnID() uint64

func (*RequestCtx) ConnRequestNum added in v0.5.0

func (ctx *RequestCtx) ConnRequestNum() uint64

func (*RequestCtx) ConnTime added in v0.5.0

func (ctx *RequestCtx) ConnTime() time.Time

func (*RequestCtx) Deadline added in v0.5.0

func (ctx *RequestCtx) Deadline() (deadline time.Time, ok bool)

func (*RequestCtx) Done added in v0.5.0

func (ctx *RequestCtx) Done() <-chan struct{}

func (*RequestCtx) Err added in v0.5.0

func (ctx *RequestCtx) Err() error

func (*RequestCtx) Error added in v0.5.0

func (ctx *RequestCtx) Error(msg string, statusCode int)

func (*RequestCtx) FormFile added in v0.5.0

func (ctx *RequestCtx) FormFile(key string) (*multipart.FileHeader, error)

func (*RequestCtx) FormValue added in v0.5.0

func (ctx *RequestCtx) FormValue(key string) []byte

func (*RequestCtx) Hijack added in v0.5.0

func (ctx *RequestCtx) Hijack(handler fasthttp.HijackHandler)

func (*RequestCtx) HijackSetNoResponse added in v0.5.0

func (ctx *RequestCtx) HijackSetNoResponse(noResponse bool)

func (*RequestCtx) Hijacked added in v0.5.0

func (ctx *RequestCtx) Hijacked() bool

func (*RequestCtx) Host added in v0.5.0

func (ctx *RequestCtx) Host() []byte

func (*RequestCtx) ID added in v0.5.0

func (ctx *RequestCtx) ID() uint64

func (*RequestCtx) IfModifiedSince added in v0.5.0

func (ctx *RequestCtx) IfModifiedSince(lastModified time.Time) bool

func (*RequestCtx) Init added in v0.5.0

func (ctx *RequestCtx) Init(req *fasthttp.Request, remoteAddr net.Addr, logger fasthttp.Logger)

func (*RequestCtx) Init2 added in v0.5.0

func (ctx *RequestCtx) Init2(conn net.Conn, logger fasthttp.Logger, reduceMemoryUsage bool)

func (*RequestCtx) Input added in v0.5.0

func (ctx *RequestCtx) Input(key string, defaultVals ...any) any

func (*RequestCtx) InputAssign added in v0.5.0

func (ctx *RequestCtx) InputAssign(key string, valPtr any) (err error)

func (*RequestCtx) Inputs added in v0.5.0

func (ctx *RequestCtx) Inputs() map[string]any

func (*RequestCtx) InputsAssign added in v0.6.0

func (ctx *RequestCtx) InputsAssign(valPtr any) (err error)

func (*RequestCtx) IsBodyStream added in v0.5.0

func (ctx *RequestCtx) IsBodyStream() bool

func (*RequestCtx) IsConnect added in v0.5.0

func (ctx *RequestCtx) IsConnect() bool

func (*RequestCtx) IsDelete added in v0.5.0

func (ctx *RequestCtx) IsDelete() bool

func (*RequestCtx) IsGet added in v0.5.0

func (ctx *RequestCtx) IsGet() bool

func (*RequestCtx) IsHead added in v0.5.0

func (ctx *RequestCtx) IsHead() bool

func (*RequestCtx) IsOptions added in v0.5.0

func (ctx *RequestCtx) IsOptions() bool

func (*RequestCtx) IsPatch added in v0.5.0

func (ctx *RequestCtx) IsPatch() bool

func (*RequestCtx) IsPost added in v0.5.0

func (ctx *RequestCtx) IsPost() bool

func (*RequestCtx) IsPut added in v0.5.0

func (ctx *RequestCtx) IsPut() bool

func (*RequestCtx) IsTLS added in v0.5.0

func (ctx *RequestCtx) IsTLS() bool

func (*RequestCtx) IsTrace added in v0.5.0

func (ctx *RequestCtx) IsTrace() bool

func (*RequestCtx) LastTimeoutErrorResponse added in v0.5.0

func (ctx *RequestCtx) LastTimeoutErrorResponse() *fasthttp.Response

func (*RequestCtx) LocalAddr added in v0.5.0

func (ctx *RequestCtx) LocalAddr() net.Addr

func (*RequestCtx) LocalIP added in v0.5.0

func (ctx *RequestCtx) LocalIP() net.IP

func (*RequestCtx) Logger added in v0.5.0

func (ctx *RequestCtx) Logger() fasthttp.Logger

func (*RequestCtx) Method added in v0.5.0

func (ctx *RequestCtx) Method() []byte

func (*RequestCtx) MultipartForm added in v0.5.0

func (ctx *RequestCtx) MultipartForm() (*multipart.Form, error)

func (*RequestCtx) NotFound added in v0.5.0

func (ctx *RequestCtx) NotFound()

func (*RequestCtx) NotModified added in v0.5.0

func (ctx *RequestCtx) NotModified()

func (*RequestCtx) Path added in v0.5.0

func (ctx *RequestCtx) Path() []byte

func (*RequestCtx) PostArgs added in v0.5.0

func (ctx *RequestCtx) PostArgs() *fasthttp.Args

func (*RequestCtx) PostBody added in v0.5.0

func (ctx *RequestCtx) PostBody() []byte

func (*RequestCtx) QueryArgs added in v0.5.0

func (ctx *RequestCtx) QueryArgs() *fasthttp.Args

func (*RequestCtx) Raw added in v0.5.0

func (ctx *RequestCtx) Raw() *fasthttp.RequestCtx

func (*RequestCtx) Redirect added in v0.5.0

func (ctx *RequestCtx) Redirect(uri string, statusCode int)

func (*RequestCtx) RedirectBytes added in v0.5.0

func (ctx *RequestCtx) RedirectBytes(uri []byte, statusCode int)

func (*RequestCtx) Referer added in v0.5.0

func (ctx *RequestCtx) Referer() []byte

func (*RequestCtx) RemoteAddr added in v0.5.0

func (ctx *RequestCtx) RemoteAddr() net.Addr

func (*RequestCtx) RemoteIP added in v0.5.0

func (ctx *RequestCtx) RemoteIP() net.IP

func (*RequestCtx) RemoveUserValue added in v0.5.0

func (ctx *RequestCtx) RemoveUserValue(key any)

func (*RequestCtx) RequestURI added in v0.5.0

func (ctx *RequestCtx) RequestURI() []byte

func (*RequestCtx) ResetBody added in v0.5.0

func (ctx *RequestCtx) ResetBody()

func (*RequestCtx) ResetUserValues added in v0.5.0

func (ctx *RequestCtx) ResetUserValues()

func (*RequestCtx) SendFile added in v0.5.0

func (ctx *RequestCtx) SendFile(path string)

func (*RequestCtx) SendFileBytes added in v0.5.0

func (ctx *RequestCtx) SendFileBytes(path []byte)

func (*RequestCtx) SetBody added in v0.5.0

func (ctx *RequestCtx) SetBody(body []byte)

func (*RequestCtx) SetBodyStream added in v0.5.0

func (ctx *RequestCtx) SetBodyStream(bodyStream io.Reader, bodySize int)

func (*RequestCtx) SetBodyStreamWriter added in v0.5.0

func (ctx *RequestCtx) SetBodyStreamWriter(sw fasthttp.StreamWriter)

func (*RequestCtx) SetBodyString added in v0.5.0

func (ctx *RequestCtx) SetBodyString(body string)

func (*RequestCtx) SetConnectionClose added in v0.5.0

func (ctx *RequestCtx) SetConnectionClose()

func (*RequestCtx) SetContentType added in v0.5.0

func (ctx *RequestCtx) SetContentType(contentType string)

func (*RequestCtx) SetContentTypeBytes added in v0.5.0

func (ctx *RequestCtx) SetContentTypeBytes(contentType []byte)

func (*RequestCtx) SetInputs added in v0.5.0

func (ctx *RequestCtx) SetInputs(data map[string]any)

func (*RequestCtx) SetRemoteAddr added in v0.5.0

func (ctx *RequestCtx) SetRemoteAddr(remoteAddr net.Addr)

func (*RequestCtx) SetStatusCode added in v0.5.0

func (ctx *RequestCtx) SetStatusCode(statusCode int)

func (*RequestCtx) SetUserValue added in v0.5.0

func (ctx *RequestCtx) SetUserValue(key any, value any)

func (*RequestCtx) SetUserValueBytes added in v0.5.0

func (ctx *RequestCtx) SetUserValueBytes(key []byte, value any)

func (*RequestCtx) String added in v0.5.0

func (ctx *RequestCtx) String() string

func (*RequestCtx) Success added in v0.5.0

func (ctx *RequestCtx) Success(contentType string, body []byte)

func (*RequestCtx) SuccessString added in v0.5.0

func (ctx *RequestCtx) SuccessString(contentType, body string)

func (*RequestCtx) TLSConnectionState added in v0.5.0

func (ctx *RequestCtx) TLSConnectionState() *tls.ConnectionState

func (*RequestCtx) Time added in v0.5.0

func (ctx *RequestCtx) Time() time.Time

func (*RequestCtx) TimeoutError added in v0.5.0

func (ctx *RequestCtx) TimeoutError(msg string)

func (*RequestCtx) TimeoutErrorWithCode added in v0.5.0

func (ctx *RequestCtx) TimeoutErrorWithCode(msg string, statusCode int)

func (*RequestCtx) TimeoutErrorWithResponse added in v0.5.0

func (ctx *RequestCtx) TimeoutErrorWithResponse(resp *fasthttp.Response)

func (*RequestCtx) URI added in v0.5.0

func (ctx *RequestCtx) URI() *fasthttp.URI

func (*RequestCtx) UserAgent added in v0.5.0

func (ctx *RequestCtx) UserAgent() []byte

func (*RequestCtx) UserValue added in v0.5.0

func (ctx *RequestCtx) UserValue(key any) any

func (*RequestCtx) UserValueBytes added in v0.5.0

func (ctx *RequestCtx) UserValueBytes(key []byte) any

func (*RequestCtx) Value added in v0.5.0

func (ctx *RequestCtx) Value(key any) any

func (*RequestCtx) VisitUserValues added in v0.5.0

func (ctx *RequestCtx) VisitUserValues(visitor func([]byte, any))

func (*RequestCtx) VisitUserValuesAll added in v0.5.0

func (ctx *RequestCtx) VisitUserValuesAll(visitor func(any, any))

func (*RequestCtx) Write added in v0.5.0

func (ctx *RequestCtx) Write(p []byte) (int, error)

func (*RequestCtx) WriteAny added in v0.5.0

func (ctx *RequestCtx) WriteAny(data any) (int, error)

func (*RequestCtx) WriteString added in v0.5.0

func (ctx *RequestCtx) WriteString(s string) (int, error)

type RequestHandler

type RequestHandler func(ctx *RequestCtx) any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL