Versions in this module Expand all Collapse all v0 v0.0.2 Oct 31, 2023 v0.0.1 Oct 30, 2023 Changes in this version + var ErrMockMarshalizer = errors.New("MarshalizerMock generic error") + type AppStatusHandlerMock struct + func (a *AppStatusHandlerMock) AddUint64(key string, val uint64) + func (a *AppStatusHandlerMock) Close() + func (a *AppStatusHandlerMock) Decrement(key string) + func (a *AppStatusHandlerMock) Increment(key string) + func (a *AppStatusHandlerMock) IsInterfaceNil() bool + func (a *AppStatusHandlerMock) SetInt64Value(key string, value int64) + func (a *AppStatusHandlerMock) SetStringValue(key string, value string) + func (a *AppStatusHandlerMock) SetUInt64Value(key string, value uint64) + type EpochStartNotifierStub struct + NotifyAllCalled func(hdr data.HeaderHandler) + NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler) + RegisterHandlerCalled func(handler epochStart.ActionHandler) + UnregisterHandlerCalled func(handler epochStart.ActionHandler) + func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool + func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler) + func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler) + func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler) + func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler) + type HasherMock struct + func (HasherMock) Size() int + func (sha HasherMock) Compute(s string) []byte + func (sha HasherMock) EmptyHash() []byte + func (sha HasherMock) IsInterfaceNil() bool + type KeyGenMock struct + GeneratePairMock func() (crypto.PrivateKey, crypto.PublicKey) + PrivateKeyFromByteArrayMock func(b []byte) (crypto.PrivateKey, error) + PublicKeyFromByteArrayMock func(b []byte) (crypto.PublicKey, error) + SuiteMock func() crypto.Suite + func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error + func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey) + func (keyGen *KeyGenMock) IsInterfaceNil() bool + func (keyGen *KeyGenMock) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error) + func (keyGen *KeyGenMock) PublicKeyFromByteArray(_ []byte) (crypto.PublicKey, error) + func (keyGen *KeyGenMock) Suite() crypto.Suite + type MarshalizerMock struct + Fail bool + func (mm MarshalizerMock) IsInterfaceNil() bool + func (mm MarshalizerMock) Marshal(obj interface{}) ([]byte, error) + func (mm MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error + type MultipleShardsCoordinatorMock struct + ComputeIdCalled func(address []byte) uint32 + CurrentShard uint32 + NoShards uint32 + SelfIDCalled func() uint32 + func NewMultiShardsCoordinatorMock(nrShard uint32) *MultipleShardsCoordinatorMock + func (scm *MultipleShardsCoordinatorMock) CommunicationIdentifier(destShardID uint32) string + func (scm *MultipleShardsCoordinatorMock) ComputeId(address []byte) uint32 + func (scm *MultipleShardsCoordinatorMock) IsInterfaceNil() bool + func (scm *MultipleShardsCoordinatorMock) NumberOfShards() uint32 + func (scm *MultipleShardsCoordinatorMock) SameShard(_, _ []byte) bool + func (scm *MultipleShardsCoordinatorMock) SelfId() uint32 + func (scm *MultipleShardsCoordinatorMock) SetNoShards(noShards uint32) + func (scm *MultipleShardsCoordinatorMock) SetSelfId(_ uint32) error + type NodesSetupStub struct + InitialEligibleNodesPubKeysForShardCalled func(shardId uint32) ([]string, error) + InitialNodesPubKeysCalled func() map[uint32][]string + func (n *NodesSetupStub) InitialEligibleNodesPubKeysForShard(shardId uint32) ([]string, error) + func (n *NodesSetupStub) InitialNodesPubKeys() map[uint32][]string + func (n *NodesSetupStub) IsInterfaceNil() bool + type PathManagerStub struct + PathForEpochCalled func(shardId string, epoch uint32, identifier string) string + PathForStaticCalled func(shardId string, identifier string) string + func (p *PathManagerStub) IsInterfaceNil() bool + func (p *PathManagerStub) PathForEpoch(shardId string, epoch uint32, identifier string) string + func (p *PathManagerStub) PathForStatic(shardId string, identifier string) string + type PointMock struct + GetUnderlyingObjStub func() interface{} + MarshalBinaryStub func(x, y int) ([]byte, error) + UnmarshalBinaryStub func([]byte) (x, y int, err error) + X int + Y int + func (po *PointMock) Add(_ crypto.Point) (crypto.Point, error) + func (po *PointMock) Base() crypto.Point + func (po *PointMock) Clone() crypto.Point + func (po *PointMock) Equal(p crypto.Point) (bool, error) + func (po *PointMock) GetUnderlyingObj() interface{} + func (po *PointMock) IsInterfaceNil() bool + func (po *PointMock) MarshalBinary() ([]byte, error) + func (po *PointMock) Mul(s crypto.Scalar) (crypto.Point, error) + func (po *PointMock) Neg() crypto.Point + func (po *PointMock) Null() crypto.Point + func (po *PointMock) Pick() (crypto.Point, error) + func (po *PointMock) Set(_ crypto.Point) error + func (po *PointMock) Sub(_ crypto.Point) (crypto.Point, error) + func (po *PointMock) UnmarshalBinary(point []byte) error + type PrivateKeyMock struct + GeneratePublicMock func() crypto.PublicKey + ScalarMock func() crypto.Scalar + SuiteMock func() crypto.Suite + ToByteArrayMock func() ([]byte, error) + func (privKey *PrivateKeyMock) GeneratePublic() crypto.PublicKey + func (privKey *PrivateKeyMock) IsInterfaceNil() bool + func (privKey *PrivateKeyMock) Scalar() crypto.Scalar + func (privKey *PrivateKeyMock) Suite() crypto.Suite + func (privKey *PrivateKeyMock) ToByteArray() ([]byte, error) + type PubkeyConverterStub struct + DecodeCalled func(humanReadable string) ([]byte, error) + EncodeCalled func(pkBytes []byte) string + LenCalled func() int + func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error) + func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) string + func (pcs *PubkeyConverterStub) IsInterfaceNil() bool + func (pcs *PubkeyConverterStub) Len() int + type PublicKeyMock struct + PointMock func() crypto.Point + SuiteMock func() crypto.Suite + ToByteArrayMock func() ([]byte, error) + func (pubKey *PublicKeyMock) IsInterfaceNil() bool + func (pubKey *PublicKeyMock) Point() crypto.Point + func (pubKey *PublicKeyMock) Suite() crypto.Suite + func (pubKey *PublicKeyMock) ToByteArray() ([]byte, error) + type ScalarMock struct + GetUnderlyingObjStub func() interface{} + MarshalBinaryStub func(x int) ([]byte, error) + UnmarshalBinaryStub func([]byte) (int, error) + X int + func (sm *ScalarMock) Add(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Clone() crypto.Scalar + func (sm *ScalarMock) Div(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Equal(_ crypto.Scalar) (bool, error) + func (sm *ScalarMock) GetUnderlyingObj() interface{} + func (sm *ScalarMock) Inv(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) IsInterfaceNil() bool + func (sm *ScalarMock) MarshalBinary() ([]byte, error) + func (sm *ScalarMock) Mul(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Neg() crypto.Scalar + func (sm *ScalarMock) One() crypto.Scalar + func (sm *ScalarMock) Pick() (crypto.Scalar, error) + func (sm *ScalarMock) Set(_ crypto.Scalar) error + func (sm *ScalarMock) SetBytes([]byte) (crypto.Scalar, error) + func (sm *ScalarMock) SetInt64(_ int64) + func (sm *ScalarMock) Sub(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) UnmarshalBinary(val []byte) error + func (sm *ScalarMock) Zero() crypto.Scalar + type Streamer struct + func NewStreamer() *Streamer + func (stream *Streamer) XORKeyStream(dst, src []byte) + type SuiteStub struct + CreateKeyPairStub func() (crypto.Scalar, crypto.Point) + CreatePointForScalarStub func(scalar crypto.Scalar) (crypto.Point, error) + CreatePointStub func() crypto.Point + CreateScalarStub func() crypto.Scalar + GetUnderlyingSuiteStub func() interface{} + IsPointValidStub func([]byte) error + PointLenStub func() int + RandomStreamStub func() cipher.Stream + ScalarLenStub func() int + StringStub func() string + func (s *SuiteStub) CheckPointValid(pointBytes []byte) error + func (s *SuiteStub) CreateKeyPair() (crypto.Scalar, crypto.Point) + func (s *SuiteStub) CreatePoint() crypto.Point + func (s *SuiteStub) CreatePointForScalar(scalar crypto.Scalar) (crypto.Point, error) + func (s *SuiteStub) CreateScalar() crypto.Scalar + func (s *SuiteStub) GetUnderlyingSuite() interface{} + func (s *SuiteStub) IsInterfaceNil() bool + func (s *SuiteStub) PointLen() int + func (s *SuiteStub) RandomStream() cipher.Stream + func (s *SuiteStub) ScalarLen() int + func (s *SuiteStub) String() string