Documentation ¶
Index ¶
- Constants
- func ApplyChange(ctx context.Context, ds dag.DAGService, nd *dag.ProtoNode, cs []*Change) (*dag.ProtoNode, error)
- func DiffEnumerate(ctx context.Context, dserv node.NodeGetter, from, to *cid.Cid) error
- func MergeDiffs(a, b []*Change) ([]*Change, []Conflict)
- func NewMemoryDagService() dag.DAGService
- type Change
- type Conflict
- type Editor
- func (e *Editor) Finalize(ds dag.DAGService) (*dag.ProtoNode, error)
- func (e *Editor) GetDagService() dag.DAGService
- func (e *Editor) GetNode() *dag.ProtoNode
- func (e *Editor) InsertNodeAtPath(ctx context.Context, pth string, toinsert node.Node, ...) error
- func (e *Editor) RmLink(ctx context.Context, pth string) error
Constants ¶
View Source
const ( Add = iota Remove Mod )
Variables ¶
This section is empty.
Functions ¶
func ApplyChange ¶ added in v0.3.8
func DiffEnumerate ¶ added in v0.4.10
DiffEnumerate fetches every object in the graph pointed to by 'to' that is not in 'from'. This can be used to more efficiently fetch a graph if you can guarantee you already have the entirety of 'from'
func MergeDiffs ¶ added in v0.3.8
func NewMemoryDagService ¶ added in v0.4.0
func NewMemoryDagService() dag.DAGService
Types ¶
type Change ¶ added in v0.3.8
type Editor ¶
type Editor struct {
// contains filtered or unexported fields
}
func NewDagEditor ¶
func NewDagEditor(root *dag.ProtoNode, source dag.DAGService) *Editor
root is the node to be modified, source is the dagstore to pull nodes from (optional)
func (*Editor) GetDagService ¶ added in v0.3.8
func (e *Editor) GetDagService() dag.DAGService
func (*Editor) InsertNodeAtPath ¶
Click to show internal directories.
Click to hide internal directories.