Documentation ¶
Index ¶
- Variables
- func CollectUniqueHoles(tree Node) map[HoleNode][]string
- func IsInvalidAction(s string) bool
- func IsInvalidEntity(s string) bool
- func ProcessAliases(tree Node, ...)
- func ProcessHoles(tree Node, fillers map[string]interface{}) map[string]interface{}
- func ProcessRefs(tree Node, fillers map[string]interface{})
- func Quote(str string) string
- func RemoveOptionalHoles(tree Node)
- func VerifyRefs(tree Node) error
- type AST
- type Action
- type AliasNode
- type Command
- type CommandNode
- func (c *CommandNode) Err() error
- func (c *CommandNode) Keys() (keys []string)
- func (c *CommandNode) ProcessRefs(refs map[string]interface{})
- func (c *CommandNode) Result() interface{}
- func (c *CommandNode) String() string
- func (c *CommandNode) ToDriverParams() map[string]interface{}
- func (c *CommandNode) ToFillerParams() map[string]interface{}
- type ConcatenationNode
- type DeclarationNode
- type Entity
- type ExpressionNode
- type HoleNode
- type InterfaceNode
- type ListNode
- type Node
- type Peg
- func (t *Peg) AST() *node32
- func (t *Peg) Add(rule pegRule, begin, end, index uint32)
- func (p *Peg) Execute()
- func (p *Peg) Init()
- func (p *Peg) Parse(rule ...int) error
- func (t *Peg) PrettyPrintSyntaxTree(buffer string)
- func (t *Peg) Print()
- func (p *Peg) PrintSyntaxTree()
- func (p *Peg) Reset()
- func (t *Peg) Tokens() []token32
- func (t *Peg) Trim(length uint32)
- type RefNode
- type RightExpressionNode
- type Statement
Constants ¶
This section is empty.
Variables ¶
View Source
var SimpleStringValue = regexp.MustCompile("^[a-zA-Z0-9-._:/+;~@<>*]+$")
SimpleStringValue checks if a value is a string containing only basic symbols. in sync with [a-zA-Z0-9-._:/+;~@<>]+ in PEG (with ^ and $ around)
Functions ¶
func CollectUniqueHoles ¶
func IsInvalidAction ¶
func IsInvalidEntity ¶
func ProcessAliases ¶
func ProcessHoles ¶
func ProcessRefs ¶
func RemoveOptionalHoles ¶
func RemoveOptionalHoles(tree Node)
func VerifyRefs ¶
Types ¶
type AST ¶
type AST struct { Statements []*Statement // contains filtered or unexported fields }
func (*AST) NewStatement ¶
func (a *AST) NewStatement()
func (*AST) StatementDone ¶
func (a *AST) StatementDone()
type Action ¶
type Action string
const ( UnknownAction Action = "unknown" NoneAction Action = "none" Create Action = "create" Delete Action = "delete" Update Action = "update" Check Action = "check" Start Action = "start" Restart Action = "restart" Stop Action = "stop" Attach Action = "attach" Detach Action = "detach" Copy Action = "copy" Import Action = "import" Authenticate Action = "authenticate" )
type AliasNode ¶
type AliasNode struct {
// contains filtered or unexported fields
}
func CollectAliases ¶
func NewAliasNode ¶
type CommandNode ¶
type CommandNode struct { Command CmdResult interface{} CmdErr error Action, Entity string ParamNodes map[string]interface{} Refs map[string]interface{} }
func (*CommandNode) Err ¶
func (c *CommandNode) Err() error
func (*CommandNode) Keys ¶
func (c *CommandNode) Keys() (keys []string)
func (*CommandNode) ProcessRefs ¶
func (c *CommandNode) ProcessRefs(refs map[string]interface{})
func (*CommandNode) Result ¶
func (c *CommandNode) Result() interface{}
func (*CommandNode) String ¶
func (c *CommandNode) String() string
func (*CommandNode) ToDriverParams ¶
func (c *CommandNode) ToDriverParams() map[string]interface{}
func (*CommandNode) ToFillerParams ¶
func (c *CommandNode) ToFillerParams() map[string]interface{}
type ConcatenationNode ¶
type ConcatenationNode struct {
// contains filtered or unexported fields
}
func NewConcatenationNode ¶
func NewConcatenationNode(arr []interface{}) ConcatenationNode
func (ConcatenationNode) Concat ¶
func (n ConcatenationNode) Concat() string
func (ConcatenationNode) String ¶
func (n ConcatenationNode) String() string
type DeclarationNode ¶
type DeclarationNode struct { Ident string Expr ExpressionNode }
func (*DeclarationNode) String ¶
func (n *DeclarationNode) String() string
type ExpressionNode ¶
type HoleNode ¶
type HoleNode struct {
// contains filtered or unexported fields
}
func CollectHoles ¶
func NewHoleNode ¶
func NewOptionalHoleNode ¶
func (HoleNode) IsOptional ¶
type InterfaceNode ¶
type InterfaceNode struct {
// contains filtered or unexported fields
}
func (InterfaceNode) String ¶
func (n InterfaceNode) String() string
func (InterfaceNode) Value ¶
func (n InterfaceNode) Value() interface{}
type ListNode ¶
type ListNode struct {
// contains filtered or unexported fields
}
func NewListNode ¶
func NewListNode(arr []interface{}) ListNode
type Peg ¶
func (*Peg) PrettyPrintSyntaxTree ¶
func (t *Peg) PrettyPrintSyntaxTree(buffer string)
func (*Peg) PrintSyntaxTree ¶
func (p *Peg) PrintSyntaxTree()
type RightExpressionNode ¶
type RightExpressionNode struct {
// contains filtered or unexported fields
}
func (*RightExpressionNode) Err ¶
func (n *RightExpressionNode) Err() error
func (*RightExpressionNode) Node ¶
func (n *RightExpressionNode) Node() interface{}
func (*RightExpressionNode) Result ¶
func (n *RightExpressionNode) Result() interface{}
func (*RightExpressionNode) String ¶
func (n *RightExpressionNode) String() string
Click to show internal directories.
Click to hide internal directories.