Documentation
¶
Index ¶
- Variables
- func Redirect(w http.ResponseWriter, r *http.Request, path string)
- func RenderError(w http.ResponseWriter, httpStatus int, message string) error
- func RenderInfo(w http.ResponseWriter, message string) error
- func RenderMealTable(w http.ResponseWriter, data []MealTableData) error
- func RenderSuccess(w http.ResponseWriter, message string) error
- type MealTableData
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParsingTemplate = fmt.Errorf("error parsing template") ErrExecutingTemplate = fmt.Errorf("error executing template") )
View Source
var EmptyTableTemplate = `` /* 210-byte string literal not displayed */
View Source
var ErrorTemplate = `
<div class="alert alert-danger">
<p>{{ .Message }}</p>
</div>
`
View Source
var InfoTemplate = `
<div class="alert alert-info">
<p>{{ .Message }}</p>
</div>
`
View Source
var MealTableTemplate = `` /* 446-byte string literal not displayed */
View Source
var SuccessTemplate = `
<div class="alert alert-success">
<p>{{ .Message }}</p>
</div>
`
Functions ¶
func RenderError ¶
func RenderError(w http.ResponseWriter, httpStatus int, message string) error
func RenderInfo ¶
func RenderInfo(w http.ResponseWriter, message string) error
func RenderMealTable ¶
func RenderMealTable(w http.ResponseWriter, data []MealTableData) error
func RenderSuccess ¶
func RenderSuccess(w http.ResponseWriter, message string) error
Types ¶
Click to show internal directories.
Click to hide internal directories.