Documentation ¶
Index ¶
- Variables
- func IsInvalidAction(s string) bool
- func IsInvalidEntity(s string) bool
- type AST
- type Action
- type CommandNode
- func (c *CommandNode) Err() error
- func (c *CommandNode) GetHoles() (holes []string)
- func (c *CommandNode) GetRefs() (refs []string)
- func (c *CommandNode) IsRef(key string) bool
- func (c *CommandNode) Keys() (keys []string)
- func (c *CommandNode) ProcessHoles(fills map[string]interface{}) map[string]interface{}
- func (c *CommandNode) ProcessRefs(refs map[string]interface{})
- func (c *CommandNode) ReplaceRef(key string, value CompositeValue)
- 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 CompositeValue
- type DeclarationNode
- type Entity
- type ExpressionNode
- 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 Statement
- type ValueNode
- func (n *ValueNode) Err() error
- func (n *ValueNode) GetHoles() []string
- func (n *ValueNode) GetRefs() (refs []string)
- func (n *ValueNode) IsRef(key string) bool
- func (n *ValueNode) IsResolved() bool
- func (n *ValueNode) ProcessHoles(fills map[string]interface{}) map[string]interface{}
- func (n *ValueNode) ProcessRefs(refs map[string]interface{})
- func (n *ValueNode) ReplaceRef(key string, value CompositeValue)
- func (n *ValueNode) Result() interface{}
- func (n *ValueNode) String() string
- type WithAlias
- type WithHoles
- type WithRefs
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 IsInvalidAction ¶
func IsInvalidEntity ¶
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" Stop Action = "stop" Attach Action = "attach" Detach Action = "detach" Copy Action = "copy" Import Action = "import" Authenticate Action = "authenticate" )
type CommandNode ¶
type CommandNode struct { CmdResult interface{} CmdErr error Action, Entity string Params map[string]CompositeValue }
func (*CommandNode) Err ¶
func (c *CommandNode) Err() error
func (*CommandNode) GetHoles ¶ added in v0.0.24
func (c *CommandNode) GetHoles() (holes []string)
func (*CommandNode) GetRefs ¶ added in v0.1.3
func (c *CommandNode) GetRefs() (refs []string)
func (*CommandNode) IsRef ¶ added in v0.1.3
func (c *CommandNode) IsRef(key string) bool
func (*CommandNode) Keys ¶
func (c *CommandNode) Keys() (keys []string)
func (*CommandNode) ProcessHoles ¶
func (c *CommandNode) ProcessHoles(fills map[string]interface{}) map[string]interface{}
func (*CommandNode) ProcessRefs ¶
func (c *CommandNode) ProcessRefs(refs map[string]interface{})
func (*CommandNode) ReplaceRef ¶ added in v0.1.3
func (c *CommandNode) ReplaceRef(key string, value CompositeValue)
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 CompositeValue ¶ added in v0.1.3
type CompositeValue interface { String() string Value() interface{} Clone() CompositeValue }
func NewAliasValue ¶ added in v0.1.3
func NewAliasValue(alias string) CompositeValue
func NewHoleValue ¶ added in v0.1.3
func NewHoleValue(hole string) CompositeValue
func NewInterfaceValue ¶ added in v0.1.3
func NewInterfaceValue(i interface{}) CompositeValue
type DeclarationNode ¶
type DeclarationNode struct { Ident string Expr ExpressionNode }
func (*DeclarationNode) String ¶
func (n *DeclarationNode) String() string
type ExpressionNode ¶
type Peg ¶
func (*Peg) PrettyPrintSyntaxTree ¶
func (t *Peg) PrettyPrintSyntaxTree(buffer string)
func (*Peg) PrintSyntaxTree ¶
func (p *Peg) PrintSyntaxTree()
type ValueNode ¶ added in v0.0.24
type ValueNode struct {
Value CompositeValue
}
func (*ValueNode) IsResolved ¶ added in v0.0.24
func (*ValueNode) ProcessHoles ¶ added in v0.0.24
func (*ValueNode) ProcessRefs ¶ added in v0.1.3
func (*ValueNode) ReplaceRef ¶ added in v0.1.3
func (n *ValueNode) ReplaceRef(key string, value CompositeValue)
Click to show internal directories.
Click to hide internal directories.