merkle

package
v0.0.0-...-a4c8edf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Tree = 0x87

0x87 seems to be free: https://github.com/multiformats/multicodec/blob/master/table.csv

Variables

This section is empty.

Functions

func ComputeNodes

func ComputeNodes(items [][]byte) ([]byte, []node.Node)

func TreeLeavesJSONInputParser

func TreeLeavesJSONInputParser(r io.Reader, _mhType uint64, _mhLen int) ([]node.Node, error)

func TreeNodeParser

func TreeNodeParser(block blocks.Block) (node.Node, error)

Types

type InnerNode

type InnerNode struct {
	// contains filtered or unexported fields
}

func (InnerNode) Cid

func (i InnerNode) Cid() cid.Cid

func (InnerNode) Copy

func (i InnerNode) Copy() node.Node
func (i InnerNode) Links() []*node.Link

func (InnerNode) Loggable

func (i InnerNode) Loggable() map[string]interface{}

func (InnerNode) RawData

func (i InnerNode) RawData() []byte

func (InnerNode) Resolve

func (i InnerNode) Resolve(path []string) (interface{}, []string, error)
func (i InnerNode) ResolveLink(path []string) (*node.Link, []string, error)

func (InnerNode) Size

func (i InnerNode) Size() (uint64, error)

func (InnerNode) Stat

func (i InnerNode) Stat() (*node.NodeStat, error)

func (InnerNode) String

func (i InnerNode) String() string

func (InnerNode) Tree

func (i InnerNode) Tree(path string, depth int) []string

type JsonLeaves

type JsonLeaves struct {
	Leaves []Share
}

type LeafNode

type LeafNode struct {
	RawHash []byte
	Data    []byte
}

func (LeafNode) Cid

func (l LeafNode) Cid() cid.Cid

func (LeafNode) Copy

func (l LeafNode) Copy() node.Node
func (l LeafNode) Links() []*node.Link

func (LeafNode) Loggable

func (l LeafNode) Loggable() map[string]interface{}

func (LeafNode) RawData

func (l LeafNode) RawData() []byte

func (LeafNode) Resolve

func (l LeafNode) Resolve(path []string) (interface{}, []string, error)
func (l LeafNode) ResolveLink(path []string) (*node.Link, []string, error)

func (LeafNode) Size

func (l LeafNode) Size() (uint64, error)

func (LeafNode) Stat

func (l LeafNode) Stat() (*node.NodeStat, error)

func (LeafNode) String

func (l LeafNode) String() string

func (LeafNode) Tree

func (l LeafNode) Tree(path string, depth int) []string

type Share

type Share struct {
	// TODO add namespace.ID
	Data []byte
}

type TreePlugin

type TreePlugin struct{}

func (TreePlugin) Init

func (t TreePlugin) Init(env *plugin.Environment) error

func (TreePlugin) Name

func (t TreePlugin) Name() string

func (TreePlugin) RegisterBlockDecoders

func (t TreePlugin) RegisterBlockDecoders(dec node.BlockDecoder) error

func (TreePlugin) RegisterInputEncParsers

func (t TreePlugin) RegisterInputEncParsers(iec coredag.InputEncParsers) error

func (TreePlugin) Start

func (t TreePlugin) Start(api coreiface.CoreAPI) error

func (TreePlugin) Version

func (t TreePlugin) Version() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL