echoview

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(e *ViewEngine) echo.MiddlewareFunc

Middleware echo middleware wrapper

func NewMiddleware

func NewMiddleware(config goview.Config) echo.MiddlewareFunc

NewMiddleware echo middleware for func `echoview.Render()`

func Render

func Render(ctx echo.Context, code int, name string, data interface{}) error

Render html render for template You should use helper func `Middleware()` to set the supplied TemplateEngine and make `Render()` work validly.

Types

type ViewEngine

type ViewEngine struct {
	*goview.ViewEngine
}

ViewEngine view engine for echo

func Default

func Default() *ViewEngine

Default new default config view engine

func New

func New(config goview.Config) *ViewEngine

New new view engine

func Wrap

func Wrap(engine *goview.ViewEngine) *ViewEngine

Wrap wrap view engine for goview.ViewEngine

func (*ViewEngine) Render

func (e *ViewEngine) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render render template for echo interface

Jump to

Keyboard shortcuts

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