Documentation.
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
Kevin Atkinson committed
Oct 19, 2017 at 12:09 UTC
0182e5977c2c26f044d9555aa3a19f3e7985ee95
4 files changed
+6
-1
merkledag/node.go
+3
@@ -42,7 +42,10 @@ var v1CidPrefix = cid.Prefix{
42
Version: 1,
43
}
44
45
+// V0CidPrefix returns a prefix for CIDv0
46
func V0CidPrefix() cid.Prefix { return v0CidPrefix }
47
+
48
+// V1CidPrefix returns a prefix for CIDv1 with the default settings
49
func V1CidPrefix() cid.Prefix { return v1CidPrefix }
50
51
// PrefixForCidVersion returns the Protobuf prefix for a given CID version
unixfs/hamt/hamt.go
+1
-1
@@ -131,7 +131,7 @@ func (ds *HamtShard) SetPrefix(prefix *cid.Prefix) {
131
ds.prefix = prefix
132
}
133
134
-// GetPrefix gets the CID Prefix, may be nil if unset
134
+// Prefix gets the CID Prefix, may be nil if unset
135
func (ds *HamtShard) Prefix() *cid.Prefix {
136
return ds.prefix
137
}
unixfs/io/dirbuilder.go
+1
@@ -194,6 +194,7 @@ func (d *Directory) GetNode() (node.Node, error) {
194
return d.shard.Node()
195
}
196
197
+// GetPrefix returns the CID Prefix used
198
func (d *Directory) GetPrefix() *cid.Prefix {
199
if d.shard == nil {
200
return &d.dirnode.Prefix
unixfs/test/utils.go
+1
@@ -31,6 +31,7 @@ func GetDAGServ() mdag.DAGService {
31
return mdagmock.Mock()
32
}
33
34
+// NodeOpts is used by GetNode, GetEmptyNode and GetRandomNode
35
type NodeOpts struct {
36
Prefix cid.Prefix
37
// ForceRawLeaves if true will force the use of raw leaves