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 ¶
Decoders is a map that mapping from content type to decoder.
type Validatable ¶
type Validatable interface {
Validate() error
}
Validatable indicates whether a value can be validated.
Click to show internal directories.
Click to hide internal directories.