Documentation ¶
Index ¶
- Variables
- func ParamToFilter(k string, v interface{}) (*filters.Filter, error)
- func ParamsToFilter(params ...interface{}) (*filters.Filter, error)
- func ParseSortParameter(keys ...interface{}) (order common.SortOrder, sortBy string, err error)
- func SliceToMetadata(s ...interface{}) (graph.Metadata, error)
- type BetweenMetadataMatcher
- type ContainsMetadataMatcher
- type GTEMetadataMatcher
- type GTMetadataMatcher
- type GraphStepContext
- type GraphTraversal
- func (t *GraphTraversal) Context(s ...interface{}) *GraphTraversal
- func (t *GraphTraversal) E(s ...interface{}) *GraphTraversalE
- func (t *GraphTraversal) Error() error
- func (t *GraphTraversal) MarshalJSON() ([]byte, error)
- func (t *GraphTraversal) RLock()
- func (t *GraphTraversal) RUnlock()
- func (t *GraphTraversal) V(s ...interface{}) *GraphTraversalV
- func (t *GraphTraversal) Values() []interface{}
- type GraphTraversalE
- func (te *GraphTraversalE) Count(s ...interface{}) *GraphTraversalValue
- func (te *GraphTraversalE) Dedup(keys ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) Error() error
- func (te *GraphTraversalE) Has(s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) HasKey(s string) *GraphTraversalE
- func (te *GraphTraversalE) HasNot(s string) *GraphTraversalE
- func (te *GraphTraversalE) InV(s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) Limit(s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) MarshalJSON() ([]byte, error)
- func (te *GraphTraversalE) OutV(s ...interface{}) *GraphTraversalV
- func (te *GraphTraversalE) Range(s ...interface{}) *GraphTraversalE
- func (te *GraphTraversalE) Values() []interface{}
- type GraphTraversalRange
- type GraphTraversalShortestPath
- type GraphTraversalStep
- type GraphTraversalV
- func (tv *GraphTraversalV) Both(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) BothE(s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) Count(s ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Dedup(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) Error() error
- func (tv *GraphTraversalV) GetNodes() (nodes []*graph.Node)
- func (tv *GraphTraversalV) Has(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) HasKey(s string) *GraphTraversalV
- func (tv *GraphTraversalV) HasNot(s string) *GraphTraversalV
- func (tv *GraphTraversalV) In(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) InE(s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) Limit(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) MarshalJSON() ([]byte, error)
- func (tv *GraphTraversalV) Metrics() *MetricsTraversalStep
- func (tv *GraphTraversalV) Out(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) OutE(s ...interface{}) *GraphTraversalE
- func (tv *GraphTraversalV) PropertyKeys(keys ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) PropertyValues(k ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Range(s ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) ShortestPathTo(m graph.Metadata, e graph.Metadata) *GraphTraversalShortestPath
- func (tv *GraphTraversalV) Sort(keys ...interface{}) *GraphTraversalV
- func (tv *GraphTraversalV) Sum(keys ...interface{}) *GraphTraversalValue
- func (tv *GraphTraversalV) Values() []interface{}
- type GraphTraversalValue
- type GremlinTraversalContext
- type GremlinTraversalExtension
- type GremlinTraversalParser
- type GremlinTraversalScanner
- type GremlinTraversalSequence
- type GremlinTraversalStep
- type GremlinTraversalStepBoth
- type GremlinTraversalStepBothE
- type GremlinTraversalStepContext
- type GremlinTraversalStepCount
- type GremlinTraversalStepDedup
- type GremlinTraversalStepE
- type GremlinTraversalStepG
- type GremlinTraversalStepHas
- type GremlinTraversalStepHasKey
- type GremlinTraversalStepHasNot
- type GremlinTraversalStepIn
- type GremlinTraversalStepInE
- type GremlinTraversalStepInV
- type GremlinTraversalStepKeys
- type GremlinTraversalStepLimit
- type GremlinTraversalStepMetrics
- type GremlinTraversalStepOut
- type GremlinTraversalStepOutE
- type GremlinTraversalStepOutV
- type GremlinTraversalStepRange
- type GremlinTraversalStepShortestPathTo
- type GremlinTraversalStepSort
- type GremlinTraversalStepSum
- type GremlinTraversalStepV
- type GremlinTraversalStepValues
- type InsideMetadataMatcher
- type LTEMetadataMatcher
- type LTMetadataMatcher
- type MetricsTraversalStep
- func (m *MetricsTraversalStep) Aggregates() *MetricsTraversalStep
- func (m *MetricsTraversalStep) Count(s ...interface{}) *GraphTraversalValue
- func (m *MetricsTraversalStep) Error() error
- func (m *MetricsTraversalStep) MarshalJSON() ([]byte, error)
- func (m *MetricsTraversalStep) Sum(keys ...interface{}) *GraphTraversalValue
- func (m *MetricsTraversalStep) Values() []interface{}
- type NEMetadataMatcher
- type OutsideMetadataMatcher
- type RegexMetadataMatcher
- type Since
- type Token
- type WithinMetadataMatcher
- type WithoutMetadataMatcher
Constants ¶
This section is empty.
Variables ¶
var ( // ErrExecutionError execution error ErrExecutionError = errors.New("Error while executing the query") )
Functions ¶
func ParamToFilter ¶ added in v0.10.0
ParamToFilter creates a filter based on parameters [RegexMetadataMatcher, NE/LT/GT/GTE/LTE/Inside/Outside/Between/Within/Contains/string,int64 MetadataMatcher]
func ParamsToFilter ¶ added in v0.10.0
ParamsToFilter convert multiple pairs to a unique filter, logically AND linked
func ParseSortParameter ¶ added in v0.10.0
ParseSortParameter helper
func SliceToMetadata ¶
SliceToMetadata slice multiple filters pair to metadata
Types ¶
type BetweenMetadataMatcher ¶ added in v0.5.0
type BetweenMetadataMatcher struct {
// contains filtered or unexported fields
}
BetweenMetadataMatcher describes a list of metadata that match between the range from, to
func Between ¶ added in v0.5.0
func Between(from interface{}, to interface{}) *BetweenMetadataMatcher
Between step
type ContainsMetadataMatcher ¶ added in v0.12.0
type ContainsMetadataMatcher struct {
// contains filtered or unexported fields
}
ContainsMetadataMatcher describes a list of metadata that contains a value
func Contains ¶ added in v0.12.0
func Contains(s interface{}) *ContainsMetadataMatcher
Contains step
type GTEMetadataMatcher ¶ added in v0.5.0
type GTEMetadataMatcher struct {
// contains filtered or unexported fields
}
GTEMetadataMatcher describes a list of metadata that match Greater Than Equal
type GTMetadataMatcher ¶ added in v0.5.0
type GTMetadataMatcher struct {
// contains filtered or unexported fields
}
GTMetadataMatcher describes a list of metadata that match GreaterThan
type GraphStepContext ¶ added in v0.6.0
type GraphStepContext struct {
PaginationRange *GraphTraversalRange
}
GraphStepContext a step within a context
type GraphTraversal ¶
GraphTraversal describes multiple step within a graph
func NewGraphTraversal ¶
func NewGraphTraversal(g *graph.Graph, lockGraph bool) *GraphTraversal
NewGraphTraversal creates a new graph traversal
func (*GraphTraversal) Context ¶
func (t *GraphTraversal) Context(s ...interface{}) *GraphTraversal
Context step : at, [duration]
func (*GraphTraversal) E ¶ added in v0.12.0
func (t *GraphTraversal) E(s ...interface{}) *GraphTraversalE
E step : [edge ID]
func (*GraphTraversal) Error ¶
func (t *GraphTraversal) Error() error
func (*GraphTraversal) MarshalJSON ¶
func (t *GraphTraversal) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversal) RLock ¶ added in v0.10.0
func (t *GraphTraversal) RLock()
RLock reads lock the graph
func (*GraphTraversal) RUnlock ¶ added in v0.10.0
func (t *GraphTraversal) RUnlock()
RUnlock reads unlock the graph
func (*GraphTraversal) V ¶
func (t *GraphTraversal) V(s ...interface{}) *GraphTraversalV
V step : [node ID]
func (*GraphTraversal) Values ¶
func (t *GraphTraversal) Values() []interface{}
Values returns the graph values
type GraphTraversalE ¶
type GraphTraversalE struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalE traversal steps on Edges
func NewGraphTraversalE ¶ added in v0.12.0
func NewGraphTraversalE(gt *GraphTraversal, edges []*graph.Edge, err ...error) *GraphTraversalE
NewGraphTraversalE creates a new graph traversal Edges
func (*GraphTraversalE) Count ¶ added in v0.5.0
func (te *GraphTraversalE) Count(s ...interface{}) *GraphTraversalValue
Count step
func (*GraphTraversalE) Dedup ¶
func (te *GraphTraversalE) Dedup(keys ...interface{}) *GraphTraversalE
Dedup step : deduplicate
func (*GraphTraversalE) Error ¶
func (te *GraphTraversalE) Error() error
func (*GraphTraversalE) Has ¶
func (te *GraphTraversalE) Has(s ...interface{}) *GraphTraversalE
Has step
func (*GraphTraversalE) HasKey ¶ added in v0.10.0
func (te *GraphTraversalE) HasKey(s string) *GraphTraversalE
HasKey step
func (*GraphTraversalE) HasNot ¶ added in v0.10.0
func (te *GraphTraversalE) HasNot(s string) *GraphTraversalE
HasNot step
func (*GraphTraversalE) InV ¶
func (te *GraphTraversalE) InV(s ...interface{}) *GraphTraversalV
InV step, node in
func (*GraphTraversalE) Limit ¶ added in v0.6.0
func (te *GraphTraversalE) Limit(s ...interface{}) *GraphTraversalE
Limit step
func (*GraphTraversalE) MarshalJSON ¶
func (te *GraphTraversalE) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalE) OutV ¶
func (te *GraphTraversalE) OutV(s ...interface{}) *GraphTraversalV
OutV step, node out
func (*GraphTraversalE) Range ¶ added in v0.6.0
func (te *GraphTraversalE) Range(s ...interface{}) *GraphTraversalE
Range step
func (*GraphTraversalE) Values ¶
func (te *GraphTraversalE) Values() []interface{}
Values returns the graph values
type GraphTraversalRange ¶ added in v0.6.0
type GraphTraversalRange [2]int64
GraphTraversalRange is within a min and a max
func (*GraphTraversalRange) Iterator ¶ added in v0.6.0
func (r *GraphTraversalRange) Iterator() *common.Iterator
Iterator on the range
type GraphTraversalShortestPath ¶
type GraphTraversalShortestPath struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalShortestPath traversal step shortest path
func (*GraphTraversalShortestPath) Error ¶
func (sp *GraphTraversalShortestPath) Error() error
func (*GraphTraversalShortestPath) GetNodes ¶ added in v0.11.0
func (sp *GraphTraversalShortestPath) GetNodes() []*graph.Node
GetNodes : returns all the nodes in single array, so it will used to find flows.
func (*GraphTraversalShortestPath) MarshalJSON ¶
func (sp *GraphTraversalShortestPath) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalShortestPath) Values ¶
func (sp *GraphTraversalShortestPath) Values() []interface{}
Values returns the graph values
type GraphTraversalStep ¶
type GraphTraversalStep interface { Values() []interface{} MarshalJSON() ([]byte, error) Error() error }
GraphTraversalStep describes a step in the graph containing Values
type GraphTraversalV ¶
type GraphTraversalV struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalV traversal steps on nodes
func NewGraphTraversalV ¶
func NewGraphTraversalV(gt *GraphTraversal, nodes []*graph.Node, err ...error) *GraphTraversalV
NewGraphTraversalV returns a new traversal step
func (*GraphTraversalV) Both ¶
func (tv *GraphTraversalV) Both(s ...interface{}) *GraphTraversalV
Both step
func (*GraphTraversalV) BothE ¶ added in v0.12.0
func (tv *GraphTraversalV) BothE(s ...interface{}) *GraphTraversalE
BothE : both are edges
func (*GraphTraversalV) Count ¶ added in v0.5.0
func (tv *GraphTraversalV) Count(s ...interface{}) *GraphTraversalValue
Count step
func (*GraphTraversalV) Dedup ¶
func (tv *GraphTraversalV) Dedup(s ...interface{}) *GraphTraversalV
Dedup step : deduplicate output
func (*GraphTraversalV) Error ¶
func (tv *GraphTraversalV) Error() error
func (*GraphTraversalV) GetNodes ¶ added in v0.8.0
func (tv *GraphTraversalV) GetNodes() (nodes []*graph.Node)
GetNodes returns the step nodes
func (*GraphTraversalV) Has ¶
func (tv *GraphTraversalV) Has(s ...interface{}) *GraphTraversalV
Has step
func (*GraphTraversalV) HasKey ¶ added in v0.10.0
func (tv *GraphTraversalV) HasKey(s string) *GraphTraversalV
HasKey step
func (*GraphTraversalV) HasNot ¶ added in v0.10.0
func (tv *GraphTraversalV) HasNot(s string) *GraphTraversalV
HasNot step
func (*GraphTraversalV) In ¶
func (tv *GraphTraversalV) In(s ...interface{}) *GraphTraversalV
In node step
func (*GraphTraversalV) InE ¶
func (tv *GraphTraversalV) InE(s ...interface{}) *GraphTraversalE
InE step of an node
func (*GraphTraversalV) Limit ¶ added in v0.6.0
func (tv *GraphTraversalV) Limit(s ...interface{}) *GraphTraversalV
Limit step
func (*GraphTraversalV) MarshalJSON ¶
func (tv *GraphTraversalV) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalV) Metrics ¶ added in v0.10.0
func (tv *GraphTraversalV) Metrics() *MetricsTraversalStep
Metrics step : packets counters
func (*GraphTraversalV) Out ¶
func (tv *GraphTraversalV) Out(s ...interface{}) *GraphTraversalV
Out step : out of a node step
func (*GraphTraversalV) OutE ¶
func (tv *GraphTraversalV) OutE(s ...interface{}) *GraphTraversalE
OutE step : out of an edge
func (*GraphTraversalV) PropertyKeys ¶ added in v0.8.0
func (tv *GraphTraversalV) PropertyKeys(keys ...interface{}) *GraphTraversalValue
PropertyKeys returns at this step, all the metadata keys of each metadata
func (*GraphTraversalV) PropertyValues ¶ added in v0.8.0
func (tv *GraphTraversalV) PropertyValues(k ...interface{}) *GraphTraversalValue
PropertyValues returns at this step, the values of each metadata selected by the first key
func (*GraphTraversalV) Range ¶ added in v0.6.0
func (tv *GraphTraversalV) Range(s ...interface{}) *GraphTraversalV
Range step
func (*GraphTraversalV) ShortestPathTo ¶
func (tv *GraphTraversalV) ShortestPathTo(m graph.Metadata, e graph.Metadata) *GraphTraversalShortestPath
ShortestPathTo step
func (*GraphTraversalV) Sort ¶ added in v0.10.0
func (tv *GraphTraversalV) Sort(keys ...interface{}) *GraphTraversalV
Sort step
func (*GraphTraversalV) Sum ¶ added in v0.8.0
func (tv *GraphTraversalV) Sum(keys ...interface{}) *GraphTraversalValue
Sum step : key returns the sum of the metadata values of the first argument key
func (*GraphTraversalV) Values ¶
func (tv *GraphTraversalV) Values() []interface{}
Values returns the graph values
type GraphTraversalValue ¶ added in v0.5.0
type GraphTraversalValue struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GraphTraversalValue traversal step value
func NewGraphTraversalValue ¶ added in v0.5.0
func NewGraphTraversalValue(gt *GraphTraversal, value interface{}, err ...error) *GraphTraversalValue
NewGraphTraversalValue creates a new traversal value step
func (*GraphTraversalValue) Dedup ¶ added in v0.8.0
func (t *GraphTraversalValue) Dedup(keys ...interface{}) *GraphTraversalValue
Dedup step : deduplicate
func (*GraphTraversalValue) Error ¶ added in v0.5.0
func (t *GraphTraversalValue) Error() error
func (*GraphTraversalValue) MarshalJSON ¶ added in v0.5.0
func (t *GraphTraversalValue) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*GraphTraversalValue) Values ¶ added in v0.5.0
func (t *GraphTraversalValue) Values() []interface{}
Values return the graph values
type GremlinTraversalContext ¶ added in v0.6.0
type GremlinTraversalContext struct { StepContext GraphStepContext Params []interface{} }
GremlinTraversalContext describes the context of a step
func (*GremlinTraversalContext) Context ¶ added in v0.6.0
func (p *GremlinTraversalContext) Context() *GremlinTraversalContext
Context step
func (*GremlinTraversalContext) ReduceRange ¶ added in v0.6.0
func (p *GremlinTraversalContext) ReduceRange(next GremlinTraversalStep) bool
ReduceRange Context step
type GremlinTraversalExtension ¶
type GremlinTraversalExtension interface { ScanIdent(s string) (Token, bool) ParseStep(t Token, p GremlinTraversalContext) (GremlinTraversalStep, error) }
GremlinTraversalExtension interface for Gremlin language extension
type GremlinTraversalParser ¶
type GremlinTraversalParser struct { sync.RWMutex Graph *graph.Graph // contains filtered or unexported fields }
GremlinTraversalParser describes a parser of gremlin graph expression The mechanism is based on Reduce and Exec steps
func NewGremlinTraversalParser ¶
func NewGremlinTraversalParser(g *graph.Graph) *GremlinTraversalParser
NewGremlinTraversalParser creates a new gremlin language parser on the graph
func (*GremlinTraversalParser) AddTraversalExtension ¶
func (p *GremlinTraversalParser) AddTraversalExtension(e GremlinTraversalExtension)
AddTraversalExtension registers a new gremlin traversal extension
func (*GremlinTraversalParser) Parse ¶
func (p *GremlinTraversalParser) Parse(r io.Reader, lockGraph bool) (*GremlinTraversalSequence, error)
Parse the Gremlin language and returns a traversal sequence
type GremlinTraversalScanner ¶
type GremlinTraversalScanner struct {
// contains filtered or unexported fields
}
GremlinTraversalScanner describes a buffer scanner for Gremlin expression extension
func NewGremlinTraversalScanner ¶
func NewGremlinTraversalScanner(r io.Reader, e []GremlinTraversalExtension) *GremlinTraversalScanner
NewGremlinTraversalScanner creates a new Gremlin expression scanner
func (*GremlinTraversalScanner) Scan ¶
func (s *GremlinTraversalScanner) Scan() (tok Token, lit string)
Scan and returns tokens
type GremlinTraversalSequence ¶
type GremlinTraversalSequence struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
GremlinTraversalSequence describes a sequence of steps
func (*GremlinTraversalSequence) Exec ¶
func (s *GremlinTraversalSequence) Exec() (GraphTraversalStep, error)
Exec sequence step
type GremlinTraversalStep ¶
type GremlinTraversalStep interface { Exec(last GraphTraversalStep) (GraphTraversalStep, error) Reduce(previous GremlinTraversalStep) GremlinTraversalStep Context() *GremlinTraversalContext }
GremlinTraversalStep describes a step
type GremlinTraversalStepBoth ¶ added in v0.5.0
type GremlinTraversalStepBoth struct {
GremlinTraversalContext
}
GremlinTraversalStepBoth step
func (*GremlinTraversalStepBoth) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepBoth) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Both step
func (*GremlinTraversalStepBoth) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepBoth) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Both step
type GremlinTraversalStepBothE ¶ added in v0.12.0
type GremlinTraversalStepBothE struct {
GremlinTraversalContext
}
GremlinTraversalStepBothE step
func (*GremlinTraversalStepBothE) Exec ¶ added in v0.12.0
func (s *GremlinTraversalStepBothE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec BothE step
func (*GremlinTraversalStepBothE) Reduce ¶ added in v0.12.0
func (s *GremlinTraversalStepBothE) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce BothE step
type GremlinTraversalStepContext ¶ added in v0.5.0
type GremlinTraversalStepContext struct {
GremlinTraversalContext
}
GremlinTraversalStepContext step
func (*GremlinTraversalStepContext) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepContext) Exec(last GraphTraversalStep) (_ GraphTraversalStep, err error)
Exec Context step
func (*GremlinTraversalStepContext) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepContext) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Context step
type GremlinTraversalStepCount ¶ added in v0.5.0
type GremlinTraversalStepCount struct {
GremlinTraversalContext
}
GremlinTraversalStepCount step
func (*GremlinTraversalStepCount) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepCount) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Count step
func (*GremlinTraversalStepCount) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepCount) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Count step
type GremlinTraversalStepDedup ¶ added in v0.5.0
type GremlinTraversalStepDedup struct {
GremlinTraversalContext
}
GremlinTraversalStepDedup step
func (*GremlinTraversalStepDedup) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepDedup) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Dedup step
func (*GremlinTraversalStepDedup) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepDedup) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Dedup step
type GremlinTraversalStepE ¶ added in v0.5.0
type GremlinTraversalStepE struct {
GremlinTraversalContext
}
GremlinTraversalStepE step
func (*GremlinTraversalStepE) Exec ¶ added in v0.12.0
func (s *GremlinTraversalStepE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec E step
func (*GremlinTraversalStepE) Reduce ¶ added in v0.12.0
func (s *GremlinTraversalStepE) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce E step
type GremlinTraversalStepG ¶ added in v0.5.0
type GremlinTraversalStepG struct {
GremlinTraversalContext
}
GremlinTraversalStepG step
func (*GremlinTraversalStepG) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepG) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec G step
func (*GremlinTraversalStepG) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepG) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce G step
type GremlinTraversalStepHas ¶ added in v0.5.0
type GremlinTraversalStepHas struct {
GremlinTraversalContext
}
GremlinTraversalStepHas step
func (*GremlinTraversalStepHas) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepHas) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Has step
func (*GremlinTraversalStepHas) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepHas) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Has step
type GremlinTraversalStepHasKey ¶ added in v0.10.0
type GremlinTraversalStepHasKey struct {
GremlinTraversalContext
}
GremlinTraversalStepHasKey step
func (*GremlinTraversalStepHasKey) Exec ¶ added in v0.10.0
func (s *GremlinTraversalStepHasKey) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec HasKey step
func (*GremlinTraversalStepHasKey) Reduce ¶ added in v0.10.0
func (s *GremlinTraversalStepHasKey) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce HasKey step
type GremlinTraversalStepHasNot ¶ added in v0.10.0
type GremlinTraversalStepHasNot struct {
GremlinTraversalContext
}
GremlinTraversalStepHasNot step
func (*GremlinTraversalStepHasNot) Exec ¶ added in v0.10.0
func (s *GremlinTraversalStepHasNot) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec HasNot
func (*GremlinTraversalStepHasNot) Reduce ¶ added in v0.10.0
func (s *GremlinTraversalStepHasNot) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce HasNot step
type GremlinTraversalStepIn ¶ added in v0.5.0
type GremlinTraversalStepIn struct {
GremlinTraversalContext
}
GremlinTraversalStepIn step
func (*GremlinTraversalStepIn) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepIn) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec In step
func (*GremlinTraversalStepIn) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepIn) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce In step
type GremlinTraversalStepInE ¶ added in v0.5.0
type GremlinTraversalStepInE struct {
GremlinTraversalContext
}
GremlinTraversalStepInE step
func (*GremlinTraversalStepInE) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepInE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec InE step
func (*GremlinTraversalStepInE) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepInE) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce InE step
type GremlinTraversalStepInV ¶ added in v0.5.0
type GremlinTraversalStepInV struct {
GremlinTraversalContext
}
GremlinTraversalStepInV step
func (*GremlinTraversalStepInV) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepInV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec InV step
func (*GremlinTraversalStepInV) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepInV) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce InV step
type GremlinTraversalStepKeys ¶ added in v0.8.0
type GremlinTraversalStepKeys struct {
GremlinTraversalContext
}
GremlinTraversalStepKeys step
func (*GremlinTraversalStepKeys) Exec ¶ added in v0.8.0
func (s *GremlinTraversalStepKeys) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Keys step
func (*GremlinTraversalStepKeys) Reduce ¶ added in v0.8.0
func (s *GremlinTraversalStepKeys) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Keys step
type GremlinTraversalStepLimit ¶ added in v0.6.0
type GremlinTraversalStepLimit struct {
GremlinTraversalContext
}
GremlinTraversalStepLimit step
func (*GremlinTraversalStepLimit) Exec ¶ added in v0.6.0
func (s *GremlinTraversalStepLimit) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Limit step
func (*GremlinTraversalStepLimit) Reduce ¶ added in v0.6.0
func (s *GremlinTraversalStepLimit) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Limit step
type GremlinTraversalStepMetrics ¶ added in v0.10.0
type GremlinTraversalStepMetrics struct {
GremlinTraversalContext
}
GremlinTraversalStepMetrics step
func (*GremlinTraversalStepMetrics) Exec ¶ added in v0.10.0
func (s *GremlinTraversalStepMetrics) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Metrics step
func (*GremlinTraversalStepMetrics) Reduce ¶ added in v0.10.0
func (s *GremlinTraversalStepMetrics) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Metrics step
type GremlinTraversalStepOut ¶ added in v0.5.0
type GremlinTraversalStepOut struct {
GremlinTraversalContext
}
GremlinTraversalStepOut step
func (*GremlinTraversalStepOut) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepOut) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Out step
func (*GremlinTraversalStepOut) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepOut) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Out step
type GremlinTraversalStepOutE ¶ added in v0.5.0
type GremlinTraversalStepOutE struct {
GremlinTraversalContext
}
GremlinTraversalStepOutE step
func (*GremlinTraversalStepOutE) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepOutE) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec OutE step
func (*GremlinTraversalStepOutE) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepOutE) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce OutE step
type GremlinTraversalStepOutV ¶ added in v0.5.0
type GremlinTraversalStepOutV struct {
GremlinTraversalContext
}
GremlinTraversalStepOutV step
func (*GremlinTraversalStepOutV) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepOutV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec OutV step
func (*GremlinTraversalStepOutV) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepOutV) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce OutV step
type GremlinTraversalStepRange ¶ added in v0.6.0
type GremlinTraversalStepRange struct {
GremlinTraversalContext
}
GremlinTraversalStepRange step
func (*GremlinTraversalStepRange) Exec ¶ added in v0.6.0
func (s *GremlinTraversalStepRange) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Range step
func (*GremlinTraversalStepRange) Reduce ¶ added in v0.6.0
func (s *GremlinTraversalStepRange) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Range step
type GremlinTraversalStepShortestPathTo ¶ added in v0.5.0
type GremlinTraversalStepShortestPathTo struct {
GremlinTraversalContext
}
GremlinTraversalStepShortestPathTo step
func (*GremlinTraversalStepShortestPathTo) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepShortestPathTo) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec ShortestPathTo step
func (*GremlinTraversalStepShortestPathTo) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepShortestPathTo) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce ShortestPathTo step
type GremlinTraversalStepSort ¶ added in v0.7.0
type GremlinTraversalStepSort struct {
GremlinTraversalContext
}
GremlinTraversalStepSort step
func (*GremlinTraversalStepSort) Exec ¶ added in v0.7.0
func (s *GremlinTraversalStepSort) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Sort step
func (*GremlinTraversalStepSort) Reduce ¶ added in v0.7.0
func (s *GremlinTraversalStepSort) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Sort step
type GremlinTraversalStepSum ¶ added in v0.8.0
type GremlinTraversalStepSum struct {
GremlinTraversalContext
}
GremlinTraversalStepSum step
func (*GremlinTraversalStepSum) Exec ¶ added in v0.8.0
func (s *GremlinTraversalStepSum) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Sum step
func (*GremlinTraversalStepSum) Reduce ¶ added in v0.8.0
func (s *GremlinTraversalStepSum) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Sum step
type GremlinTraversalStepV ¶ added in v0.5.0
type GremlinTraversalStepV struct {
GremlinTraversalContext
}
GremlinTraversalStepV step
func (*GremlinTraversalStepV) Exec ¶ added in v0.5.0
func (s *GremlinTraversalStepV) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec V step
func (*GremlinTraversalStepV) Reduce ¶ added in v0.5.0
func (s *GremlinTraversalStepV) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce V step
type GremlinTraversalStepValues ¶ added in v0.8.0
type GremlinTraversalStepValues struct {
GremlinTraversalContext
}
GremlinTraversalStepValues step
func (*GremlinTraversalStepValues) Exec ¶ added in v0.8.0
func (s *GremlinTraversalStepValues) Exec(last GraphTraversalStep) (GraphTraversalStep, error)
Exec Values step
func (*GremlinTraversalStepValues) Reduce ¶ added in v0.8.0
func (s *GremlinTraversalStepValues) Reduce(next GremlinTraversalStep) GremlinTraversalStep
Reduce Values step
type InsideMetadataMatcher ¶ added in v0.5.0
type InsideMetadataMatcher struct {
// contains filtered or unexported fields
}
InsideMetadataMatcher describes a list of metadata that match inside the range from, to
type LTEMetadataMatcher ¶ added in v0.5.0
type LTEMetadataMatcher struct {
// contains filtered or unexported fields
}
LTEMetadataMatcher describes a list of metadata that match Less Than Equal
type LTMetadataMatcher ¶ added in v0.5.0
type LTMetadataMatcher struct {
// contains filtered or unexported fields
}
LTMetadataMatcher describes a list of metadata that match LessThan
type MetricsTraversalStep ¶ added in v0.10.0
type MetricsTraversalStep struct { GraphTraversal *GraphTraversal // contains filtered or unexported fields }
MetricsTraversalStep traversal step metric interface counters
func NewMetricsTraversalStep ¶ added in v0.10.0
func NewMetricsTraversalStep(gt *GraphTraversal, metrics map[string][]*common.TimedMetric, err error) *MetricsTraversalStep
NewMetricsTraversalStep creates a new tranversal metric step
func (*MetricsTraversalStep) Aggregates ¶ added in v0.10.0
func (m *MetricsTraversalStep) Aggregates() *MetricsTraversalStep
Aggregates merges multiple metrics array into one by summing overlapping metrics. It returns a unique array will all the aggregated metrics.
func (*MetricsTraversalStep) Count ¶ added in v0.10.0
func (m *MetricsTraversalStep) Count(s ...interface{}) *GraphTraversalValue
Count step
func (*MetricsTraversalStep) Error ¶ added in v0.10.0
func (m *MetricsTraversalStep) Error() error
Error returns error present at this step
func (*MetricsTraversalStep) MarshalJSON ¶ added in v0.10.0
func (m *MetricsTraversalStep) MarshalJSON() ([]byte, error)
MarshalJSON serialize in JSON
func (*MetricsTraversalStep) Sum ¶ added in v0.10.0
func (m *MetricsTraversalStep) Sum(keys ...interface{}) *GraphTraversalValue
Sum aggregates integer values mapped by 'key' cross flows
func (*MetricsTraversalStep) Values ¶ added in v0.10.0
func (m *MetricsTraversalStep) Values() []interface{}
Values returns the graph metric values
type NEMetadataMatcher ¶
type NEMetadataMatcher struct {
// contains filtered or unexported fields
}
NEMetadataMatcher describes a list of metadata that match NotEqual
type OutsideMetadataMatcher ¶ added in v0.5.0
type OutsideMetadataMatcher struct {
// contains filtered or unexported fields
}
OutsideMetadataMatcher describes a list of metadata that match outside the range from, to
func Outside ¶ added in v0.5.0
func Outside(from, to interface{}) *OutsideMetadataMatcher
Outside step
type RegexMetadataMatcher ¶
type RegexMetadataMatcher struct {
// contains filtered or unexported fields
}
RegexMetadataMatcher describes a list of metadata that match a regex
type Since ¶ added in v0.8.0
type Since struct {
Seconds int64
}
Since describes a list of metadata that match since seconds
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 E HAS HASKEY HASNOT OUT IN OUTV INV OUTE INE BOTHE DEDUP WITHIN WITHOUT METADATA SHORTESTPATHTO NE BOTH CONTEXT REGEX LT GT LTE GTE INSIDE OUTSIDE BETWEEN COUNT RANGE LIMIT SORT VALUES KEYS SUM METRICS ASC DESC CONTAINS )
Default language token, extension token start at 1000
type WithinMetadataMatcher ¶
type WithinMetadataMatcher struct {
List []interface{}
}
WithinMetadataMatcher describes a list of metadata that should match (within)
type WithoutMetadataMatcher ¶
type WithoutMetadataMatcher struct {
// contains filtered or unexported fields
}
WithoutMetadataMatcher describes a list of metadata that shouldn't match (without)