Documentation ¶
Overview ¶
Package form is a form decoder that decode request body into a struct.
Index ¶
Constants ¶
View Source
const ( ContentType = "Content-Type" ContentTypeForm = "application/x-www-form-urlencoded" ContentTypeMultipartForm = "multipart/form-data" ContentTypeJSON = "application/json" ContentTypeXML = "application/xml" )
Content type constants.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decoder ¶
Decoder is a function that decode data from request into v.
func NewMultipartForm ¶
NewMultipartForm returns a multipart form decoder with the given schema decoder.
type Decoders ¶ added in v1.1.0
Decoders is a map that mapping from content type to decoder.
type Validatable ¶ added in v1.3.0
type Validatable interface {
Validate() error
}
Validatable indicates whether a value can be validated.
Click to show internal directories.
Click to hide internal directories.