Documentation ¶
Index ¶
- Variables
- func Flash(w http.ResponseWriter, r *http.Request, message string, args ...interface{})
- func FlashAndRedirect(w http.ResponseWriter, r *http.Request, location, message string, ...)
- func FlashAndReload(w http.ResponseWriter, r *http.Request, message string, args ...interface{})
- func JSON(w http.ResponseWriter, statusCode int, v interface{})
- func Redirect(w http.ResponseWriter, location string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotFound func(http.ResponseWriter, *http.Request, string) Forbidden func(http.ResponseWriter, *http.Request, string) BadRequest func(http.ResponseWriter, *http.Request, string) Error func(http.ResponseWriter, *http.Request, string) )
Error handlers to be filled in by the blog app.
Functions ¶
func Flash ¶
func Flash(w http.ResponseWriter, r *http.Request, message string, args ...interface{})
Flash adds a flash message to the user's session.
func FlashAndRedirect ¶
func FlashAndRedirect(w http.ResponseWriter, r *http.Request, location, message string, args ...interface{})
FlashAndRedirect flashes and redirects in one go.
func FlashAndReload ¶
func FlashAndReload(w http.ResponseWriter, r *http.Request, message string, args ...interface{})
FlashAndReload flashes and sends a redirect to the same path.
func JSON ¶
func JSON(w http.ResponseWriter, statusCode int, v interface{})
JSON serializes a JSON response to the browser.
func Redirect ¶
func Redirect(w http.ResponseWriter, location string)
Redirect sends an HTTP redirect response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.