contracts

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package contracts defines the interfaces for graph storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	SaveNode(ctx context.Context, node *graph.Node) error
	SaveEdge(ctx context.Context, edge *graph.Edge) error
	SaveGraph(ctx context.Context, nodes []*graph.Node, edges []*graph.Edge) error
	GetNode(ctx context.Context, id string) (*graph.Node, error)
	ListNodes(ctx context.Context) ([]*graph.Node, error)
	GetNeighbors(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
	GetInboundEdges(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
	ListEdges(ctx context.Context) ([]*graph.Edge, error)
	DeleteNode(ctx context.Context, id string) error
	DeleteByFile(ctx context.Context, file string) error
	DeleteEdgesFrom(ctx context.Context, id string) error
	Close() error
}

Store defines the interface for persisting and querying the structural graph.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL