binding

package
v0.16.13 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(c fiber.Ctx, obj interface{}) error

Types

type ArgsSource added in v0.3.8

type ArgsSource fasthttp.Args

func (*ArgsSource) HasValue added in v0.12.1

func (form *ArgsSource) HasValue(key string) bool

func (*ArgsSource) Peek added in v0.3.8

func (form *ArgsSource) Peek(key string) ([]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 CtxSource added in v0.3.8

type CtxSource fasthttp.RequestCtx

func (*CtxSource) Peek added in v0.3.8

func (form *CtxSource) Peek(key string) ([]string, bool)

func (*CtxSource) TrySet added in v0.3.8

func (form *CtxSource) 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 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 RequestSource added in v0.16.0

type RequestSource struct {
	fiber.Ctx
}

func (RequestSource) BodyBind added in v0.16.0

func (s RequestSource) BodyBind(obj any) error

func (RequestSource) Form added in v0.16.0

func (s RequestSource) Form() mtos.Setter

func (RequestSource) Header added in v0.16.0

func (s RequestSource) Header() mtos.Setter

func (RequestSource) Query added in v0.16.0

func (s RequestSource) Query() mtos.Setter

func (RequestSource) Uri added in v0.16.0

func (s RequestSource) Uri() mtos.Setter

Jump to

Keyboard shortcuts

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