Documentation ¶
Index ¶
- func Head(w http.ResponseWriter, r *http.Request, out interface{})
- func NewStandardError(logs *log.Logger) func(err error) interface{}
- func Read(r *http.Request, in interface{}) error
- func Redirect(w http.ResponseWriter, r *http.Request, out interface{})
- func Status(w http.ResponseWriter, r *http.Request, out interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Head ¶
func Head(w http.ResponseWriter, r *http.Request, out interface{})
Head is a response hook that checks has a Head method that wants full control over the response headers before the first output is encoded.
func NewStandardError ¶
NewStandardError creates an error hook for handling ep.Error errors. It logs errors to the provided logger creates sensible status codes and only revels standard HTTP text that is associated with that code. It comes with default outputs for the XML, JSON and HTML encoders.
func Read ¶
Read is a request hook that checks if the input has a Read method with full control over reading the request for each input that is decoded.
func Redirect ¶
func Redirect(w http.ResponseWriter, r *http.Request, out interface{})
Redirect is a response hook will check if the output implements a Redirect method to return a non-empty string as a location to redirect to. If the output also implements status it is called to determine the status code to use for redirection.
Types ¶
This section is empty.