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-._:/+;~@<>*]+$") // in sync with [a-zA-Z0-9-._:/+;~@<>]+ in PEG (with ^ and $ around)
Functions ¶
func CollectUniqueHoles ¶ added in v0.1.10
func IsInvalidAction ¶
func IsInvalidEntity ¶
func ProcessAliases ¶ added in v0.1.10
func ProcessHoles ¶ added in v0.1.10
func ProcessRefs ¶ added in v0.1.10
func RemoveOptionalHoles ¶ added in v0.1.10
func RemoveOptionalHoles(tree Node)
func VerifyRefs ¶ added in v0.1.10
Types ¶
type AST ¶
type AST struct { Statements []*Statement // contains filtered or unexported fields }
func (*AST) NewStatement ¶ added in v0.1.3
func (a *AST) NewStatement()
func (*AST) StatementDone ¶ added in v0.1.3
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 ¶ added in v0.1.10
type AliasNode struct {
// contains filtered or unexported fields
}
func CollectAliases ¶ added in v0.1.10
func NewAliasNode ¶ added in v0.1.10
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 ¶ added in v0.1.3
func (c *CommandNode) ToDriverParams() map[string]interface{}
func (*CommandNode) ToFillerParams ¶ added in v0.1.3
func (c *CommandNode) ToFillerParams() map[string]interface{}
type ConcatenationNode ¶ added in v0.1.10
type ConcatenationNode struct {
// contains filtered or unexported fields
}
func NewConcatenationNode ¶ added in v0.1.10
func NewConcatenationNode(arr []interface{}) ConcatenationNode
func (ConcatenationNode) Concat ¶ added in v0.1.10
func (n ConcatenationNode) Concat() string
func (ConcatenationNode) String ¶ added in v0.1.10
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 ¶ added in v0.1.10
type HoleNode struct {
// contains filtered or unexported fields
}
func CollectHoles ¶ added in v0.1.10
func NewHoleNode ¶ added in v0.1.10
func NewOptionalHoleNode ¶ added in v0.1.10
func (HoleNode) IsOptional ¶ added in v0.1.10
type InterfaceNode ¶ added in v0.1.10
type InterfaceNode struct {
// contains filtered or unexported fields
}
func (InterfaceNode) String ¶ added in v0.1.10
func (n InterfaceNode) String() string
func (InterfaceNode) Value ¶ added in v0.1.10
func (n InterfaceNode) Value() interface{}
type ListNode ¶ added in v0.1.10
type ListNode struct {
// contains filtered or unexported fields
}
func NewListNode ¶ added in v0.1.10
func NewListNode(arr []interface{}) ListNode
type Peg ¶
func (*Peg) PrettyPrintSyntaxTree ¶
func (t *Peg) PrettyPrintSyntaxTree(buffer string)
func (*Peg) PrintSyntaxTree ¶
func (p *Peg) PrintSyntaxTree()
type RefNode ¶ added in v0.1.10
type RefNode struct {
// contains filtered or unexported fields
}
func NewRefNode ¶ added in v0.1.10
type RightExpressionNode ¶ added in v0.1.10
type RightExpressionNode struct {
// contains filtered or unexported fields
}
func (*RightExpressionNode) Err ¶ added in v0.1.10
func (n *RightExpressionNode) Err() error
func (*RightExpressionNode) Node ¶ added in v0.1.10
func (n *RightExpressionNode) Node() interface{}
func (*RightExpressionNode) Result ¶ added in v0.1.10
func (n *RightExpressionNode) Result() interface{}
func (*RightExpressionNode) String ¶ added in v0.1.10
func (n *RightExpressionNode) String() string
Click to show internal directories.
Click to hide internal directories.