Commit 0182e597 authored by Kevin Atkinson's avatar Kevin Atkinson

Documentation.

License: MIT
Signed-off-by: default avatarKevin Atkinson <k@kevina.org>
parent 798afedf
......@@ -42,7 +42,10 @@ var v1CidPrefix = cid.Prefix{
Version: 1,
}
// V0CidPrefix returns a prefix for CIDv0
func V0CidPrefix() cid.Prefix { return v0CidPrefix }
// V1CidPrefix returns a prefix for CIDv1 with the default settings
func V1CidPrefix() cid.Prefix { return v1CidPrefix }
// PrefixForCidVersion returns the Protobuf prefix for a given CID version
......
......@@ -131,7 +131,7 @@ func (ds *HamtShard) SetPrefix(prefix *cid.Prefix) {
ds.prefix = prefix
}
// GetPrefix gets the CID Prefix, may be nil if unset
// Prefix gets the CID Prefix, may be nil if unset
func (ds *HamtShard) Prefix() *cid.Prefix {
return ds.prefix
}
......
......@@ -194,6 +194,7 @@ func (d *Directory) GetNode() (node.Node, error) {
return d.shard.Node()
}
// GetPrefix returns the CID Prefix used
func (d *Directory) GetPrefix() *cid.Prefix {
if d.shard == nil {
return &d.dirnode.Prefix
......
......@@ -31,6 +31,7 @@ func GetDAGServ() mdag.DAGService {
return mdagmock.Mock()
}
// NodeOpts is used by GetNode, GetEmptyNode and GetRandomNode
type NodeOpts struct {
Prefix cid.Prefix
// ForceRawLeaves if true will force the use of raw leaves
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment