Documentation
¶
Index ¶
- Variables
- type BatchGraph
- type Graph
- type MemoryGraph
- func (graph *MemoryGraph) Bootstrap(_ context.Context, graphSchema schema.GraphSchema) error
- func (graph *MemoryGraph) DeleteDerivedFileNodes(_ context.Context, projectID string, repoFileID string) error
- func (graph *MemoryGraph) DeleteNodes(_ context.Context, label string, filter map[string]string) error
- func (graph *MemoryGraph) GetNode(_ context.Context, label string, id string) (Node, error)
- func (graph *MemoryGraph) GetRelationship(_ context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
- func (graph *MemoryGraph) ListNodes(_ context.Context, label string, filter map[string]string) ([]Node, error)
- func (graph *MemoryGraph) ListRelationships(_ context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
- func (graph *MemoryGraph) PutNode(_ context.Context, node Node) error
- func (graph *MemoryGraph) PutRelationship(_ context.Context, relationship Relationship) error
- func (graph *MemoryGraph) SchemaSnapshot() schema.GraphSchema
- type NativeRuntimeStatus
- type Node
- type NodeRef
- type PersistentGraph
- func (graph *PersistentGraph) Batch(ctx context.Context, fn func(Graph) error) error
- func (graph *PersistentGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
- func (graph *PersistentGraph) DeleteDerivedFileNodes(ctx context.Context, projectID string, repoFileID string) error
- func (graph *PersistentGraph) DeleteNodes(ctx context.Context, label string, filter map[string]string) error
- func (graph *PersistentGraph) GetNode(ctx context.Context, label string, id string) (Node, error)
- func (graph *PersistentGraph) GetRelationship(ctx context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
- func (graph *PersistentGraph) ListNodes(ctx context.Context, label string, filter map[string]string) ([]Node, error)
- func (graph *PersistentGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
- func (graph *PersistentGraph) PutNode(ctx context.Context, node Node) error
- func (graph *PersistentGraph) PutRelationship(ctx context.Context, relationship Relationship) error
- func (graph *PersistentGraph) SchemaSnapshot() schema.GraphSchema
- type Relationship
- type RelationshipFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNodeNotFound = errors.New("ladybug node not found") ErrRelationshipNotFound = errors.New("ladybug relationship not found") )
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph interface {
Bootstrap(context.Context, schema.GraphSchema) error
PutNode(context.Context, Node) error
GetNode(context.Context, string, string) (Node, error)
ListNodes(context.Context, string, map[string]string) ([]Node, error)
DeleteNodes(context.Context, string, map[string]string) error
DeleteDerivedFileNodes(context.Context, string, string) error
PutRelationship(context.Context, Relationship) error
ListRelationships(context.Context, string, RelationshipFilter) ([]Relationship, error)
}
type MemoryGraph ¶
type MemoryGraph struct {
// contains filtered or unexported fields
}
func NewMemoryGraph ¶
func NewMemoryGraph() *MemoryGraph
func (*MemoryGraph) Bootstrap ¶
func (graph *MemoryGraph) Bootstrap(_ context.Context, graphSchema schema.GraphSchema) error
func (*MemoryGraph) DeleteDerivedFileNodes ¶
func (*MemoryGraph) DeleteNodes ¶
func (*MemoryGraph) GetRelationship ¶
func (graph *MemoryGraph) GetRelationship(_ context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
func (*MemoryGraph) ListRelationships ¶
func (graph *MemoryGraph) ListRelationships(_ context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
func (*MemoryGraph) PutRelationship ¶
func (graph *MemoryGraph) PutRelationship(_ context.Context, relationship Relationship) error
func (*MemoryGraph) SchemaSnapshot ¶
func (graph *MemoryGraph) SchemaSnapshot() schema.GraphSchema
type NativeRuntimeStatus ¶
func NativeStatus ¶
func NativeStatus() NativeRuntimeStatus
type PersistentGraph ¶
type PersistentGraph struct {
// contains filtered or unexported fields
}
func OpenPersistentGraph ¶
func OpenPersistentGraph(path string) (*PersistentGraph, error)
func (*PersistentGraph) Bootstrap ¶
func (graph *PersistentGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
func (*PersistentGraph) DeleteDerivedFileNodes ¶
func (*PersistentGraph) DeleteNodes ¶
func (*PersistentGraph) GetRelationship ¶
func (graph *PersistentGraph) GetRelationship(ctx context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
func (*PersistentGraph) ListRelationships ¶
func (graph *PersistentGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
func (*PersistentGraph) PutNode ¶
func (graph *PersistentGraph) PutNode(ctx context.Context, node Node) error
func (*PersistentGraph) PutRelationship ¶
func (graph *PersistentGraph) PutRelationship(ctx context.Context, relationship Relationship) error
func (*PersistentGraph) SchemaSnapshot ¶
func (graph *PersistentGraph) SchemaSnapshot() schema.GraphSchema
type Relationship ¶
Click to show internal directories.
Click to hide internal directories.