Documentation ¶
Overview ¶
Package ginview Created by Teocci. Author: teocci@yandex.com on 2022-12월-24
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
HTML is a render for template You should use helper func `Middleware()` to set the supplied TemplateEngine and make `HTML()` work validly.
func NewMiddleware ¶
func NewMiddleware(config view.Config) gin.HandlerFunc
NewMiddleware gin middleware for func `gintemplate.HTML()`
Types ¶
type ViewEngine ¶
ViewEngine view engine for gin
type ViewRender ¶
type ViewRender struct { Engine *ViewEngine Name string Data interface{} }
ViewRender view render implement gin interface
func (ViewRender) Render ¶
func (v ViewRender) Render(w http.ResponseWriter) error
Render (YAML) marshals the given interface object and writes data with custom ContentType.
func (ViewRender) WriteContentType ¶
func (v ViewRender) WriteContentType(w http.ResponseWriter)
WriteContentType write html content type
Click to show internal directories.
Click to hide internal directories.