api

package
v0.0.0-...-dd9661b Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(req *http.Request, obj interface{}) error

Bind parses request body into obj structure

func BindJSON

func BindJSON(req *http.Request, obj interface{}) error

BindJSON parses JSON request body

func BindSkipBody

func BindSkipBody(req *http.Request, obj interface{}) error

BindSkipBody parses request header and URI into obj structure, skipping request body

func BindXML

func BindXML(req *http.Request, obj interface{}) error

BindXML parses XML request body

Types

type Error

type Error struct {
	Code    int
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type Handler

type Handler struct {
	*mux.Router
	RequestIDGenFunc func(req *http.Request) string
}

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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