Documentation
¶
Index ¶
- Variables
- func SliceToMetadata(s ...interface{}) (graph.Metadata, error)
- type BetweenMetadataMatcher
- type GTEMetadataMatcher
- type GTMetadataMatcher
- type GraphTraversal
- type GraphTraversalE
- func (te *GraphTraversalE) Count(s ...interface{}) *GraphTraversalValue
- func (te *GraphTraversalE) Dedup() *GraphTraversalE
- func (te *GraphTraversalE) Error() error
- func (te *GraphTraversalE) Has(s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) InV(s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) MarshalJSON() ([]byte, error)
- func (te *GraphTraversalE) OutV(s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) Values() []interface{}
- type GraphTraversalShortestPath
- type GraphTraversalStep
- type GraphTraversalV
- func (tv *GraphTraversalV) Both(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) Count(s ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Dedup() *GraphTraversalV
- func (tv *GraphTraversalV) Error() error
- func (tv *GraphTraversalV) Has(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) In(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) InE(s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) MarshalJSON() ([]byte, error)
- func (tv *GraphTraversalV) Out(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) OutE(s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) ShortestPathTo(m graph.Metadata, e ...graph.Metadata) *GraphTraversalShortestPath
- func (tv *GraphTraversalV) Values() []interface{}
- type GraphTraversalValue
- type GremlinTraversalExtension
- type GremlinTraversalParser
- type GremlinTraversalScanner
- type GremlinTraversalSequence
- type GremlinTraversalStep
- type GremlinTraversalStepBoth
- type GremlinTraversalStepContext
- type GremlinTraversalStepCount
- type GremlinTraversalStepDedup
- type GremlinTraversalStepE
- type GremlinTraversalStepG
- type GremlinTraversalStepHas
- type GremlinTraversalStepIn
- type GremlinTraversalStepInE
- type GremlinTraversalStepInV
- type GremlinTraversalStepOut
- type GremlinTraversalStepOutE
- type GremlinTraversalStepOutV
- type GremlinTraversalStepParams
- type GremlinTraversalStepShortestPathTo
- type GremlinTraversalStepV
- type InsideMetadataMatcher
- type LTEMetadataMatcher
- type LTMetadataMatcher
- type NEMetadataMatcher
- type OutsideMetadataMatcher
- type RegexMetadataMatcher
- type Token
- type WithinMetadataMatcher
- type WithoutMetadataMatcher
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type BetweenMetadataMatcher ¶
type BetweenMetadataMatcher struct {
// contains filtered or unexported fields
}
func Between ¶
func Between(from interface{}, to interface{}) *BetweenMetadataMatcher
func (*BetweenMetadataMatcher) Match ¶
func (b *BetweenMetadataMatcher) Match(v interface{}) bool
func (*BetweenMetadataMatcher) Value ¶
func (b *BetweenMetadataMatcher) Value() (interface{}, interface{})
type GTEMetadataMatcher ¶
type GTEMetadataMatcher struct {
// contains filtered or unexported fields
}
func Gte ¶
func Gte(s interface{}) *GTEMetadataMatcher
func (*GTEMetadataMatcher) Match ¶
func (gte *GTEMetadataMatcher) Match(v interface{}) bool
func (*GTEMetadataMatcher) Value ¶
func (gte *GTEMetadataMatcher) Value() interface{}
type GTMetadataMatcher ¶
type GTMetadataMatcher struct {
// contains filtered or unexported fields
}
func Gt ¶
func Gt(s interface{}) *GTMetadataMatcher
func (*GTMetadataMatcher) Match ¶
func (gt *GTMetadataMatcher) Match(v interface{}) bool
func (*GTMetadataMatcher) Value ¶
func (gt *GTMetadataMatcher) Value() interface{}
type GraphTraversal ¶
func NewGraphTraversal ¶
func NewGraphTraversal(g *graph.Graph) *GraphTraversal
func (*GraphTraversal) Context ¶
func (t *GraphTraversal) Context(s ...interface{}) *GraphTraversal
func (*GraphTraversal) Error ¶
func (t *GraphTraversal) Error() error
func (*GraphTraversal) MarshalJSON ¶
func (t *GraphTraversal) MarshalJSON() ([]byte, error)
func (*GraphTraversal) V ¶
func (t *GraphTraversal) V(ids ...graph.Identifier) *GraphTraversalV
func (*GraphTraversal) Values ¶
func (t *GraphTraversal) Values() []interface{}
type GraphTraversalE ¶
type GraphTraversalE struct {
GraphTraversal *GraphTraversal
// contains filtered or unexported fields
}
func (*GraphTraversalE) Count ¶
func (te *GraphTraversalE) Count(s ...interface{}) *GraphTraversalValue
func (*GraphTraversalE) Dedup ¶
func (te *GraphTraversalE) Dedup() *GraphTraversalE
func (*GraphTraversalE) Error ¶
func (te *GraphTraversalE) Error() error
func (*GraphTraversalE) Has ¶
func (te *GraphTraversalE) Has(s ...interface{}) *GraphTraversalE
func (*GraphTraversalE) InV ¶
func (te *GraphTraversalE) InV(s ...interface{}) *GraphTraversalV
func (*GraphTraversalE) MarshalJSON ¶
func (te *GraphTraversalE) MarshalJSON() ([]byte, error)
func (*GraphTraversalE) OutV ¶
func (te *GraphTraversalE) OutV(s ...interface{}) *GraphTraversalV
func (*GraphTraversalE) Values ¶
func (te *GraphTraversalE) Values() []interface{}
type GraphTraversalShortestPath ¶
type GraphTraversalShortestPath struct {
GraphTraversal *GraphTraversal
// contains filtered or unexported fields
}
func (*GraphTraversalShortestPath) Error ¶
func (sp *GraphTraversalShortestPath) Error() error
func (*GraphTraversalShortestPath) MarshalJSON ¶
func (sp *GraphTraversalShortestPath) MarshalJSON() ([]byte, error)
func (*GraphTraversalShortestPath) Values ¶
func (sp *GraphTraversalShortestPath) Values() []interface{}
type GraphTraversalStep ¶
type GraphTraversalV ¶
type GraphTraversalV struct {
GraphTraversal *GraphTraversal
// contains filtered or unexported fields
}
func NewGraphTraversalV ¶
func NewGraphTraversalV(gt *GraphTraversal, nodes []*graph.Node, err ...error) *GraphTraversalV
func (*GraphTraversalV) Both ¶
func (tv *GraphTraversalV) Both(s ...interface{}) *GraphTraversalV
func (*GraphTraversalV) Count ¶
func (tv *GraphTraversalV) Count(s ...interface{}) *GraphTraversalValue
func (*GraphTraversalV) Dedup ¶
func (tv *GraphTraversalV) Dedup() *GraphTraversalV
func (*GraphTraversalV) Error ¶
func (tv *GraphTraversalV) Error() error
func (*GraphTraversalV) Has ¶
func (tv *GraphTraversalV) Has(s ...interface{}) *GraphTraversalV
func (*GraphTraversalV) In ¶
func (tv *GraphTraversalV) In(s ...interface{}) *GraphTraversalV
func (*GraphTraversalV) InE ¶
func (tv *GraphTraversalV) InE(s ...interface{}) *GraphTraversalE
func (*GraphTraversalV) MarshalJSON ¶
func (tv *GraphTraversalV) MarshalJSON() ([]byte, error)
func (*GraphTraversalV) Out ¶
func (tv *GraphTraversalV) Out(s ...interface{}) *GraphTraversalV
func (*GraphTraversalV) OutE ¶
func (tv *GraphTraversalV) OutE(s ...interface{}) *GraphTraversalE
func (*GraphTraversalV) ShortestPathTo ¶
func (tv *GraphTraversalV) ShortestPathTo(m graph.Metadata, e ...graph.Metadata) *GraphTraversalShortestPath
func (*GraphTraversalV) Values ¶
func (tv *GraphTraversalV) Values() []interface{}
type GraphTraversalValue ¶
type GraphTraversalValue struct {
GraphTraversal *GraphTraversal
// contains filtered or unexported fields
}
func NewGraphTraversalValue ¶
func NewGraphTraversalValue(gt *GraphTraversal, value interface{}, err ...error) *GraphTraversalValue
func (*GraphTraversalValue) Error ¶
func (t *GraphTraversalValue) Error() error
func (*GraphTraversalValue) MarshalJSON ¶
func (t *GraphTraversalValue) MarshalJSON() ([]byte, error)
func (*GraphTraversalValue) Values ¶
func (t *GraphTraversalValue) Values() []interface{}
type GremlinTraversalExtension ¶
type GremlinTraversalExtension interface {
ScanIdent(s string) (Token, bool)
ParseStep(t Token, p GremlinTraversalStepParams) (GremlinTraversalStep, error)
}
type GremlinTraversalParser ¶
type GremlinTraversalParser struct {
Graph *graph.Graph
Reader io.Reader
// contains filtered or unexported fields
}
func NewGremlinTraversalParser ¶
func NewGremlinTraversalParser(r io.Reader, g *graph.Graph) *GremlinTraversalParser
func (*GremlinTraversalParser) AddTraversalExtension ¶
func (p *GremlinTraversalParser) AddTraversalExtension(e GremlinTraversalExtension)
func (*GremlinTraversalParser) Parse ¶
func (p *GremlinTraversalParser) Parse() (*GremlinTraversalSequence, error)
type GremlinTraversalScanner ¶
type GremlinTraversalScanner struct {
// contains filtered or unexported fields
}
func NewGremlinTraversalScanner ¶
func NewGremlinTraversalScanner(r io.Reader, e []GremlinTraversalExtension) *GremlinTraversalScanner
func (*GremlinTraversalScanner) Scan ¶
func (s *GremlinTraversalScanner) Scan() (tok Token, lit string)
type GremlinTraversalSequence ¶
type GremlinTraversalSequence struct {
GraphTraversal *GraphTraversal
// contains filtered or unexported fields
}
func (*GremlinTraversalSequence) Exec ¶
func (s *GremlinTraversalSequence) Exec() (GraphTraversalStep, error)
type GremlinTraversalStep ¶
type GremlinTraversalStep interface {
Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Reduce(previous GremlinTraversalStep) GremlinTraversalStep
Params() []interface{}
}
type GremlinTraversalStepBoth ¶
type GremlinTraversalStepBoth struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepBoth) Exec ¶
func (s *GremlinTraversalStepBoth) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepBoth) Reduce ¶
func (s *GremlinTraversalStepBoth) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepContext ¶
type GremlinTraversalStepContext struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepContext) Exec ¶
func (s *GremlinTraversalStepContext) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepContext) Reduce ¶
func (s *GremlinTraversalStepContext) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepCount ¶
type GremlinTraversalStepCount struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepCount) Exec ¶
func (s *GremlinTraversalStepCount) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepCount) Reduce ¶
func (s *GremlinTraversalStepCount) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepDedup ¶
type GremlinTraversalStepDedup struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepDedup) Exec ¶
func (s *GremlinTraversalStepDedup) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepDedup) Reduce ¶
func (s *GremlinTraversalStepDedup) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepE ¶
type GremlinTraversalStepE struct {
GremlinTraversalStepParams
}
type GremlinTraversalStepG ¶
type GremlinTraversalStepG struct {
GremlinTraversalStepParams
}
built in steps
func (*GremlinTraversalStepG) Exec ¶
func (s *GremlinTraversalStepG) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepG) Reduce ¶
func (s *GremlinTraversalStepG) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepHas ¶
type GremlinTraversalStepHas struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepHas) Exec ¶
func (s *GremlinTraversalStepHas) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepHas) Reduce ¶
func (s *GremlinTraversalStepHas) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepIn ¶
type GremlinTraversalStepIn struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepIn) Exec ¶
func (s *GremlinTraversalStepIn) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepIn) Reduce ¶
func (s *GremlinTraversalStepIn) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepInE ¶
type GremlinTraversalStepInE struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepInE) Exec ¶
func (s *GremlinTraversalStepInE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepInE) Reduce ¶
func (s *GremlinTraversalStepInE) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepInV ¶
type GremlinTraversalStepInV struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepInV) Exec ¶
func (s *GremlinTraversalStepInV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepInV) Reduce ¶
func (s *GremlinTraversalStepInV) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepOut ¶
type GremlinTraversalStepOut struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepOut) Exec ¶
func (s *GremlinTraversalStepOut) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepOut) Reduce ¶
func (s *GremlinTraversalStepOut) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepOutE ¶
type GremlinTraversalStepOutE struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepOutE) Exec ¶
func (s *GremlinTraversalStepOutE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepOutE) Reduce ¶
func (s *GremlinTraversalStepOutE) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepOutV ¶
type GremlinTraversalStepOutV struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepOutV) Exec ¶
func (s *GremlinTraversalStepOutV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepOutV) Reduce ¶
func (s *GremlinTraversalStepOutV) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepParams ¶
type GremlinTraversalStepParams struct {
// contains filtered or unexported fields
}
func (*GremlinTraversalStepParams) Params ¶
func (p *GremlinTraversalStepParams) Params() []interface{}
type GremlinTraversalStepShortestPathTo ¶
type GremlinTraversalStepShortestPathTo struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepShortestPathTo) Exec ¶
func (s *GremlinTraversalStepShortestPathTo) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepShortestPathTo) Reduce ¶
func (s *GremlinTraversalStepShortestPathTo) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type GremlinTraversalStepV ¶
type GremlinTraversalStepV struct {
GremlinTraversalStepParams
}
func (*GremlinTraversalStepV) Exec ¶
func (s *GremlinTraversalStepV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
func (*GremlinTraversalStepV) Reduce ¶
func (s *GremlinTraversalStepV) Reduce(next GremlinTraversalStep) GremlinTraversalStep
type InsideMetadataMatcher ¶
type InsideMetadataMatcher struct {
// contains filtered or unexported fields
}
func Inside ¶
func Inside(from, to interface{}) *InsideMetadataMatcher
func (*InsideMetadataMatcher) Match ¶
func (i *InsideMetadataMatcher) Match(v interface{}) bool
func (*InsideMetadataMatcher) Value ¶
func (i *InsideMetadataMatcher) Value() (interface{}, interface{})
type LTEMetadataMatcher ¶
type LTEMetadataMatcher struct {
// contains filtered or unexported fields
}
func Lte ¶
func Lte(s interface{}) *LTEMetadataMatcher
func (*LTEMetadataMatcher) Match ¶
func (lte *LTEMetadataMatcher) Match(v interface{}) bool
func (*LTEMetadataMatcher) Value ¶
func (lte *LTEMetadataMatcher) Value() interface{}
type LTMetadataMatcher ¶
type LTMetadataMatcher struct {
// contains filtered or unexported fields
}
func Lt ¶
func Lt(s interface{}) *LTMetadataMatcher
func (*LTMetadataMatcher) Match ¶
func (lt *LTMetadataMatcher) Match(v interface{}) bool
func (*LTMetadataMatcher) Value ¶
func (lt *LTMetadataMatcher) Value() interface{}
type NEMetadataMatcher ¶
type NEMetadataMatcher struct {
// contains filtered or unexported fields
}
func Ne ¶
func Ne(s interface{}) *NEMetadataMatcher
func (*NEMetadataMatcher) Match ¶
func (n *NEMetadataMatcher) Match(v interface{}) bool
func (*NEMetadataMatcher) Value ¶
func (n *NEMetadataMatcher) Value() interface{}
type OutsideMetadataMatcher ¶
type OutsideMetadataMatcher struct {
// contains filtered or unexported fields
}
func Outside ¶
func Outside(from, to interface{}) *OutsideMetadataMatcher
func (*OutsideMetadataMatcher) Match ¶
func (i *OutsideMetadataMatcher) Match(v interface{}) bool
func (*OutsideMetadataMatcher) Value ¶
func (i *OutsideMetadataMatcher) Value() (interface{}, interface{})
type RegexMetadataMatcher ¶
type RegexMetadataMatcher struct {
// contains filtered or unexported fields
}
func Regex ¶
func Regex(expr string) *RegexMetadataMatcher
func (*RegexMetadataMatcher) Match ¶
func (r *RegexMetadataMatcher) Match(v interface{}) bool
type Token ¶
type Token int
Token represents a lexical token.
const ( // Special tokens ILLEGAL Token = iota EOF WS // Literals IDENT // Misc characters COMMA DOT LEFT_PARENTHESIS RIGHT_PARENTHESIS STRING NUMBER // Keywords G V HAS OUT IN OUTV INV OUTE INE DEDUP WITHIN WITHOUT METADATA SHORTESTPATHTO NE BOTH CONTEXT REGEX LT GT LTE GTE INSIDE OUTSIDE BETWEEN COUNT )
type WithinMetadataMatcher ¶
type WithinMetadataMatcher struct {
// contains filtered or unexported fields
}
func Within ¶
func Within(s ...interface{}) *WithinMetadataMatcher
func (*WithinMetadataMatcher) Match ¶
func (w *WithinMetadataMatcher) Match(v interface{}) bool
type WithoutMetadataMatcher ¶
type WithoutMetadataMatcher struct {
// contains filtered or unexported fields
}
func Without ¶
func Without(s ...interface{}) *WithoutMetadataMatcher
func (*WithoutMetadataMatcher) Match ¶
func (w *WithoutMetadataMatcher) Match(v interface{}) bool
Source Files
¶
- traversal.go
- traversal_extension.go
- traversal_parser.go
- traversal_scanner.go
Click to show internal directories.
Click to hide internal directories.