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, datas ...map[string]interface{})
- func Ok(ctx *context.Context)
- func OkWithData(ctx *context.Context, data map[string]interface{})
- func OkWithMsg(ctx *context.Context, msg string)
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.