Documentation ¶
Index ¶
- Variables
- func Alert(ctx *context.Context, desc, title, msg string, conn db.Connection)
- func BadRequest(ctx *context.Context, msg string)
- func Denied(ctx *context.Context, msg string)
- func Error(ctx *context.Context, msg string)
- func Ok(ctx *context.Context)
- func OkWithData(ctx *context.Context, data map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var OffLineHandler = func(ctx *context.Context) { if config.GetSiteOff() { if ctx.WantHTML() { ctx.HTML(http.StatusOK, `<html><body><h1>The website is offline</h1></body></html>`) } else { ctx.JSON(http.StatusForbidden, map[string]interface{}{ "code": http.StatusForbidden, "msg": language.Get(errors.SiteOff), }) } ctx.Abort() } }
Functions ¶
func BadRequest ¶
func OkWithData ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.