Documentation
¶
Index ¶
- func CheckHeaderParams(name string, v *string, ctx *app.RequestContext) bool
- func CheckHeaderParamsWithErrorMsg(name string, v *string, errorMsg string, ctx *app.RequestContext) bool
- func CheckParamsWithErrorMsg(name string, str string, v *string, errorMsg string, ctx *app.RequestContext) bool
- func CheckPostFormParams(name string, v *string, ctx *app.RequestContext) bool
- func CheckPostFormParamsWithErrorMsg(name string, v *string, errorMsg string, ctx *app.RequestContext) bool
- func CheckQueryParams(name string, v *string, ctx *app.RequestContext) bool
- func CheckQueryParamsWithErrorMsg(name string, v *string, errorMsg string, ctx *app.RequestContext) bool
- func GetHeader(ctx *app.RequestContext, key string) string
- func NewServer(options gServer.Options, routerProvider func(engine *server.Hertz), ...) gServer.Server
- func PostFormArray(ctx *app.RequestContext, name string) []string
- func QueryArray(ctx *app.RequestContext, name string) []string
- func ShouldBindBody(ctx *app.RequestContext, obj any) error
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHeaderParams ¶
func CheckHeaderParams(name string, v *string, ctx *app.RequestContext) bool
func CheckParamsWithErrorMsg ¶
func CheckPostFormParams ¶
func CheckPostFormParams(name string, v *string, ctx *app.RequestContext) bool
func CheckQueryParams ¶
func CheckQueryParams(name string, v *string, ctx *app.RequestContext) bool
func PostFormArray ¶
func PostFormArray(ctx *app.RequestContext, name string) []string
func QueryArray ¶
func QueryArray(ctx *app.RequestContext, name string) []string
func ShouldBindBody ¶
func ShouldBindBody(ctx *app.RequestContext, obj any) error
ShouldBindBody binds the request body to a struct. It supports decoding the following content types based on the Content-Type header: application/json, application/xml, application/x-www-form-urlencoded, multipart/form-data If none of the content types above are matched, it will return a ErrUnprocessableEntity error
Types ¶
Click to show internal directories.
Click to hide internal directories.