Documentation ¶
Index ¶
- type AstTransformer
- type Context
- type Executor
- type GoTemplateCallback
- func (t *GoTemplateCallback) BeforeExec(ctx context.Context, tmpl texttemplate.Preparer)
- func (t *GoTemplateCallback) GetFunc(ctx context.Context, tmpl texttemplate.Preparer, name string) (fn reflect.Value, firstArg reflect.Value, found bool)
- func (t *GoTemplateCallback) GetMapValue(ctx context.Context, tmpl texttemplate.Preparer, receiver, key reflect.Value) (reflect.Value, bool)
- func (t *GoTemplateCallback) GetMethod(ctx context.Context, tmpl texttemplate.Preparer, receiver reflect.Value, ...) (method reflect.Value, firstArg reflect.Value)
- func (t *GoTemplateCallback) OnCalled(ctx context.Context, tmpl texttemplate.Preparer, name string, ...)
- type Lookup
- type Namespace
- type Parser
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AstTransformer ¶
type AstTransformer struct { // Holds name and source of template definitions not found during the first // AST transformation pass. TransformNotFound map[string]*valueobject.State }
type Context ¶
func ApplyTemplateTransformers ¶
func ApplyTemplateTransformers(t *valueobject.State, lookupFn func(name string) *valueobject.State) (*Context, error)
type Executor ¶
type Executor struct {
texttemplate.Executor
}
type GoTemplateCallback ¶
func (*GoTemplateCallback) BeforeExec ¶
func (t *GoTemplateCallback) BeforeExec(ctx context.Context, tmpl texttemplate.Preparer)
func (*GoTemplateCallback) GetMapValue ¶
func (t *GoTemplateCallback) GetMapValue(ctx context.Context, tmpl texttemplate.Preparer, receiver, key reflect.Value) (reflect.Value, bool)
type Namespace ¶
type Namespace struct {
*valueobject.StateMap
}
type Parser ¶
type Parser struct { PrototypeText *texttemplate.Template PrototypeHTML *htmltemplate.Template Ast *AstTransformer // contains filtered or unexported fields }
func (*Parser) Parse ¶
func (t *Parser) Parse(info valueobject.TemplateInfo) (*valueobject.State, error)
func (*Parser) ParseOverlap ¶
func (t *Parser) ParseOverlap(overlay, base valueobject.TemplateInfo) (*valueobject.State, bool, error)
type Template ¶
func (*Template) LoadTemplates ¶
func (*Template) LookupLayout ¶
func (*Template) PostTransform ¶
Click to show internal directories.
Click to hide internal directories.