Documentation ¶
Index ¶
- Constants
- func NewDummyProcessor() *dummyProcessor
- type Argument
- type BaseProcessor
- type FilterInstance
- type GoArgProcessor
- type GoCallProcessor
- type GoCallbackProcessor
- type GoCaseProcessor
- type GoCommentProcessor
- type GoContentProcessor
- type GoDefaultProcessor
- type GoDocTypeProcessor
- type GoForProcessor
- type GoHeadProcessor
- type GoIfProcessor
- type GoReplaceableProcessor
- type GoSettingsProcessor
- type GoSwitchProcessor
- type GoTagProcessor
- type GoTextProcessor
- type GoVarProcessor
- type Processor
- type ProcessorCallbackFunc
- type RegisteredFilter
- type Replacement
- type SelectorInstance
- type TagContext
- type VarDef
Constants ¶
View Source
const ( DOCTYPE = "<!DOCTYPE %s" PUBLIC = "public" SYSTEM = "system" )
Variables ¶
This section is empty.
Functions ¶
func NewDummyProcessor ¶
func NewDummyProcessor() *dummyProcessor
Types ¶
type Argument ¶
* There are three different places a go:arg can appear: * - A template definition * <div go:template="<template name>" go:arg="<name>[pb]: <type> [= expression]"></div> * - A replaceable definition * <div go:replaceable="<replaceable name>" go:arg="<name>[pb]: <expression>"></div> * - A template call * <div go:call="#<template name>" go:arg="<name>[pb]: <expression>"></div>
func NewArgCall ¶
func ParseArgCalls ¶
func ParseArgDefs ¶
type BaseProcessor ¶
type BaseProcessor struct {
// contains filtered or unexported fields
}
func (*BaseProcessor) GetNext ¶
func (b *BaseProcessor) GetNext() Processor
func (*BaseProcessor) HasNext ¶
func (b *BaseProcessor) HasNext() bool
func (*BaseProcessor) SetNext ¶
func (b *BaseProcessor) SetNext(next Processor)
type FilterInstance ¶
type GoArgProcessor ¶
type GoArgProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewArgProcessor ¶
func NewArgProcessor(args []*Argument) *GoArgProcessor
func (*GoArgProcessor) Process ¶
func (a *GoArgProcessor) Process(writer io.Writer, ctx *TagContext)
type GoCallProcessor ¶
type GoCallProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewCallProcessor ¶
func NewCallProcessor(pkgPath, relPkgPath, closurePkgPrefix, closurePkgName, templateName string, args []*Argument, replacements []*Replacement, callerAttrs []html.Attribute) *GoCallProcessor
func (*GoCallProcessor) Process ¶
func (c *GoCallProcessor) Process(writer io.Writer, ctx *TagContext)
type GoCallbackProcessor ¶
type GoCallbackProcessor struct { BaseProcessor // contains filtered or unexported fields }
* Callback processor gives a chance to execute a special processing when * the processing chain reaches its end but before the call stack starts to * go back.
func NewCallbackProcessor ¶
func NewCallbackProcessor(callback ProcessorCallbackFunc) *GoCallbackProcessor
func (*GoCallbackProcessor) Process ¶
func (c *GoCallbackProcessor) Process(writer io.Writer, context *TagContext)
type GoCaseProcessor ¶
type GoCaseProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewCaseProcessor ¶
func NewCaseProcessor(expression string) *GoCaseProcessor
func (*GoCaseProcessor) Process ¶
func (gcp *GoCaseProcessor) Process(writer io.Writer, ctx *TagContext)
type GoCommentProcessor ¶
type GoCommentProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewCommentProcessor ¶
func NewCommentProcessor(comment string) *GoCommentProcessor
func (*GoCommentProcessor) Process ¶
func (c *GoCommentProcessor) Process(writer io.Writer, ctx *TagContext)
type GoContentProcessor ¶
type GoContentProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewContentProcessor ¶
func NewContentProcessor(expression string) *GoContentProcessor
func (*GoContentProcessor) Process ¶
func (c *GoContentProcessor) Process(writer io.Writer, ctx *TagContext)
type GoDefaultProcessor ¶
type GoDefaultProcessor struct {
BaseProcessor
}
func NewDefaultProcessor ¶
func NewDefaultProcessor() *GoDefaultProcessor
func (*GoDefaultProcessor) Process ¶
func (s *GoDefaultProcessor) Process(writer io.Writer, ctx *TagContext)
type GoDocTypeProcessor ¶
type GoDocTypeProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewDocTypeProcessor ¶
func NewDocTypeProcessor(name string, attrs []html.Attribute) *GoDocTypeProcessor
func (*GoDocTypeProcessor) Process ¶
func (d *GoDocTypeProcessor) Process(writer io.Writer, ctx *TagContext)
type GoForProcessor ¶
type GoForProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewForProcessor ¶
func NewForProcessor(forLine string) *GoForProcessor
func (*GoForProcessor) Process ¶
func (f *GoForProcessor) Process(writer io.Writer, ctx *TagContext)
type GoHeadProcessor ¶
type GoHeadProcessor struct {
BaseProcessor
}
func NewHeadProcessor ¶
func NewHeadProcessor() *GoHeadProcessor
func (*GoHeadProcessor) Process ¶
func (gheadp *GoHeadProcessor) Process(writer io.Writer, ctx *TagContext)
type GoIfProcessor ¶
type GoIfProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewIfProcessor ¶
func NewIfProcessor(conditional string) *GoIfProcessor
func (*GoIfProcessor) Process ¶
func (i *GoIfProcessor) Process(writer io.Writer, ctx *TagContext)
type GoReplaceableProcessor ¶
type GoReplaceableProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewReplaceableProcessor ¶
func NewReplaceableProcessor(tmplName string, slotName string, args []*Argument) *GoReplaceableProcessor
func (*GoReplaceableProcessor) Process ¶
func (r *GoReplaceableProcessor) Process(writer io.Writer, ctx *TagContext)
type GoSettingsProcessor ¶
type GoSettingsProcessor struct { BaseProcessor Name string }
func NewSettingsProcessor ¶
func NewSettingsProcessor(name string) *GoSettingsProcessor
func (*GoSettingsProcessor) Process ¶
func (s *GoSettingsProcessor) Process(writer io.Writer, ctx *TagContext)
type GoSwitchProcessor ¶
type GoSwitchProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewSwitchProcessor ¶
func NewSwitchProcessor(expression string) *GoSwitchProcessor
func (*GoSwitchProcessor) Process ¶
func (s *GoSwitchProcessor) Process(writer io.Writer, ctx *TagContext)
type GoTagProcessor ¶
type GoTagProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewTagProcessor ¶
func (*GoTagProcessor) AddChild ¶
func (t *GoTagProcessor) AddChild(child Processor)
func (*GoTagProcessor) Process ¶
func (t *GoTagProcessor) Process(writer io.Writer, ctx *TagContext)
type GoTextProcessor ¶
type GoTextProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewTextProcessor ¶
func NewTextProcessor(text string) *GoTextProcessor
func (*GoTextProcessor) Process ¶
func (i *GoTextProcessor) Process(writer io.Writer, ctx *TagContext)
type GoVarProcessor ¶
type GoVarProcessor struct { BaseProcessor // contains filtered or unexported fields }
func NewVarProcessor ¶
func NewVarProcessor(varDef string) *GoVarProcessor
func NewVarsProcessor ¶
func NewVarsProcessor(varStrs string) *GoVarProcessor
func (*GoVarProcessor) Process ¶
func (gvp *GoVarProcessor) Process(writer io.Writer, ctx *TagContext)
type ProcessorCallbackFunc ¶
type ProcessorCallbackFunc func()
type RegisteredFilter ¶
type Replacement ¶
type SelectorInstance ¶
type TagContext ¶
type TagContext struct { ExprParser *expl.ExprParser AutoEscape bool OutputFormat string // contains filtered or unexported fields }
func NewTagContext ¶
func NewTagContext(pkgMgr *pkgmgr.PkgManager, pkgRefs pkgmgr.AliasReferer, outputFormat string) *TagContext
func (*TagContext) GetFilters ¶
func (ctx *TagContext) GetFilters() map[string]*RegisteredFilter
func (*TagContext) MaybeAddImports ¶
func (ctx *TagContext) MaybeAddImports(expression string)
func (*TagContext) NextId ¶
func (ctx *TagContext) NextId() int
func (*TagContext) RewriteExpression ¶
func (ctx *TagContext) RewriteExpression(originalExpr string) (string, error)
Click to show internal directories.
Click to hide internal directories.