Documentation ¶
Index ¶
- type Args
- type Context
- func (c *Context) FastHttpCtx() *fasthttp.RequestCtx
- func (c *Context) FormFile(key string) (*multipart.FileHeader, error)
- func (c *Context) Get(key string) (value any, exists bool)
- func (c *Context) Keys() (rawMap maps.IMap[string, any])
- func (c *Context) Logger() *xlog.Logger
- func (c *Context) MustGet(key string) (value any)
- func (c *Context) Put(key string, value any)
- func (c *Context) Request() *fasthttp.Request
- func (c *Context) Response() *fasthttp.Response
- type Ctx
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
}
Context represents the Context which holds the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.
func (*Context) FastHttpCtx ¶ added in v0.0.8
func (c *Context) FastHttpCtx() *fasthttp.RequestCtx
func (*Context) FormFile ¶
func (c *Context) FormFile(key string) (*multipart.FileHeader, error)
FormFile returns uploaded file associated with the given multipart form key.
The file is automatically deleted after returning from RequestHandler, so either move or copy uploaded file into new place if you want retaining it.
Use SaveMultipartFile function for permanently saving uploaded file.
The returned file header is valid until your request handler returns.
type Ctx ¶
type Ctx interface { Logger() *xlog.Logger Request() *fasthttp.Request Response() *fasthttp.Response FastHttpCtx() *fasthttp.RequestCtx FormFile(key string) (*multipart.FileHeader, error) Get(key string) (value any, exists bool) MustGet(key string) (value any) Put(key string, value any) Keys() maps.IMap[string, any] }
func NewContext ¶
func NewContext(ctx *fasthttp.RequestCtx, logs ...*xlog.Logger) Ctx
Click to show internal directories.
Click to hide internal directories.