pongo2

package
v2.30.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(templateDir string, args ...logger.Logger) driver.Driver

func Strip added in v1.3.0

func Strip(b []byte) []byte

Types

type Pongo2

type Pongo2 struct {
	Mgr driver.Manager
	// contains filtered or unexported fields
}

func (*Pongo2) ClearCache

func (a *Pongo2) ClearCache()

func (*Pongo2) Close

func (a *Pongo2) Close()

func (*Pongo2) Debug added in v1.2.0

func (a *Pongo2) Debug() bool

func (*Pongo2) Fetch

func (a *Pongo2) Fetch(tmpl string, data interface{}, c echo.Context) string

func (*Pongo2) Init

func (a *Pongo2) Init()

func (*Pongo2) Logger

func (a *Pongo2) Logger() logger.Logger

func (*Pongo2) Manager added in v1.4.3

func (a *Pongo2) Manager() driver.Manager

func (*Pongo2) MonitorEvent

func (a *Pongo2) MonitorEvent(fn func(string))

func (*Pongo2) RawContent

func (a *Pongo2) RawContent(tmpl string) (b []byte, e error)

func (*Pongo2) Render

func (a *Pongo2) Render(w io.Writer, tmpl string, data interface{}, c echo.Context) error

func (*Pongo2) SetContentProcessor

func (a *Pongo2) SetContentProcessor(fn func([]byte) []byte)

func (*Pongo2) SetDebug added in v1.2.0

func (a *Pongo2) SetDebug(on bool)

func (*Pongo2) SetFuncMap added in v1.1.0

func (a *Pongo2) SetFuncMap(fn func() map[string]interface{})

func (*Pongo2) SetLogger

func (a *Pongo2) SetLogger(l logger.Logger)

func (*Pongo2) SetManager added in v1.1.0

func (a *Pongo2) SetManager(mgr driver.Manager)

func (*Pongo2) SetTmplPathFixer added in v1.4.3

func (a *Pongo2) SetTmplPathFixer(fn func(echo.Context, string) string)

func (*Pongo2) TmplDir

func (a *Pongo2) TmplDir() string

func (*Pongo2) TmplPath

func (a *Pongo2) TmplPath(c echo.Context, tmpl string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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