Versions in this module Expand all Collapse all v1 v1.0.5 Nov 27, 2022 Changes in this version + func Bind(structPointer interface{}, req *http.Request, pathParams PathParams) error + func BindAndValidate(structPointer interface{}, req *http.Request, pathParams PathParams) error + func MustRegTypeUnmarshal(t reflect.Type, fn func(v string, emptyAsZero bool) (reflect.Value, error)) + func RegTypeUnmarshal(t reflect.Type, fn func(v string, emptyAsZero bool) (reflect.Value, error)) error + func ResetJSONUnmarshaler(fn JSONUnmarshaler) + func SetErrorFactory(bindErrFactory, validatingErrFactory func(failField, msg string) error) + func SetLooseZeroMode(enable bool) + func Validate(value interface{}) error + type Binding struct + func Default() *Binding + func New(config *Config) *Binding + func (b *Binding) Bind(recvPointer interface{}, req *http.Request, pathParams PathParams) error + func (b *Binding) BindAndValidate(recvPointer interface{}, req *http.Request, pathParams PathParams) error + func (b *Binding) IBind(recvPointer interface{}, req Request, pathParams PathParams) error + func (b *Binding) IBindAndValidate(recvPointer interface{}, req Request, pathParams PathParams) error + func (b *Binding) ResetJSONUnmarshaler(fn JSONUnmarshaler) + func (b *Binding) SetErrorFactory(bindErrFactory, validatingErrFactory func(failField, msg string) error) *Binding + func (b *Binding) SetLooseZeroMode(enable bool) *Binding + func (b *Binding) Validate(value interface{}) error + type Body struct + func GetBody(r *http.Request) (*Body, error) + func (b *Body) Bytes() []byte + func (b *Body) Close() error + func (b *Body) Len() int + func (b *Body) Reset() + type Config struct + Cookie string + FormBody string + Header string + LooseZeroMode bool + PathParam string + Query string + RawBody string + Validator string + type Error struct + ErrType string + FailField string + Msg string + func (e *Error) Error() string + type JSONUnmarshaler func(data []byte, v interface{}) error + type PathParams interface + Get func(name string) (string, bool) + type Request interface + GetBody func() ([]byte, error) + GetContentType func() string + GetCookies func() []*http.Cookie + GetForm func() (url.Values, error) + GetHeader func() http.Header + GetMethod func() string + GetPostForm func() (url.Values, error) + GetQuery func() url.Values