Documentation ¶
Index ¶
- func GetFormValues(ctx *fasthttp.RequestCtx) (map[string]any, error)
- func GetRemoteAddr(ctx *fasthttp.RequestCtx) string
- func Parse(ctx *fasthttp.RequestCtx, v any, isValidate bool) error
- func ParseAcceptLanguage(lang string) (string, error)
- func ParseForm(ctx *fasthttp.RequestCtx, v any) error
- func ParseHeader(headerValue string) map[string]string
- func ParseHeaders(r *fasthttp.Request, v any) error
- func ParseJsonBody(r *fasthttp.Request, v any) error
- func ParsePath(ctx *fasthttp.RequestCtx, v any) error
- func RegisterValidation(tag string, fn validator.Func)
- func RegisterValidationTranslation(tag string, trans ut.Translator, registerFn validator.RegisterTranslationsFunc, ...)
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFormValues ¶
func GetFormValues(ctx *fasthttp.RequestCtx) (map[string]any, error)
GetFormValues returns the form values.
func GetRemoteAddr ¶
func GetRemoteAddr(ctx *fasthttp.RequestCtx) string
GetRemoteAddr returns the peer address, supports X-Forward-For.
func Parse ¶
func Parse(ctx *fasthttp.RequestCtx, v any, isValidate bool) error
Parse parses the request.
func ParseAcceptLanguage ¶
func ParseForm ¶
func ParseForm(ctx *fasthttp.RequestCtx, v any) error
ParseForm parses the form request.
func ParseHeader ¶
ParseHeader parses the request header and returns a map.
func ParseHeaders ¶
ParseHeaders parses the headers request.
func ParseJsonBody ¶
ParseJsonBody parses the post request which contains json in body.
func ParsePath ¶
func ParsePath(ctx *fasthttp.RequestCtx, v any) error
ParsePath parses the symbols reside in url path. Like http://localhost/bag/:name
func RegisterValidation ¶
func RegisterValidation(tag string, fn validator.Func)
RegisterValidation registers the validation function to validator
func RegisterValidationTranslation ¶
func RegisterValidationTranslation(tag string, trans ut.Translator, registerFn validator.RegisterTranslationsFunc, translationFn validator.TranslationFunc)
RegisterValidationTranslation regiters the validation translation for validator
Types ¶
Click to show internal directories.
Click to hide internal directories.