Documentation ¶
Index ¶
- type Line
- type Memory
- func (m *Memory) Add(obj api.Object, opts store.AddOptions) (store.Entity, error)
- func (m *Memory) DOT() (string, error)
- func (m *Memory) DOTAttributers() (graph, node, edge encoding.Attributer)
- func (m *Memory) DOTID() string
- func (m *Memory) Delete(e store.Entity, opts store.DelOptions) error
- func (m *Memory) Edges(uid, vid string) ([]store.Edge, error)
- func (m Memory) ID() string
- func (m *Memory) Link(from store.Node, to store.Node, opts store.LinkOptions) (store.Edge, error)
- func (m *Memory) Node(id string) (store.Node, error)
- func (m *Memory) Nodes() ([]store.Node, error)
- func (m Memory) Options() store.Options
- func (m *Memory) Query(q *query.Query) ([]store.Entity, error)
- func (m *Memory) QueryLine(q *query.Query) ([]*Line, error)
- func (m *Memory) QueryNode(q *query.Query) ([]*Node, error)
- func (m *Memory) SubGraph(n store.Node, depth int) (store.Graph, error)
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Line ¶
Line implements graph.WeightedLine
func (*Line) Attributes ¶
Attributes implements store.DOTAttrs
func (*Line) ReversedLine ¶
ReversedLine returns a new line with end points of the pair swapped
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is in-memory graph store
func (*Memory) DOTAttributers ¶
func (m *Memory) DOTAttributers() (graph, node, edge encoding.Attributer)
DOTAttributers implements encoding.Attributer
func (*Memory) Edges ¶
Edges returns all the edges (lines) from u to v if such edges exists and nil otherwise
func (*Memory) Link ¶
Link creates a new edge between the nodes and returns it or it returns an existing edge if the edges between the nodes already exists. It returns error if either of the nodes does not exist in the graph.
func (*Memory) Node ¶
Node returns the node with the given ID if it exists in the graph, and nil otherwise.
Click to show internal directories.
Click to hide internal directories.