Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStream ¶
func NewStream(hasher NodeHasher, roots *[]Node, nodes *[]Node) *stream
Types ¶
type BLAKE2b512 ¶
type BLAKE2b512 struct{}
func (BLAKE2b512) HashLeaf ¶
func (b2b BLAKE2b512) HashLeaf(node PartialNode) []byte
func (BLAKE2b512) HashParent ¶
func (b2b BLAKE2b512) HashParent(left, right Node) []byte
func (BLAKE2b512) Node ¶
func (b2b BLAKE2b512) Node() Node
type DefaultNode ¶
type DefaultNode struct {
// contains filtered or unexported fields
}
func (DefaultNode) Build ¶
func (dn DefaultNode) Build(part PartialNode, hash []byte) Node
func (DefaultNode) Data ¶
func (dn DefaultNode) Data() []byte
func (DefaultNode) Hash ¶
func (dn DefaultNode) Hash() []byte
func (DefaultNode) Index ¶
func (dn DefaultNode) Index() uint64
func (DefaultNode) Kind ¶
func (dn DefaultNode) Kind() nodeKind
func (DefaultNode) Parent ¶
func (dn DefaultNode) Parent() uint64
func (DefaultNode) String ¶
func (dn DefaultNode) String() string
type NodeHasher ¶
type NodeHasher interface { Node() Node HashLeaf(node PartialNode) []byte HashParent(left, right Node) []byte }
type PartialNode ¶
type PartialNode struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.