web

package
v0.0.0-...-95cecc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngine

func NewEngine() *gin.Engine

Types

type LayoutRender

type LayoutRender struct {
	Data gin.H
	// contains filtered or unexported fields
}

LayoutRender wraps user templates into a root one which has it's own data and a bunch of inner blocks

func NewLayoutRender

func NewLayoutRender(templatesFS fs.FS, data gin.H, templates ...string) *LayoutRender

The default constructor expects an FS, some data, and user templates; user templates are the ones that can be referenced by the Gin context.

func (*LayoutRender) Instance

func (r *LayoutRender) Instance(name string, data interface{}) render.Render

Instance returns a render.HTML instance with the associated named Template

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL