mocks

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeCollectorI

type ChangeCollectorI struct {
	mock.Mock
}

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

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

type Hashable struct {
	mock.Mock
}

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) GetHash

func (_m *Hashable) GetHash() string

GetHash provides a mock function with given fields:

func (*Hashable) GetHashBytes

func (_m *Hashable) GetHashBytes() []byte

GetHashBytes provides a mock function with given fields:

type MPTIteratorHandler

type MPTIteratorHandler struct {
	mock.Mock
}

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.

func (*MPTIteratorHandler) Execute

func (_m *MPTIteratorHandler) Execute(ctx context.Context, path util.Path, key util.Key, node util.Node) error

Execute provides a mock function with given fields: ctx, path, key, node

type MPTMissingNodeHandler

type MPTMissingNodeHandler struct {
	mock.Mock
}

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.

func (*MPTMissingNodeHandler) Execute

func (_m *MPTMissingNodeHandler) Execute(ctx context.Context, path util.Path, key util.Key) error

Execute provides a mock function with given fields: ctx, path, key

type MPTSerializable

type MPTSerializable struct {
	mock.Mock
}

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

type MPTSerializableSize struct {
	mock.Mock
}

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

type MerklePatriciaTrieI struct {
	mock.Mock
}

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) Delete

func (_m *MerklePatriciaTrieI) Delete(path util.Path) (util.Key, error)

Delete provides a mock function with given fields: path

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

func (_m *MerklePatriciaTrieI) GetPathNodes(path util.Path) ([]util.Node, error)

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) MergeDB

func (_m *MerklePatriciaTrieI) MergeDB(ndb util.NodeDB, root util.Key) error

MergeDB provides a mock function with given fields: ndb, root

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

type MerkleTreeI struct {
	mock.Mock
}

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

func (_m *MerkleTreeI) VerifyPath(hash util.Hashable, path *util.MTPath) bool

VerifyPath provides a mock function with given fields: hash, path

type Node

type Node struct {
	mock.Mock
}

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) Clone

func (_m *Node) Clone() util.Node

Clone provides a mock function with given fields:

func (*Node) Decode

func (_m *Node) Decode(_a0 []byte) error

Decode provides a mock function with given fields: _a0

func (*Node) Encode

func (_m *Node) Encode() []byte

Encode provides a mock function with given fields:

func (*Node) GetHash

func (_m *Node) GetHash() string

GetHash provides a mock function with given fields:

func (*Node) GetHashBytes

func (_m *Node) GetHashBytes() []byte

GetHashBytes provides a mock function with given fields:

func (*Node) GetNodeType

func (_m *Node) GetNodeType() byte

GetNodeType provides a mock function with given fields:

func (*Node) GetOrigin

func (_m *Node) GetOrigin() util.Sequence

GetOrigin 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

func (_m *Node) GetVersion() util.Sequence

GetVersion provides a mock function with given fields:

func (*Node) Read

func (_m *Node) Read(r io.Reader) error

Read provides a mock function with given fields: r

func (*Node) SetOrigin

func (_m *Node) SetOrigin(origin util.Sequence)

SetOrigin provides a mock function with given fields: origin

func (*Node) SetOriginTracker

func (_m *Node) SetOriginTracker(ot util.OriginTrackerI)

SetOriginTracker provides a mock function with given fields: ot

func (*Node) SetVersion

func (_m *Node) SetVersion(version util.Sequence)

SetVersion provides a mock function with given fields: version

func (*Node) Write

func (_m *Node) Write(w io.Writer) error

Write provides a mock function with given fields: w

type NodeDB

type NodeDB struct {
	mock.Mock
}

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

func (_m *NodeDB) DeleteNode(key util.Key) error

DeleteNode provides a mock function with given fields: key

func (*NodeDB) GetNode

func (_m *NodeDB) GetNode(key util.Key) (util.Node, error)

GetNode provides a mock function with given fields: key

func (*NodeDB) Iterate

func (_m *NodeDB) Iterate(ctx context.Context, handler util.NodeDBIteratorHandler) error

Iterate provides a mock function with given fields: ctx, handler

func (*NodeDB) MultiDeleteNode

func (_m *NodeDB) MultiDeleteNode(keys []util.Key) error

MultiDeleteNode provides a mock function with given fields: keys

func (*NodeDB) MultiGetNode

func (_m *NodeDB) MultiGetNode(keys []util.Key) ([]util.Node, error)

MultiGetNode provides a mock function with given fields: keys

func (*NodeDB) MultiPutNode

func (_m *NodeDB) MultiPutNode(keys []util.Key, nodes []util.Node) error

MultiPutNode provides a mock function with given fields: keys, nodes

func (*NodeDB) PruneBelowVersion

func (_m *NodeDB) PruneBelowVersion(ctx context.Context, version int64) error

PruneBelowVersion provides a mock function with given fields: ctx, version

func (*NodeDB) PutNode

func (_m *NodeDB) PutNode(key util.Key, node util.Node) error

PutNode provides a mock function with given fields: key, node

func (*NodeDB) RecordDeadNodes

func (_m *NodeDB) RecordDeadNodes(_a0 []util.Node, _a1 int64) error

RecordDeadNodes provides a mock function with given fields: _a0, _a1

func (*NodeDB) Size

func (_m *NodeDB) Size(ctx context.Context) int64

Size provides a mock function with given fields: ctx

type NodeDBIteratorHandler

type NodeDBIteratorHandler struct {
	mock.Mock
}

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.

func (*NodeDBIteratorHandler) Execute

func (_m *NodeDBIteratorHandler) Execute(ctx context.Context, key util.Key, node util.Node) error

Execute provides a mock function with given fields: ctx, key, node

type OriginTrackerI

type OriginTrackerI struct {
	mock.Mock
}

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

func (*OriginTrackerI) Write

func (_m *OriginTrackerI) Write(w io.Writer) error

Write provides a mock function with given fields: w

type SecureSerializableValueI

type SecureSerializableValueI struct {
	mock.Mock
}

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

type Serializable struct {
	mock.Mock
}

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:

Jump to

Keyboard shortcuts

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