Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
7cf2f1e0
Commit
7cf2f1e0
authored
8 years ago
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to newer ipld node interface with Copy and better Tree
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
f6018292
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
io/dagreader.go
io/dagreader.go
+1
-1
io/dirbuilder.go
io/dirbuilder.go
+1
-1
io/resolve.go
io/resolve.go
+1
-1
mod/dagmodifier.go
mod/dagmodifier.go
+4
-4
test/utils.go
test/utils.go
+1
-1
No files found.
io/dagreader.go
View file @
7cf2f1e0
...
@@ -12,7 +12,7 @@ import (
...
@@ -12,7 +12,7 @@ import (
ft
"github.com/ipfs/go-ipfs/unixfs"
ft
"github.com/ipfs/go-ipfs/unixfs"
ftpb
"github.com/ipfs/go-ipfs/unixfs/pb"
ftpb
"github.com/ipfs/go-ipfs/unixfs/pb"
node
"gx/ipfs/QmU
7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g
/go-ipld-node"
node
"gx/ipfs/QmU
sVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
)
)
...
...
This diff is collapsed.
Click to expand it.
io/dirbuilder.go
View file @
7cf2f1e0
...
@@ -5,7 +5,7 @@ import (
...
@@ -5,7 +5,7 @@ import (
mdag
"github.com/ipfs/go-ipfs/merkledag"
mdag
"github.com/ipfs/go-ipfs/merkledag"
format
"github.com/ipfs/go-ipfs/unixfs"
format
"github.com/ipfs/go-ipfs/unixfs"
cid
"gx/ipfs/Qm
Xfiyr2RWEXpVDdaYnD2HNiBk6UBddsvEP4RPfXb6nGqY
/go-cid"
cid
"gx/ipfs/Qm
cEcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
)
)
type
directoryBuilder
struct
{
type
directoryBuilder
struct
{
...
...
This diff is collapsed.
Click to expand it.
io/resolve.go
View file @
7cf2f1e0
...
@@ -6,7 +6,7 @@ import (
...
@@ -6,7 +6,7 @@ import (
dag
"github.com/ipfs/go-ipfs/merkledag"
dag
"github.com/ipfs/go-ipfs/merkledag"
ft
"github.com/ipfs/go-ipfs/unixfs"
ft
"github.com/ipfs/go-ipfs/unixfs"
node
"gx/ipfs/QmU
7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g
/go-ipld-node"
node
"gx/ipfs/QmU
sVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
)
)
func
ResolveUnixfsOnce
(
ctx
context
.
Context
,
ds
dag
.
DAGService
,
nd
node
.
Node
,
name
string
)
(
*
node
.
Link
,
error
)
{
func
ResolveUnixfsOnce
(
ctx
context
.
Context
,
ds
dag
.
DAGService
,
nd
node
.
Node
,
name
string
)
(
*
node
.
Link
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
mod/dagmodifier.go
View file @
7cf2f1e0
...
@@ -15,9 +15,9 @@ import (
...
@@ -15,9 +15,9 @@ import (
uio "github.com/ipfs/go-ipfs/unixfs/io"
uio "github.com/ipfs/go-ipfs/unixfs/io"
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
node
"gx/ipfs/QmU7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g/go-ipld-node"
node "gx/ipfs/QmUsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq/go-ipld-node"
cid
"gx/ipfs/QmXfiyr2RWEXpVDdaYnD2HNiBk6UBddsvEP4RPfXb6nGqY/go-cid"
proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
cid "gx/ipfs/QmcEcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU/go-cid"
)
)
var ErrSeekFail = errors.New("failed to seek properly")
var ErrSeekFail = errors.New("failed to seek properly")
...
@@ -53,7 +53,7 @@ func NewDagModifier(ctx context.Context, from node.Node, serv mdag.DAGService, s
...
@@ -53,7 +53,7 @@ func NewDagModifier(ctx context.Context, from node.Node, serv mdag.DAGService, s
}
}
return &DagModifier{
return &DagModifier{
curNode
:
pbn
.
Copy
(),
curNode: pbn.Copy()
.(*mdag.ProtoNode)
,
dagserv: serv,
dagserv: serv,
splitter: spl,
splitter: spl,
ctx: ctx,
ctx: ctx,
...
@@ -373,7 +373,7 @@ func (dm *DagModifier) GetNode() (*mdag.ProtoNode, error) {
...
@@ -373,7 +373,7 @@ func (dm *DagModifier) GetNode() (*mdag.ProtoNode, error) {
if err != nil {
if err != nil {
return nil, err
return nil, err
}
}
return
dm
.
curNode
.
Copy
(),
nil
return dm.curNode.Copy()
.(*mdag.ProtoNode)
, nil
}
}
// HasChanges returned whether or not there are unflushed changes to this dag
// HasChanges returned whether or not there are unflushed changes to this dag
...
...
This diff is collapsed.
Click to expand it.
test/utils.go
View file @
7cf2f1e0
...
@@ -14,7 +14,7 @@ import (
...
@@ -14,7 +14,7 @@ import (
mdagmock
"github.com/ipfs/go-ipfs/merkledag/test"
mdagmock
"github.com/ipfs/go-ipfs/merkledag/test"
ft
"github.com/ipfs/go-ipfs/unixfs"
ft
"github.com/ipfs/go-ipfs/unixfs"
node
"gx/ipfs/QmU
7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g
/go-ipld-node"
node
"gx/ipfs/QmU
sVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
u
"gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
u
"gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
)
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment