binding

package
v0.0.0-...-40d41bb Latest Latest
Warning

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

Go to latest
Published: May 24, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIMEJSON              = "application/json"
	MIMEHTML              = "text/html"
	MIMEXML               = "application/xml"
	MIMEXML2              = "text/xml"
	MIMEPlain             = "text/plain"
	MIMEPOSTForm          = "application/x-www-form-urlencoded"
	MIMEMultipartPOSTForm = "multipart/form-data"
)

Variables

View Source
var (
	JSON = jsonBinding{}
	XML  = xmlBinding{}
	Form = formBinding{}
)

Functions

func Validate

func Validate(obj interface{}) error

func ValidateField

func ValidateField(f interface{}, tag string) error

Types

type Binding

type Binding interface {
	Name() string
	Bind(*http.Request, interface{}) error
}

func Default

func Default(method, contentType string) Binding

Jump to

Keyboard shortcuts

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