Documentation ¶
Index ¶
- type ChangeCollectorI
- func (_m *ChangeCollectorI) AddChange(oldNode util.Node, newNode util.Node)
- func (_m *ChangeCollectorI) Clone() util.ChangeCollectorI
- func (_m *ChangeCollectorI) DeleteChange(oldNode util.Node)
- func (_m *ChangeCollectorI) GetChanges() []*util.NodeChange
- func (_m *ChangeCollectorI) GetDeletes() []util.Node
- func (_m *ChangeCollectorI) GetStartRoot() util.Key
- func (_m *ChangeCollectorI) UpdateChanges(ndb util.NodeDB, origin util.Sequence, includeDeletes bool) error
- func (_m *ChangeCollectorI) Validate() error
- type Hashable
- type MPTIteratorHandler
- type MPTMissingNodeHandler
- type MPTSerializable
- type MPTSerializableSize
- type MerklePatriciaTrieI
- func (_m *MerklePatriciaTrieI) Delete(path util.Path) (util.Key, error)
- func (_m *MerklePatriciaTrieI) FindMissingNodes(ctx context.Context) ([]util.Path, []util.Key, error)
- func (_m *MerklePatriciaTrieI) GetChangeCount() int
- func (_m *MerklePatriciaTrieI) GetChanges() (util.Key, []*util.NodeChange, []util.Node, util.Key)
- func (_m *MerklePatriciaTrieI) GetDeletes() []util.Node
- func (_m *MerklePatriciaTrieI) GetNodeDB() util.NodeDB
- func (_m *MerklePatriciaTrieI) GetNodeValue(path util.Path, v util.MPTSerializable) error
- func (_m *MerklePatriciaTrieI) GetNodeValueRaw(path util.Path) ([]byte, error)
- func (_m *MerklePatriciaTrieI) GetPathNodes(path util.Path) ([]util.Node, error)
- func (_m *MerklePatriciaTrieI) GetRoot() util.Key
- func (_m *MerklePatriciaTrieI) GetVersion() util.Sequence
- func (_m *MerklePatriciaTrieI) HasMissingNodes(ctx context.Context) (bool, error)
- func (_m *MerklePatriciaTrieI) Insert(path util.Path, value util.MPTSerializable) (util.Key, error)
- func (_m *MerklePatriciaTrieI) Iterate(ctx context.Context, handler util.MPTIteratorHandler, visitNodeTypes byte) error
- func (_m *MerklePatriciaTrieI) IterateFrom(ctx context.Context, node util.Key, handler util.MPTIteratorHandler, ...) error
- func (_m *MerklePatriciaTrieI) MergeChanges(newRoot util.Key, changes []*util.NodeChange, deletes []util.Node, ...) error
- func (_m *MerklePatriciaTrieI) MergeDB(ndb util.NodeDB, root util.Key) error
- func (_m *MerklePatriciaTrieI) MergeMPTChanges(mpt2 util.MerklePatriciaTrieI) error
- func (_m *MerklePatriciaTrieI) PrettyPrint(w io.Writer) error
- func (_m *MerklePatriciaTrieI) SaveChanges(ctx context.Context, ndb util.NodeDB, includeDeletes bool) error
- func (_m *MerklePatriciaTrieI) SetNodeDB(ndb util.NodeDB)
- func (_m *MerklePatriciaTrieI) SetVersion(version util.Sequence)
- func (_m *MerklePatriciaTrieI) UpdateVersion(ctx context.Context, version util.Sequence, ...) error
- func (_m *MerklePatriciaTrieI) Validate() error
- type MerkleTreeI
- func (_m *MerkleTreeI) ComputeTree(hashes []util.Hashable)
- func (_m *MerkleTreeI) GetPath(hash util.Hashable) *util.MTPath
- func (_m *MerkleTreeI) GetPathByIndex(idx int) *util.MTPath
- func (_m *MerkleTreeI) GetRoot() string
- func (_m *MerkleTreeI) GetTree() []string
- func (_m *MerkleTreeI) SetTree(leavesCount int, tree []string) error
- func (_m *MerkleTreeI) VerifyPath(hash util.Hashable, path *util.MTPath) bool
- type Node
- func (_m *Node) Clone() util.Node
- func (_m *Node) Decode(_a0 []byte) error
- func (_m *Node) Encode() []byte
- func (_m *Node) GetHash() string
- func (_m *Node) GetHashBytes() []byte
- func (_m *Node) GetNodeType() byte
- func (_m *Node) GetOrigin() util.Sequence
- func (_m *Node) GetOriginTracker() util.OriginTrackerI
- func (_m *Node) GetVersion() util.Sequence
- func (_m *Node) Read(r io.Reader) error
- func (_m *Node) SetOrigin(origin util.Sequence)
- func (_m *Node) SetOriginTracker(ot util.OriginTrackerI)
- func (_m *Node) SetVersion(version util.Sequence)
- func (_m *Node) Write(w io.Writer) error
- type NodeDB
- func (_m *NodeDB) DeleteNode(key util.Key) error
- func (_m *NodeDB) GetNode(key util.Key) (util.Node, error)
- func (_m *NodeDB) Iterate(ctx context.Context, handler util.NodeDBIteratorHandler) error
- func (_m *NodeDB) MultiDeleteNode(keys []util.Key) error
- func (_m *NodeDB) MultiGetNode(keys []util.Key) ([]util.Node, error)
- func (_m *NodeDB) MultiPutNode(keys []util.Key, nodes []util.Node) error
- func (_m *NodeDB) PruneBelowVersion(ctx context.Context, version int64) error
- func (_m *NodeDB) PutNode(key util.Key, node util.Node) error
- func (_m *NodeDB) RecordDeadNodes(_a0 []util.Node, _a1 int64) error
- func (_m *NodeDB) Size(ctx context.Context) int64
- type NodeDBIteratorHandler
- type OriginTrackerI
- func (_m *OriginTrackerI) GetOrigin() util.Sequence
- func (_m *OriginTrackerI) GetVersion() util.Sequence
- func (_m *OriginTrackerI) Read(r io.Reader) error
- func (_m *OriginTrackerI) SetOrigin(origin util.Sequence)
- func (_m *OriginTrackerI) SetVersion(version util.Sequence)
- func (_m *OriginTrackerI) Write(w io.Writer) error
- type SecureSerializableValueI
- type Serializable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeCollectorI ¶
ChangeCollectorI is an autogenerated mock type for the ChangeCollectorI type
func NewChangeCollectorI ¶
func NewChangeCollectorI(t mockConstructorTestingTNewChangeCollectorI) *ChangeCollectorI
NewChangeCollectorI creates a new instance of ChangeCollectorI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ChangeCollectorI) AddChange ¶
func (_m *ChangeCollectorI) AddChange(oldNode util.Node, newNode util.Node)
AddChange provides a mock function with given fields: oldNode, newNode
func (*ChangeCollectorI) Clone ¶
func (_m *ChangeCollectorI) Clone() util.ChangeCollectorI
Clone provides a mock function with given fields:
func (*ChangeCollectorI) DeleteChange ¶
func (_m *ChangeCollectorI) DeleteChange(oldNode util.Node)
DeleteChange provides a mock function with given fields: oldNode
func (*ChangeCollectorI) GetChanges ¶
func (_m *ChangeCollectorI) GetChanges() []*util.NodeChange
GetChanges provides a mock function with given fields:
func (*ChangeCollectorI) GetDeletes ¶
func (_m *ChangeCollectorI) GetDeletes() []util.Node
GetDeletes provides a mock function with given fields:
func (*ChangeCollectorI) GetStartRoot ¶
func (_m *ChangeCollectorI) GetStartRoot() util.Key
GetStartRoot provides a mock function with given fields:
func (*ChangeCollectorI) UpdateChanges ¶
func (_m *ChangeCollectorI) UpdateChanges(ndb util.NodeDB, origin util.Sequence, includeDeletes bool) error
UpdateChanges provides a mock function with given fields: ndb, origin, includeDeletes
func (*ChangeCollectorI) Validate ¶
func (_m *ChangeCollectorI) Validate() error
Validate provides a mock function with given fields:
type Hashable ¶
Hashable is an autogenerated mock type for the Hashable type
func NewHashable ¶
func NewHashable(t mockConstructorTestingTNewHashable) *Hashable
NewHashable creates a new instance of Hashable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Hashable) GetHashBytes ¶
GetHashBytes provides a mock function with given fields:
type MPTIteratorHandler ¶
MPTIteratorHandler is an autogenerated mock type for the MPTIteratorHandler type
func NewMPTIteratorHandler ¶
func NewMPTIteratorHandler(t mockConstructorTestingTNewMPTIteratorHandler) *MPTIteratorHandler
NewMPTIteratorHandler creates a new instance of MPTIteratorHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type MPTMissingNodeHandler ¶
MPTMissingNodeHandler is an autogenerated mock type for the MPTMissingNodeHandler type
func NewMPTMissingNodeHandler ¶
func NewMPTMissingNodeHandler(t mockConstructorTestingTNewMPTMissingNodeHandler) *MPTMissingNodeHandler
NewMPTMissingNodeHandler creates a new instance of MPTMissingNodeHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type MPTSerializable ¶
MPTSerializable is an autogenerated mock type for the MPTSerializable type
func NewMPTSerializable ¶
func NewMPTSerializable(t mockConstructorTestingTNewMPTSerializable) *MPTSerializable
NewMPTSerializable creates a new instance of MPTSerializable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MPTSerializable) MarshalMsg ¶
func (_m *MPTSerializable) MarshalMsg(_a0 []byte) ([]byte, error)
MarshalMsg provides a mock function with given fields: _a0
func (*MPTSerializable) UnmarshalMsg ¶
func (_m *MPTSerializable) UnmarshalMsg(_a0 []byte) ([]byte, error)
UnmarshalMsg provides a mock function with given fields: _a0
type MPTSerializableSize ¶
MPTSerializableSize is an autogenerated mock type for the MPTSerializableSize type
func NewMPTSerializableSize ¶
func NewMPTSerializableSize(t mockConstructorTestingTNewMPTSerializableSize) *MPTSerializableSize
NewMPTSerializableSize creates a new instance of MPTSerializableSize. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MPTSerializableSize) MarshalMsg ¶
func (_m *MPTSerializableSize) MarshalMsg(_a0 []byte) ([]byte, error)
MarshalMsg provides a mock function with given fields: _a0
func (*MPTSerializableSize) Msgsize ¶
func (_m *MPTSerializableSize) Msgsize() int
Msgsize provides a mock function with given fields:
func (*MPTSerializableSize) UnmarshalMsg ¶
func (_m *MPTSerializableSize) UnmarshalMsg(_a0 []byte) ([]byte, error)
UnmarshalMsg provides a mock function with given fields: _a0
type MerklePatriciaTrieI ¶
MerklePatriciaTrieI is an autogenerated mock type for the MerklePatriciaTrieI type
func NewMerklePatriciaTrieI ¶
func NewMerklePatriciaTrieI(t mockConstructorTestingTNewMerklePatriciaTrieI) *MerklePatriciaTrieI
NewMerklePatriciaTrieI creates a new instance of MerklePatriciaTrieI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MerklePatriciaTrieI) FindMissingNodes ¶
func (_m *MerklePatriciaTrieI) FindMissingNodes(ctx context.Context) ([]util.Path, []util.Key, error)
FindMissingNodes provides a mock function with given fields: ctx
func (*MerklePatriciaTrieI) GetChangeCount ¶
func (_m *MerklePatriciaTrieI) GetChangeCount() int
GetChangeCount provides a mock function with given fields:
func (*MerklePatriciaTrieI) GetChanges ¶
func (_m *MerklePatriciaTrieI) GetChanges() (util.Key, []*util.NodeChange, []util.Node, util.Key)
GetChanges provides a mock function with given fields:
func (*MerklePatriciaTrieI) GetDeletes ¶
func (_m *MerklePatriciaTrieI) GetDeletes() []util.Node
GetDeletes provides a mock function with given fields:
func (*MerklePatriciaTrieI) GetNodeDB ¶
func (_m *MerklePatriciaTrieI) GetNodeDB() util.NodeDB
GetNodeDB provides a mock function with given fields:
func (*MerklePatriciaTrieI) GetNodeValue ¶
func (_m *MerklePatriciaTrieI) GetNodeValue(path util.Path, v util.MPTSerializable) error
GetNodeValue provides a mock function with given fields: path, v
func (*MerklePatriciaTrieI) GetNodeValueRaw ¶
func (_m *MerklePatriciaTrieI) GetNodeValueRaw(path util.Path) ([]byte, error)
GetNodeValueRaw provides a mock function with given fields: path
func (*MerklePatriciaTrieI) GetPathNodes ¶
GetPathNodes provides a mock function with given fields: path
func (*MerklePatriciaTrieI) GetRoot ¶
func (_m *MerklePatriciaTrieI) GetRoot() util.Key
GetRoot provides a mock function with given fields:
func (*MerklePatriciaTrieI) GetVersion ¶
func (_m *MerklePatriciaTrieI) GetVersion() util.Sequence
GetVersion provides a mock function with given fields:
func (*MerklePatriciaTrieI) HasMissingNodes ¶
func (_m *MerklePatriciaTrieI) HasMissingNodes(ctx context.Context) (bool, error)
HasMissingNodes provides a mock function with given fields: ctx
func (*MerklePatriciaTrieI) Insert ¶
func (_m *MerklePatriciaTrieI) Insert(path util.Path, value util.MPTSerializable) (util.Key, error)
Insert provides a mock function with given fields: path, value
func (*MerklePatriciaTrieI) Iterate ¶
func (_m *MerklePatriciaTrieI) Iterate(ctx context.Context, handler util.MPTIteratorHandler, visitNodeTypes byte) error
Iterate provides a mock function with given fields: ctx, handler, visitNodeTypes
func (*MerklePatriciaTrieI) IterateFrom ¶
func (_m *MerklePatriciaTrieI) IterateFrom(ctx context.Context, node util.Key, handler util.MPTIteratorHandler, visitNodeTypes byte) error
IterateFrom provides a mock function with given fields: ctx, node, handler, visitNodeTypes
func (*MerklePatriciaTrieI) MergeChanges ¶
func (_m *MerklePatriciaTrieI) MergeChanges(newRoot util.Key, changes []*util.NodeChange, deletes []util.Node, startRoot util.Key) error
MergeChanges provides a mock function with given fields: newRoot, changes, deletes, startRoot
func (*MerklePatriciaTrieI) MergeMPTChanges ¶
func (_m *MerklePatriciaTrieI) MergeMPTChanges(mpt2 util.MerklePatriciaTrieI) error
MergeMPTChanges provides a mock function with given fields: mpt2
func (*MerklePatriciaTrieI) PrettyPrint ¶
func (_m *MerklePatriciaTrieI) PrettyPrint(w io.Writer) error
PrettyPrint provides a mock function with given fields: w
func (*MerklePatriciaTrieI) SaveChanges ¶
func (_m *MerklePatriciaTrieI) SaveChanges(ctx context.Context, ndb util.NodeDB, includeDeletes bool) error
SaveChanges provides a mock function with given fields: ctx, ndb, includeDeletes
func (*MerklePatriciaTrieI) SetNodeDB ¶
func (_m *MerklePatriciaTrieI) SetNodeDB(ndb util.NodeDB)
SetNodeDB provides a mock function with given fields: ndb
func (*MerklePatriciaTrieI) SetVersion ¶
func (_m *MerklePatriciaTrieI) SetVersion(version util.Sequence)
SetVersion provides a mock function with given fields: version
func (*MerklePatriciaTrieI) UpdateVersion ¶
func (_m *MerklePatriciaTrieI) UpdateVersion(ctx context.Context, version util.Sequence, missingNodeHander util.MPTMissingNodeHandler) error
UpdateVersion provides a mock function with given fields: ctx, version, missingNodeHander
func (*MerklePatriciaTrieI) Validate ¶
func (_m *MerklePatriciaTrieI) Validate() error
Validate provides a mock function with given fields:
type MerkleTreeI ¶
MerkleTreeI is an autogenerated mock type for the MerkleTreeI type
func NewMerkleTreeI ¶
func NewMerkleTreeI(t mockConstructorTestingTNewMerkleTreeI) *MerkleTreeI
NewMerkleTreeI creates a new instance of MerkleTreeI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MerkleTreeI) ComputeTree ¶
func (_m *MerkleTreeI) ComputeTree(hashes []util.Hashable)
ComputeTree provides a mock function with given fields: hashes
func (*MerkleTreeI) GetPath ¶
func (_m *MerkleTreeI) GetPath(hash util.Hashable) *util.MTPath
GetPath provides a mock function with given fields: hash
func (*MerkleTreeI) GetPathByIndex ¶
func (_m *MerkleTreeI) GetPathByIndex(idx int) *util.MTPath
GetPathByIndex provides a mock function with given fields: idx
func (*MerkleTreeI) GetRoot ¶
func (_m *MerkleTreeI) GetRoot() string
GetRoot provides a mock function with given fields:
func (*MerkleTreeI) GetTree ¶
func (_m *MerkleTreeI) GetTree() []string
GetTree provides a mock function with given fields:
func (*MerkleTreeI) SetTree ¶
func (_m *MerkleTreeI) SetTree(leavesCount int, tree []string) error
SetTree provides a mock function with given fields: leavesCount, tree
func (*MerkleTreeI) VerifyPath ¶
VerifyPath provides a mock function with given fields: hash, path
type Node ¶
Node is an autogenerated mock type for the Node type
func NewNode ¶
func NewNode(t mockConstructorTestingTNewNode) *Node
NewNode creates a new instance of Node. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Node) GetHashBytes ¶
GetHashBytes provides a mock function with given fields:
func (*Node) GetNodeType ¶
GetNodeType provides a mock function with given fields:
func (*Node) GetOriginTracker ¶
func (_m *Node) GetOriginTracker() util.OriginTrackerI
GetOriginTracker provides a mock function with given fields:
func (*Node) GetVersion ¶
GetVersion provides a mock function with given fields:
func (*Node) SetOriginTracker ¶
func (_m *Node) SetOriginTracker(ot util.OriginTrackerI)
SetOriginTracker provides a mock function with given fields: ot
func (*Node) SetVersion ¶
SetVersion provides a mock function with given fields: version
type NodeDB ¶
NodeDB is an autogenerated mock type for the NodeDB type
func NewNodeDB ¶
func NewNodeDB(t mockConstructorTestingTNewNodeDB) *NodeDB
NewNodeDB creates a new instance of NodeDB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*NodeDB) DeleteNode ¶
DeleteNode provides a mock function with given fields: key
func (*NodeDB) MultiDeleteNode ¶
MultiDeleteNode provides a mock function with given fields: keys
func (*NodeDB) MultiGetNode ¶
MultiGetNode provides a mock function with given fields: keys
func (*NodeDB) MultiPutNode ¶
MultiPutNode provides a mock function with given fields: keys, nodes
func (*NodeDB) PruneBelowVersion ¶
PruneBelowVersion provides a mock function with given fields: ctx, version
func (*NodeDB) RecordDeadNodes ¶
RecordDeadNodes provides a mock function with given fields: _a0, _a1
type NodeDBIteratorHandler ¶
NodeDBIteratorHandler is an autogenerated mock type for the NodeDBIteratorHandler type
func NewNodeDBIteratorHandler ¶
func NewNodeDBIteratorHandler(t mockConstructorTestingTNewNodeDBIteratorHandler) *NodeDBIteratorHandler
NewNodeDBIteratorHandler creates a new instance of NodeDBIteratorHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type OriginTrackerI ¶
OriginTrackerI is an autogenerated mock type for the OriginTrackerI type
func NewOriginTrackerI ¶
func NewOriginTrackerI(t mockConstructorTestingTNewOriginTrackerI) *OriginTrackerI
NewOriginTrackerI creates a new instance of OriginTrackerI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*OriginTrackerI) GetOrigin ¶
func (_m *OriginTrackerI) GetOrigin() util.Sequence
GetOrigin provides a mock function with given fields:
func (*OriginTrackerI) GetVersion ¶
func (_m *OriginTrackerI) GetVersion() util.Sequence
GetVersion provides a mock function with given fields:
func (*OriginTrackerI) Read ¶
func (_m *OriginTrackerI) Read(r io.Reader) error
Read provides a mock function with given fields: r
func (*OriginTrackerI) SetOrigin ¶
func (_m *OriginTrackerI) SetOrigin(origin util.Sequence)
SetOrigin provides a mock function with given fields: origin
func (*OriginTrackerI) SetVersion ¶
func (_m *OriginTrackerI) SetVersion(version util.Sequence)
SetVersion provides a mock function with given fields: version
type SecureSerializableValueI ¶
SecureSerializableValueI is an autogenerated mock type for the SecureSerializableValueI type
func NewSecureSerializableValueI ¶
func NewSecureSerializableValueI(t mockConstructorTestingTNewSecureSerializableValueI) *SecureSerializableValueI
NewSecureSerializableValueI creates a new instance of SecureSerializableValueI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*SecureSerializableValueI) GetHash ¶
func (_m *SecureSerializableValueI) GetHash() string
GetHash provides a mock function with given fields:
func (*SecureSerializableValueI) GetHashBytes ¶
func (_m *SecureSerializableValueI) GetHashBytes() []byte
GetHashBytes provides a mock function with given fields:
func (*SecureSerializableValueI) MarshalMsg ¶
func (_m *SecureSerializableValueI) MarshalMsg(_a0 []byte) ([]byte, error)
MarshalMsg provides a mock function with given fields: _a0
func (*SecureSerializableValueI) UnmarshalMsg ¶
func (_m *SecureSerializableValueI) UnmarshalMsg(_a0 []byte) ([]byte, error)
UnmarshalMsg provides a mock function with given fields: _a0
type Serializable ¶
Serializable is an autogenerated mock type for the Serializable type
func NewSerializable ¶
func NewSerializable(t mockConstructorTestingTNewSerializable) *Serializable
NewSerializable creates a new instance of Serializable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Serializable) Decode ¶
func (_m *Serializable) Decode(_a0 []byte) error
Decode provides a mock function with given fields: _a0
func (*Serializable) Encode ¶
func (_m *Serializable) Encode() []byte
Encode provides a mock function with given fields: