pongo2echo

package
v0.0.0-...-b1f09d4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Base on github.com/robvdl/pongo2gin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pongo2Render

type Pongo2Render struct {
	Options  *RenderOptions
	Template *pongo2.Template
	Context  pongo2.Context
}

Pongo2Render is a custom Gin template renderer using Pongo2.

func Default

func Default() Pongo2Render

Default creates a Pongo2Render instance with default options.

func New

func New(options RenderOptions) Pongo2Render

New creates a new Pongo2Render instance with custom Options.

func (Pongo2Render) Render

func (p Pongo2Render) Render(w io.Writer, name string, data interface{}, c echo.Context) error

type RenderOptions

type RenderOptions struct {
	TmplLoader  pongo2.TemplateLoader
	TemplateDir string
	ContentType string
	Debug       bool
}

RenderOptions is used to configure the renderer.

Jump to

Keyboard shortcuts

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