Documentation
¶
Index ¶
- Variables
- func Bind(c fiber.Ctx, obj interface{}) error
- func BindBody(r fiber.Ctx, obj interface{}) error
- func BindHeader(c fiber.Ctx, obj interface{}) error
- func BindQuery(c fiber.Ctx, obj interface{}) error
- func BindUri(c fiber.Ctx, obj interface{}) error
- func BindWith(c fiber.Ctx, obj interface{}, b Binding) error
- func NewReq[REQ any](c fiber.Ctx) (*REQ, error)
- func SetTag(tag string)
- type ArgsSource
- type Binding
- type BindingBody
- type CtxSource
- type HeaderSource
- type MultipartRequest
- type QuerySource
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CustomBody = &bodyBinding{name: "json", unmarshaller: json.Unmarshal} Query = queryBinding{} FormPost = formPostBinding{} FormMultipart = formMultipartBinding{} Uri = uriBinding{} Header = headerBinding{} )
Functions ¶
func BindHeader ¶ added in v0.12.0
Types ¶
type ArgsSource ¶ added in v0.3.8
func (*ArgsSource) HasValue ¶ added in v0.12.1
func (form *ArgsSource) HasValue(key string) bool
func (*ArgsSource) TrySet ¶ added in v0.3.8
func (form *ArgsSource) TrySet(value reflect.Value, field *reflect.StructField, key string, opt mtos.SetOptions) (isSet bool, err error)
TrySet tries to set a value by request's form source (like map[string][]string)
type BindingBody ¶
type CtxSource ¶ added in v0.3.8
type CtxSource fasthttp.RequestCtx
type HeaderSource ¶ added in v0.3.8
type HeaderSource fasthttp.RequestHeader
func (*HeaderSource) Peek ¶ added in v0.3.8
func (form *HeaderSource) Peek(key string) ([]string, bool)
func (*HeaderSource) TrySet ¶ added in v0.3.8
func (form *HeaderSource) TrySet(value reflect.Value, field *reflect.StructField, key string, opt mtos.SetOptions) (isSet bool, err error)
TrySet tries to set a value by request's form source (like map[string][]string)
type MultipartRequest ¶ added in v0.3.8
func (*MultipartRequest) TrySet ¶ added in v0.3.8
func (r *MultipartRequest) TrySet(value reflect.Value, field *reflect.StructField, key string, opt mtos.SetOptions) (isSet bool, err error)
TrySet tries to set a value by the multipart request with the binding a form file
type QuerySource ¶
func (QuerySource) HasValue ¶ added in v0.12.1
func (q QuerySource) HasValue(key string) bool
Click to show internal directories.
Click to hide internal directories.