binders

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyMultipartFormError = errors.New("nil *multipart.Form got")

EmptyMultipartFormError may be used outside

Functions

This section is empty.

Types

type BindMethod

type BindMethod func(reflect.Value, []string) error

func FormatTimeBinder

func FormatTimeBinder(format string) BindMethod

func Int64TimeBinder

func Int64TimeBinder() BindMethod

type Binder added in v1.0.8

type Binder interface {
	Bind(request *http.Request, v interface{}) error
}

type FormBinder

type FormBinder struct{}

func (FormBinder) Bind added in v1.0.8

func (FormBinder) Bind(request *http.Request, v interface{}) error

type HeaderBinder added in v1.1.3

type HeaderBinder struct{}

func (HeaderBinder) Bind added in v1.1.3

func (h HeaderBinder) Bind(request *http.Request, v interface{}) error

type HttpMultipartFormBinder

type HttpMultipartFormBinder struct {
	URLValueBinder
	FieldTag string
}

func (*HttpMultipartFormBinder) BindMultipartForm

func (m *HttpMultipartFormBinder) BindMultipartForm(form *multipart.Form, v interface{}) error

type JsonBodyBinder added in v1.0.8

type JsonBodyBinder struct {
	Serializer internal.Serializer
}

func (JsonBodyBinder) Bind added in v1.0.8

func (j JsonBodyBinder) Bind(request *http.Request, v interface{}) error

type MultipartFormBodyBinder added in v1.0.8

type MultipartFormBodyBinder struct{}

func (MultipartFormBodyBinder) Bind added in v1.0.8

func (MultipartFormBodyBinder) Bind(request *http.Request, v interface{}) error

type QueryBinder added in v1.0.8

type QueryBinder struct{}

func (QueryBinder) Bind added in v1.0.8

func (QueryBinder) Bind(request *http.Request, v interface{}) error

type URIBinder added in v1.1.5

type URIBinder struct {
	Values url.Values
}

func (URIBinder) Bind added in v1.1.5

func (u URIBinder) Bind(request *http.Request, v interface{}) error

type URIParamContextKey added in v1.1.5

type URIParamContextKey struct{}

type URLValueBinder added in v1.1.5

type URLValueBinder struct {
	TagName     string
	BindTagName string
	BindMethods map[string]BindMethod
}

func (*URLValueBinder) AddBindMethod added in v1.1.5

func (f *URLValueBinder) AddBindMethod(name string, method BindMethod) error

func (URLValueBinder) BindForm added in v1.1.5

func (f URLValueBinder) BindForm(form url.Values, v interface{}) error

type XmlBodyBinder added in v1.0.8

type XmlBodyBinder struct {
	Serializer internal.Serializer
}

func (XmlBodyBinder) Bind added in v1.0.8

func (j XmlBodyBinder) Bind(request *http.Request, v interface{}) error

Jump to

Keyboard shortcuts

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