Documentation ¶
Index ¶
- func BufferedParse(eng MutEngine, fsys fs.FS, name, path string) (err error)
- func ParseFromPaths(eng MutEngine, ctx ParseContext, parser ParserFn) (err error)
- func RenderBackground(e Engine, cfg Config) (err error)
- type BufferedEngine
- type BufferedExecutor
- type BundleMethods
- type BundlerBuilder
- type Config
- type Engine
- type ExecuteConfig
- type ExecuteContext
- type Executor
- type FsysInclude
- type FuncMap
- type HTML
- type HTMLAttr
- type HTMLBundler
- type IncludeFunc
- type Includer
- type Iter
- type Kind
- type Loader
- type LogIncluder
- type Manager
- type MutEngine
- type ParseContext
- type Parser
- type ParserFn
- type Paths
- type PongoEngine
- type ReadWriterPool
- type SetupConfig
- type StdLibHtmlEngine
- func (s *StdLibHtmlEngine) GetTemplate(tpl string) (*template.Template, error)
- func (s StdLibHtmlEngine) HasTemplate(name string) (*template.Template, bool)
- func (s *StdLibHtmlEngine) ParseTemplate(name string, content io.Reader) (err error)
- func (s *StdLibHtmlEngine) Render(ctx context.Context, cfg Config) (err error)
- func (s *StdLibHtmlEngine) SetFuncs(funcs template.FuncMap) (err error)
- func (s *StdLibHtmlEngine) UniqueName(tpl string) string
- type StdLibTextEngine
- func (s *StdLibTextEngine) GetTemplate(tpl string) (*template.Template, error)
- func (s StdLibTextEngine) HasTemplate(name string) (*template.Template, bool)
- func (s *StdLibTextEngine) ParseTemplate(name string, content io.Reader) (err error)
- func (s *StdLibTextEngine) Render(ctx context.Context, cfg Config) (err error)
- func (s *StdLibTextEngine) SetFuncs(funcs FuncMap) (err error)
- func (s *StdLibTextEngine) UniqueName(tpl string) string
- type Template
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFromPaths ¶
func ParseFromPaths(eng MutEngine, ctx ParseContext, parser ParserFn) (err error)
func RenderBackground ¶
Types ¶
type BufferedEngine ¶
type BufferedEngine struct {
// contains filtered or unexported fields
}
BufferedEngine first renders the template into a ReadWriter. If rendering is successful the contents of the ReadWriter will be copied into the Writer passed to the Render call.
func NewBufferedEngine ¶
func NewBufferedEngine(e Engine, p pool.Bufio) (b BufferedEngine)
type BufferedExecutor ¶
type BufferedExecutor struct {
// contains filtered or unexported fields
}
func NewBufferedExecutor ¶
func NewBufferedExecutor() (b BufferedExecutor)
func (BufferedExecutor) ExecuteTemplates ¶
func (b BufferedExecutor) ExecuteTemplates(eng Engine, ctx ExecuteContext) (err error)
type BundleMethods ¶
type BundleMethods struct {
Includer Includer
}
type BundlerBuilder ¶
type BundlerBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(fsys fs.FS) (bb BundlerBuilder)
func (BundlerBuilder) BuildMethods ¶
func (bb BundlerBuilder) BuildMethods() (m BundleMethods)
func (*BundlerBuilder) SetLog ¶
func (bb *BundlerBuilder) SetLog(log zerolog.Logger)
type ExecuteConfig ¶
type Executor ¶
type Executor interface {
ExecuteTemplates(eng Engine, ctx ExecuteContext) (err error)
}
type FsysInclude ¶
type FsysInclude struct {
// contains filtered or unexported fields
}
func (FsysInclude) IncludeInto ¶
func (f FsysInclude) IncludeInto(path string, w io.Writer) (err error)
type IncludeFunc ¶
type Kind ¶
type Kind int
ENUM(
String ID
)
func (Kind) AsTemplate ¶
func (Kind) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Kind) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type LogIncluder ¶
type LogIncluder struct {
// contains filtered or unexported fields
}
func (LogIncluder) IncludeInto ¶
func (l LogIncluder) IncludeInto(path string, w io.Writer) (err error)
type ParseContext ¶
type PongoEngine ¶
type PongoEngine struct {
// contains filtered or unexported fields
}
func EmptyPongoEngine ¶
func EmptyPongoEngine() PongoEngine
func (PongoEngine) GetTemplate ¶
func (pg PongoEngine) GetTemplate(template string) (*pongo.Template, error)
func (PongoEngine) ParseTemplate ¶
func (pg PongoEngine) ParseTemplate(name string, content io.Reader) (err error)
func (PongoEngine) Render ¶
func (pg PongoEngine) Render(ctx context.Context, cfg Config) (err error)
func (PongoEngine) SetFuncs ¶
func (pg PongoEngine) SetFuncs(funcs FuncMap) error
type ReadWriterPool ¶
type ReadWriterPool interface { GetReadWriter() io.ReadWriter PutReadWriter(io.ReadWriter) }
ReadWriterPool represents a generic pool for ReadWriter objects.
type SetupConfig ¶
type StdLibHtmlEngine ¶
type StdLibHtmlEngine struct {
// contains filtered or unexported fields
}
func EmptyStdHtmlEngine ¶
func EmptyStdHtmlEngine() (s StdLibHtmlEngine)
func StdHtmlEngineFromTpls ¶
func StdHtmlEngineFromTpls(tpls *template.Template) (s StdLibHtmlEngine)
func (*StdLibHtmlEngine) GetTemplate ¶
func (s *StdLibHtmlEngine) GetTemplate(tpl string) (*template.Template, error)
func (StdLibHtmlEngine) HasTemplate ¶
func (s StdLibHtmlEngine) HasTemplate(name string) (*template.Template, bool)
func (*StdLibHtmlEngine) ParseTemplate ¶
func (s *StdLibHtmlEngine) ParseTemplate(name string, content io.Reader) (err error)
func (*StdLibHtmlEngine) Render ¶
func (s *StdLibHtmlEngine) Render(ctx context.Context, cfg Config) (err error)
func (*StdLibHtmlEngine) SetFuncs ¶
func (s *StdLibHtmlEngine) SetFuncs(funcs template.FuncMap) (err error)
func (*StdLibHtmlEngine) UniqueName ¶
func (s *StdLibHtmlEngine) UniqueName(tpl string) string
type StdLibTextEngine ¶
type StdLibTextEngine struct {
// contains filtered or unexported fields
}
func EmptyStdTextEngine ¶
func EmptyStdTextEngine() (s StdLibTextEngine)
func StdTextEngineFromTpls ¶
func StdTextEngineFromTpls(tpls *template.Template) (s StdLibTextEngine)
func (*StdLibTextEngine) GetTemplate ¶
func (s *StdLibTextEngine) GetTemplate(tpl string) (*template.Template, error)
func (StdLibTextEngine) HasTemplate ¶
func (s StdLibTextEngine) HasTemplate(name string) (*template.Template, bool)
func (*StdLibTextEngine) ParseTemplate ¶
func (s *StdLibTextEngine) ParseTemplate(name string, content io.Reader) (err error)
func (*StdLibTextEngine) Render ¶
func (s *StdLibTextEngine) Render(ctx context.Context, cfg Config) (err error)
func (*StdLibTextEngine) SetFuncs ¶
func (s *StdLibTextEngine) SetFuncs(funcs FuncMap) (err error)
func (*StdLibTextEngine) UniqueName ¶
func (s *StdLibTextEngine) UniqueName(tpl string) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.