Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentType = "Content-Type" JSON = "application/json; charset=utf-8" XML = "application/xml; charset=utf-8" TEXT = "text/plain; charset=utf-8" HTML = "text/html; charset=utf-8" JAVASCRIPT = "application/javascript; charset=utf-8" )
Variables ¶
View Source
var DefaultIndent = " "
Functions ¶
This section is empty.
Types ¶
type AbstractRender ¶
type AbstractRender struct { }
type HtmlTemplateRender ¶
type HtmlTemplateRender struct { Template *template.Template Name string Data any AbstractRender }
type JsonRender ¶
type JsonRender struct { Data any // 带有html格式的json是否不被编码 Pure bool // 是否展开json Expand bool AbstractRender }
type JsonpRender ¶
type JsonpRender struct { // 回调 Callback string Data any AbstractRender }
type RedirectRender ¶
type RedirectRender struct { Url string Request *http.Request AbstractRender }
type StringRender ¶
type StringRender struct { // 格式 Format string Data []any AbstractRender }
Click to show internal directories.
Click to hide internal directories.