Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
HTML html render for template You should use helper func `Middleware()` to set the supplied TemplateEngine and make `HTML()` work validly.
func NewMiddleware ¶
func NewMiddleware(config goview.Config) gin.HandlerFunc
NewMiddleware gin middleware for func `gintemplate.HTML()`
Types ¶
type ViewEngine ¶
type ViewEngine struct {
*goview.ViewEngine
}
ViewEngine view engine for gin
func Wrap ¶
func Wrap(engine *goview.ViewEngine) *ViewEngine
Wrap wrap view engine for goview.ViewEngine
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.