binder

package
v1.0.40 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagHeader   = "header"
	TagParam    = "param"
	TagForm     = "form"
	TagJSON     = "json"
	TagXML      = "xml"
	TagProtobuf = "protobuf"
	TagMsgpack  = "msgpack"
	TagYAML     = "yaml"
	TagEnv      = "env"
)

Variables

View Source
var (
	EnableDecoderUseNumber             = false
	EnableDecoderDisallowUnknownFields = false
)
View Source
var EnvBinder = &envBinder{}
View Source
var (
	ErrInvalidType = errors.New("invalid type")
)
View Source
var FormBinder = &formBinder{}
View Source
var FormMultipartBinder = &formMultipartBinder{}
View Source
var FormPostBinder = &formPostBinder{}
View Source
var HeaderBinder = &headerBinder{}
View Source
var JSONBodyBinder = &jsonBodyBinder{}
View Source
var MsgpackBodyBinder = &msgpackBodyBinder{}
View Source
var ParamBinder = &paramBinder{}
View Source
var ProtobufBodyBinder = &protobufBodyBinder{}
View Source
var QueryBinder = &queryBinder{}
View Source
var XMLBodyBinder = &xmlBodyBinder{}
View Source
var YAMLBodyBinder = &yamlBodyBinder{}

Functions

func Bind added in v1.0.14

func Bind(obj interface{}, values map[string][]string, tagKey string, canonical bool) error

func SetBoolField added in v1.0.14

func SetBoolField(val string, field reflect.Value) error

func SetField added in v1.0.14

func SetField(kind reflect.Kind, val string, field reflect.Value) error

func SetFloatField added in v1.0.14

func SetFloatField(val string, bitSize int, field reflect.Value) error

func SetIntField added in v1.0.14

func SetIntField(val string, bitSize int, field reflect.Value) error

func SetUintField added in v1.0.14

func SetUintField(val string, bitSize int, field reflect.Value) error

Types

type AfterBinder

type AfterBinder interface {
	AfterBind(echo.Context) error
}

type BeforeBinder

type BeforeBinder interface {
	BeforeBind(echo.Context) error
}

type Binder

type Binder interface {
	Bind(echo.Context, interface{}) error
}

Jump to

Keyboard shortcuts

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