gx update and fix code to use new Cid type
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org> This commit was moved from ipfs/interface-go-ipfs-core@bdbcb4cff02fb5502fc59563e5cb51c641261390 This commit was moved from ipfs/boxo@a48e694f9d8c710e4354c9818c46ae76d5fece00
Kevin Atkinson committed
Sep 11, 2018 at 22:19 UTC
00a0dc6a4b8a9a580abc1e5ed50539f2d5400499
7 files changed
+19
-19
core/coreiface/coreapi.go
+1
-1
@@ -5,7 +5,7 @@ package iface
5
import (
6
"context"
7
8
- ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format"
8
+ ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
9
)
10
11
// CoreAPI defines an unified interface to IPFS for Go programs
core/coreiface/dag.go
+1
-1
@@ -6,7 +6,7 @@ import (
6
7
"github.com/ipfs/go-ipfs/core/coreapi/interface/options"
8
9
- ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format"
9
+ ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
10
)
11
12
// DagOps groups operations that can be batched together
core/coreiface/object.go
+3
-3
@@ -6,14 +6,14 @@ import (
6
7
options "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
8
9
- ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format"
10
- cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid"
9
+ cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid"
10
+ ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
11
)
12
13
// ObjectStat provides information about dag nodes
14
type ObjectStat struct {
15
// Cid is the CID of the node
16
- Cid *cid.Cid
16
+ Cid cid.Cid
17
18
// NumLinks is number of links the node contains
19
NumLinks int
core/coreiface/options/block.go
+1
-1
@@ -2,8 +2,8 @@ package options
2
3
import (
4
"fmt"
5
+ cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid"
6
mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash"
6
- cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid"
7
)
8
9
type BlockPutSettings struct {
core/coreiface/options/dag.go
+1
-1
@@ -3,7 +3,7 @@ package options
3
import (
4
"math"
5
6
- cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid"
6
+ cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid"
7
)
8
9
type DagPutSettings struct {
core/coreiface/path.go
+11
-11
@@ -1,9 +1,9 @@
1
package iface
2
3
import (
4
- ipfspath "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path"
4
+ ipfspath "gx/ipfs/QmRYx6fJzTWFoeTo3qQn64iDrVC154Gy9waQDhvKRr2ND3/go-path"
5
6
- cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid"
6
+ cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid"
7
)
8
9
//TODO: merge with ipfspath so we don't depend on it
@@ -65,7 +65,7 @@ type ResolvedPath interface {
65
// * Calling Cid() will return `cidB`
66
// * Calling Root() will return `cidRoot`
67
// * Calling Remainder() will return `foo/bar`
68
- Cid() *cid.Cid
68
+ Cid() cid.Cid
69
70
// Root returns the CID of the root object of the path
71
//
@@ -74,7 +74,7 @@ type ResolvedPath interface {
74
// "/ipfs/QmRoot/A/B", the Root method will return the CID of object QmRoot
75
//
76
// For more examples see the documentation of Cid() method
77
- Root() *cid.Cid
77
+ Root() cid.Cid
78
79
// Remainder returns unresolved part of the path
80
//
@@ -100,13 +100,13 @@ type path struct {
100
// resolvedPath implements coreiface.resolvedPath
101
type resolvedPath struct {
102
path
103
- cid *cid.Cid
104
- root *cid.Cid
103
+ cid cid.Cid
104
+ root cid.Cid
105
remainder string
106
}
107
108
// IpfsPath creates new /ipfs path from the provided CID
109
-func IpfsPath(c *cid.Cid) ResolvedPath {
109
+func IpfsPath(c cid.Cid) ResolvedPath {
110
return &resolvedPath{
111
path: path{ipfspath.Path("/ipfs/" + c.String())},
112
cid: c,
@@ -116,7 +116,7 @@ func IpfsPath(c *cid.Cid) ResolvedPath {
116
}
117
118
// IpldPath creates new /ipld path from the provided CID
119
-func IpldPath(c *cid.Cid) ResolvedPath {
119
+func IpldPath(c cid.Cid) ResolvedPath {
120
return &resolvedPath{
121
path: path{ipfspath.Path("/ipld/" + c.String())},
122
cid: c,
@@ -138,7 +138,7 @@ func ParsePath(p string) (Path, error) {
138
// NewResolvedPath creates new ResolvedPath. This function performs no checks
139
// and is intended to be used by resolver implementations. Incorrect inputs may
140
// cause panics. Handle with care.
141
-func NewResolvedPath(ipath ipfspath.Path, c *cid.Cid, root *cid.Cid, remainder string) ResolvedPath {
141
+func NewResolvedPath(ipath ipfspath.Path, c cid.Cid, root cid.Cid, remainder string) ResolvedPath {
142
return &resolvedPath{
143
path: path{ipath},
144
cid: c,
@@ -163,11 +163,11 @@ func (p *path) Mutable() bool {
163
return p.Namespace() == "ipns"
164
}
165
166
-func (p *resolvedPath) Cid() *cid.Cid {
166
+func (p *resolvedPath) Cid() cid.Cid {
167
return p.cid
168
}
169
170
-func (p *resolvedPath) Root() *cid.Cid {
170
+func (p *resolvedPath) Root() cid.Cid {
171
return p.root
172
}
173
core/coreiface/unixfs.go
+1
-1
@@ -4,7 +4,7 @@ import (
4
"context"
5
"io"
6
7
- ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format"
7
+ ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
8
)
9
10
// UnixfsAPI is the basic interface to immutable files in IPFS