gocraft

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindMiddleware

func BindMiddleware(field interface{}, errorWriter ...func(web.ResponseWriter, error, map[string]rv.Field)) func(
	interface{}, web.ResponseWriter, *web.Request, web.NextMiddlewareFunc)

BindMiddleware creates an rv.RequestHandler for the specified field type and returns a middleware which finds a field of that type on the context and binds the values to that field via the RequestHandler.

func ErrorWriter

func ErrorWriter(rw web.ResponseWriter, argErr error, fieldErrors map[string]rv.Field)

Types

type Request

type Request struct {
	Request *web.Request
	// contains filtered or unexported fields
}

func (*Request) BodyForm

func (r *Request) BodyForm() (url.Values, error)

func (*Request) BodyJSON

func (r *Request) BodyJSON() (map[string]interface{}, error)

func (*Request) PathArgs

func (r *Request) PathArgs() (map[string]string, error)

func (*Request) QueryArgs

func (r *Request) QueryArgs() (url.Values, error)

Jump to

Keyboard shortcuts

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