Documentation ¶
Index ¶
- func DeserializeNode(uuid psi.NodeID, data []byte) (psi.Node, error)
- func SerializeGraph(g psi.Graph) ([]byte, error)
- func SerializeNode(n psi.Node) ([]byte, cid.Cid, error)
- type FrozenEdge
- type FrozenGraph
- type FrozenNode
- type IndexedGraph
- func (g *IndexedGraph) Add(n psi.Node)
- func (g *IndexedGraph) GetNodeByID(id psi.NodeID) (psi.Node, error)
- func (g *IndexedGraph) GetNodeChildren(path psi.Path) (result []psi.Path, err error)
- func (g *IndexedGraph) OnNodeInvalidated(n psi.Node)
- func (g *IndexedGraph) OnNodeUpdated(n psi.Node)
- func (g *IndexedGraph) Remove(n psi.Node)
- func (g *IndexedGraph) ResolveNode(path psi.Path) (n psi.Node, err error)
- type ObjectStore
- type Store
- func (s *Store) GetEdgeByCid(ctx context.Context, id cid.Cid) (*FrozenEdge, error)
- func (s *Store) GetNodeByCid(ctx context.Context, id cid.Cid) (*FrozenNode, error)
- func (s *Store) GetNodeByID(ctx context.Context, id psi.NodeID, version int64) (*FrozenNode, error)
- func (s *Store) GetNodeEdges(ctx context.Context, id psi.NodeID, version int64) (iterators.Iterator[*FrozenEdge], error)
- func (s *Store) LoadNode(ctx context.Context, fn *FrozenNode) (psi.Node, error)
- func (s *Store) RemoveEdge(ctx context.Context, nodeId psi.NodeID, key psi.EdgeKey) error
- func (s *Store) RemoveNode(ctx context.Context, path psi.Path) error
- func (s *Store) ResolvePath(ctx context.Context, path psi.Path) (psi.NodeID, error)
- func (s *Store) UpsertEdge(ctx context.Context, edge psi.Edge) (*FrozenEdge, error)
- func (s *Store) UpsertNode(ctx context.Context, n psi.Node) (*FrozenNode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FrozenEdge ¶
type FrozenGraph ¶
type FrozenGraph struct { Nodes []*FrozenNode Edges []*FrozenEdge }
func FreezeGraph ¶
func FreezeGraph(g psi.Graph) (*FrozenGraph, error)
type FrozenNode ¶
type IndexedGraph ¶
func NewIndexedGraph ¶
func NewIndexedGraph(ctx context.Context, ds datastore.Batching, root psi.Node) *IndexedGraph
func (*IndexedGraph) Add ¶
func (g *IndexedGraph) Add(n psi.Node)
func (*IndexedGraph) GetNodeByID ¶
func (*IndexedGraph) GetNodeChildren ¶
func (*IndexedGraph) OnNodeInvalidated ¶
func (g *IndexedGraph) OnNodeInvalidated(n psi.Node)
func (*IndexedGraph) OnNodeUpdated ¶
func (g *IndexedGraph) OnNodeUpdated(n psi.Node)
func (*IndexedGraph) Remove ¶
func (g *IndexedGraph) Remove(n psi.Node)
func (*IndexedGraph) ResolveNode ¶
type ObjectStore ¶
type ObjectStore struct {
// contains filtered or unexported fields
}
func NewObjectStore ¶
func NewObjectStore(ds datastore.Datastore) *ObjectStore
func (*ObjectStore) Get ¶
func (s *ObjectStore) Get(ctx context.Context, contentId cid.Cid) (io.ReadCloser, error)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(ds datastore.Batching, os *ObjectStore) *Store
func (*Store) GetEdgeByCid ¶
func (s *Store) GetEdgeByCid(ctx context.Context, id cid.Cid) (*FrozenEdge, error)
func (*Store) GetNodeByCid ¶
func (s *Store) GetNodeByCid(ctx context.Context, id cid.Cid) (*FrozenNode, error)
func (*Store) GetNodeByID ¶
func (*Store) GetNodeEdges ¶
func (*Store) RemoveEdge ¶
func (*Store) ResolvePath ¶
func (*Store) UpsertEdge ¶
func (*Store) UpsertNode ¶
Click to show internal directories.
Click to hide internal directories.