Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONDecorator ¶
func JSONDecorator(handler JSONHandlerFunc) http.HandlerFunc
wraps JSONHanderFunc functions and provide JSON Content-type, marshaling, and HTTP error code functionality
Types ¶
type JSONHandlerFunc ¶
type JSONHandlerFunc func(http.ResponseWriter, *http.Request) (interface{}, error)
a specialized version of http.HandlerFunc that returns (interface{}, error) and is intended to be wrapped by JSONDecorator
Click to show internal directories.
Click to hide internal directories.