Documentation
¶
Index ¶
- Constants
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteEdge(from graph.NodeID, to graph.NodeID, edgeType graph.EdgeType) error
- func (s *Store) DeleteFingerprint(path string) error
- func (s *Store) DeleteNode(id graph.NodeID) error
- func (s *Store) DeleteOwnedNodes(path string) error
- func (s *Store) EnsureSchema(repo string) error
- func (s *Store) ForEachNode(fn func(graph.Node) bool) error
- func (s *Store) GetFingerprint(path string) (string, bool, error)
- func (s *Store) GetNode(id graph.NodeID) (graph.Node, error)
- func (s *Store) GetNodeByURI(repoURI string) (graph.Node, error)
- func (s *Store) GetOwnedNodes(path string) ([]graph.NodeID, error)
- func (s *Store) InEdges(to graph.NodeID, edgeType graph.EdgeType) ([]graph.Edge, error)
- func (s *Store) ListFingerprints() (map[string]string, error)
- func (s *Store) OutEdges(from graph.NodeID, edgeType graph.EdgeType) ([]graph.Edge, error)
- func (s *Store) PutEdge(edge graph.Edge) error
- func (s *Store) PutFingerprint(path, hash string) error
- func (s *Store) PutNode(node graph.Node) error
- func (s *Store) PutOwnedNodes(path string, ids []graph.NodeID) error
- func (s *Store) SchemaVersion() int
Constants ¶
const ( SchemaVersionPhase1 = 1 SchemaVersionCurrent = 2 // repo_uri secondary index (SYN-11) )
Schema versions for the in-memory / Badger graph stores.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an in-memory graph.Store for tests and fast local use.
func (*Store) DeleteEdge ¶
func (*Store) DeleteFingerprint ¶
DeleteFingerprint removes the fingerprint for path.
func (*Store) DeleteOwnedNodes ¶
DeleteOwnedNodes removes ownership metadata for path.
func (*Store) EnsureSchema ¶
EnsureSchema migrates nodes to schema v2 (repo_uri props + index) using repo. Migration is applied atomically: on conflict/error the store state is unchanged.
func (*Store) ForEachNode ¶
ForEachNode invokes fn for every node. Iteration stops early if fn returns false.
func (*Store) GetFingerprint ¶
GetFingerprint returns the stored content hash for path.
func (*Store) GetOwnedNodes ¶
GetOwnedNodes returns node IDs owned by path.
func (*Store) ListFingerprints ¶
ListFingerprints returns all path→hash entries.
func (*Store) PutFingerprint ¶
PutFingerprint stores a content hash for path.
func (*Store) PutOwnedNodes ¶
PutOwnedNodes stores the set of node IDs owned by path.
func (*Store) SchemaVersion ¶
SchemaVersion returns the store schema version.