Documentation ¶
Overview ¶
Copyright 2017 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 ¶
- func New(templateDir string, args ...logger.Logger) driver.Driver
- type Jet
- func (a *Jet) Debug() bool
- func (a *Jet) Fetch(tmpl string, data interface{}, c echo.Context) string
- func (a *Jet) Logger() logger.Logger
- func (a *Jet) RawContent(tmpl string) (b []byte, e error)
- func (a *Jet) Render(w io.Writer, tmpl string, data interface{}, c echo.Context) error
- func (a *Jet) RenderBy(w io.Writer, tmplName string, tmplContent func(string) ([]byte, error), ...) error
- func (a *Jet) SetDebug(on bool)
- func (a *Jet) SetFuncMap(fn func() map[string]interface{})
- func (a *Jet) SetLogger(l logger.Logger)
- func (a *Jet) SetTmplPathFixer(fn func(echo.Context, string) string)
- func (a *Jet) TmplDir() string
- func (a *Jet) TmplPath(c echo.Context, tmpl string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Jet ¶
type Jet struct { *driver.NopRenderer // contains filtered or unexported fields }
func (*Jet) RenderBy ¶ added in v1.6.0
func (a *Jet) RenderBy(w io.Writer, tmplName string, tmplContent func(string) ([]byte, error), values interface{}, c echo.Context) error
RenderBy render by content
func (*Jet) SetFuncMap ¶
func (*Jet) SetTmplPathFixer ¶ added in v1.4.3
Click to show internal directories.
Click to hide internal directories.