Documentation ¶
Index ¶
- Constants
- type EvaluationCtx
- func (e EvaluationCtx) PrepareNode(parentNode template.EvaluationNode, node template.EvaluationNode) error
- func (e EvaluationCtx) Replace(parentNodes []template.EvaluationNode, val interface{}) error
- func (e EvaluationCtx) SetMapItemKey(node template.EvaluationNode, val interface{}) error
- func (e EvaluationCtx) ShouldWrapRootValue(nodeVal interface{}) bool
- func (e EvaluationCtx) WrapRootValue(val interface{}) interface{}
- type NodeCode
- type NodeCodeMeta
- type NodeRoot
- func (n *NodeRoot) AddValue(val interface{}) error
- func (n *NodeRoot) AsString() string
- func (n *NodeRoot) DeepCopyAsInterface() interface{}
- func (n *NodeRoot) GetAnnotations() interface{}
- func (n *NodeRoot) GetValues() []interface{}
- func (n *NodeRoot) ResetValue()
- func (n *NodeRoot) SetAnnotations(anns interface{})
- func (n *NodeRoot) SetValue(val interface{}) error
- type NodeText
- func (n *NodeText) AddValue(val interface{}) error
- func (n *NodeText) DeepCopyAsInterface() interface{}
- func (n *NodeText) GetAnnotations() interface{}
- func (n *NodeText) GetValues() []interface{}
- func (n *NodeText) ResetValue()
- func (n *NodeText) SetAnnotations(anns interface{})
- func (n *NodeText) SetValue(val interface{}) error
- type Parser
- type Template
Constants ¶
View Source
const (
EvaluationCtxDialectName template.EvaluationCtxDialectName = "text"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvaluationCtx ¶
type EvaluationCtx struct{}
func (EvaluationCtx) PrepareNode ¶
func (e EvaluationCtx) PrepareNode( parentNode template.EvaluationNode, node template.EvaluationNode) error
func (EvaluationCtx) Replace ¶
func (e EvaluationCtx) Replace( parentNodes []template.EvaluationNode, val interface{}) error
func (EvaluationCtx) SetMapItemKey ¶ added in v0.17.0
func (e EvaluationCtx) SetMapItemKey(node template.EvaluationNode, val interface{}) error
func (EvaluationCtx) ShouldWrapRootValue ¶
func (e EvaluationCtx) ShouldWrapRootValue(nodeVal interface{}) bool
func (EvaluationCtx) WrapRootValue ¶
func (e EvaluationCtx) WrapRootValue(val interface{}) interface{}
type NodeCodeMeta ¶
type NodeCodeMeta struct {
*NodeCode
}
func (NodeCodeMeta) Code ¶
func (p NodeCodeMeta) Code() string
func (NodeCodeMeta) ShoudTrimSpaceLeft ¶
func (p NodeCodeMeta) ShoudTrimSpaceLeft() bool
func (NodeCodeMeta) ShouldPrint ¶
func (p NodeCodeMeta) ShouldPrint() bool
func (NodeCodeMeta) ShouldTrimSpaceRight ¶
func (p NodeCodeMeta) ShouldTrimSpaceRight() bool
type NodeRoot ¶
type NodeRoot struct { Items []interface{} // contains filtered or unexported fields }
func (*NodeRoot) DeepCopyAsInterface ¶
func (n *NodeRoot) DeepCopyAsInterface() interface{}
func (*NodeRoot) GetAnnotations ¶
func (n *NodeRoot) GetAnnotations() interface{}
func (*NodeRoot) ResetValue ¶
func (n *NodeRoot) ResetValue()
func (*NodeRoot) SetAnnotations ¶
func (n *NodeRoot) SetAnnotations(anns interface{})
type NodeText ¶
type NodeText struct { Position *filepos.Position Content string // contains filtered or unexported fields }
func (*NodeText) DeepCopyAsInterface ¶
func (n *NodeText) DeepCopyAsInterface() interface{}
func (*NodeText) GetAnnotations ¶
func (n *NodeText) GetAnnotations() interface{}
func (*NodeText) ResetValue ¶
func (n *NodeText) ResetValue()
func (*NodeText) SetAnnotations ¶
func (n *NodeText) SetAnnotations(anns interface{})
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func NewTemplate ¶
func (*Template) Compile ¶
func (e *Template) Compile(rootNode *NodeRoot) (*template.CompiledTemplate, error)
func (*Template) CompileInline ¶
func (e *Template) CompileInline(rootNode *NodeRoot, instructions *template.InstructionSet, nodes *template.Nodes) ([]template.TemplateLine, error)
Click to show internal directories.
Click to hide internal directories.