Documentation ¶
Index ¶
- Variables
- func AddCustomBindFormMethod(name string, method CustomBindMethod) error
- func BindForm(form url.Values, v interface{}) error
- func BindMultipartForm(form *multipart.Form, v interface{}) error
- type BodyBinder
- type CustomBindMethod
- type CustomFormBinder
- type CustomMultipartFormBinder
- type FormBinder
- type MultipartFormBinder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // may be used outside EmptyMultipartFormError = errors.New("nil *multipart.Form got") )
View Source
var JsonBodyBinder = NewBodyBinder(json.Unmarshal)
View Source
var XmlBodyBinder = NewBodyBinder(xml.Unmarshal)
Functions ¶
func AddCustomBindFormMethod ¶
func AddCustomBindFormMethod(name string, method CustomBindMethod) error
func BindMultipartForm ¶
Types ¶
type BodyBinder ¶
func NewBodyBinder ¶
func NewBodyBinder(unmarshaler func([]byte, interface{}) error) *BodyBinder
type CustomBindMethod ¶
func FormatTimeBinder ¶
func FormatTimeBinder(format string) CustomBindMethod
func Int64TimeBinder ¶
func Int64TimeBinder() CustomBindMethod
type CustomFormBinder ¶
type FormBinder ¶
type FormBinder struct { TagName string CustomBindTagName string BindMethods map[string]CustomBindMethod }
func DefaultFormBinder ¶
func DefaultFormBinder() *FormBinder
func NewFormBinder ¶
func NewFormBinder(tagName string) *FormBinder
func (*FormBinder) AddCustomBindFormMethod ¶
func (f *FormBinder) AddCustomBindFormMethod(name string, method CustomBindMethod) error
type MultipartFormBinder ¶
type MultipartFormBinder struct { *FormBinder FieldTag string }
Click to show internal directories.
Click to hide internal directories.