Documentation ¶
Index ¶
- func ParseStatement(text string) (ast.Node, error)
- type CollectDefinitions
- type ExecutedStatement
- type LookupTemplateDefFunc
- type Template
- func (s *Template) CommandNodesIterator() (nodes []*ast.CommandNode)
- func (s *Template) Compile(d driver.Driver) (*Template, error)
- func (s *Template) GetHolesValuesSet() (values []string)
- func (s *Template) GetNormalizedAliases() map[string]string
- func (s *Template) GetNormalizedParams() map[string]interface{}
- func (s *Template) MergeParams(newParams map[string]interface{})
- func (s *Template) ResolveHoles(refs ...map[string]interface{}) (map[string]interface{}, error)
- func (s *Template) Run(d driver.Driver) (*Template, error)
- func (t *Template) Visit(v Visitor) error
- type TemplateDefinition
- type TemplateExecution
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectDefinitions ¶
type CollectDefinitions struct { C []TemplateDefinition L LookupTemplateDefFunc }
func (*CollectDefinitions) Visit ¶
func (t *CollectDefinitions) Visit(cmds []*ast.CommandNode) error
type ExecutedStatement ¶
type ExecutedStatement struct {
Line, Err, Result string
}
func (*ExecutedStatement) IsRevertible ¶
func (ex *ExecutedStatement) IsRevertible() bool
type LookupTemplateDefFunc ¶
type LookupTemplateDefFunc func(key string) (TemplateDefinition, bool)
type Template ¶
func (*Template) CommandNodesIterator ¶
func (s *Template) CommandNodesIterator() (nodes []*ast.CommandNode)
func (*Template) GetHolesValuesSet ¶
func (*Template) GetNormalizedAliases ¶
func (*Template) GetNormalizedParams ¶
func (*Template) MergeParams ¶
func (*Template) ResolveHoles ¶
type TemplateDefinition ¶
type TemplateDefinition struct {
Action, Entity, Api string
RequiredParams, ExtraParams, TagsMapping []string
}
func (TemplateDefinition) Extra ¶
func (def TemplateDefinition) Extra() []string
func (TemplateDefinition) Name ¶
func (def TemplateDefinition) Name() string
func (TemplateDefinition) Required ¶
func (def TemplateDefinition) Required() []string
func (TemplateDefinition) String ¶
func (def TemplateDefinition) String() string
type TemplateExecution ¶
type TemplateExecution struct { ID string Executed []*ExecutedStatement }
func NewTemplateExecution ¶
func NewTemplateExecution(tpl *Template) *TemplateExecution
func (*TemplateExecution) HasErrors ¶
func (te *TemplateExecution) HasErrors() (inError bool)
func (*TemplateExecution) IsRevertible ¶
func (te *TemplateExecution) IsRevertible() bool
func (*TemplateExecution) Revert ¶
func (te *TemplateExecution) Revert() (*Template, error)
type Visitor ¶
type Visitor interface {
Visit([]*ast.CommandNode) error
}
Click to show internal directories.
Click to hide internal directories.