Documentation
¶
Index ¶
- func NewShardedStorageWithIndexMock() *shardedStorageWithIndexMock
- type BucketIDProviderStub
- type BucketIndexHandlerStub
- func (stub *BucketIndexHandlerStub) AllocateBucketIndex() (uint32, error)
- func (stub *BucketIndexHandlerStub) Close() error
- func (stub *BucketIndexHandlerStub) Get(key []byte) ([]byte, error)
- func (stub *BucketIndexHandlerStub) GetLastIndex() (uint32, error)
- func (stub *BucketIndexHandlerStub) Has(key []byte) error
- func (stub *BucketIndexHandlerStub) IsInterfaceNil() bool
- func (stub *BucketIndexHandlerStub) Put(key, data []byte) error
- type CryptoComponentsHolderFactoryStub
- type EncryptorStub
- type FrozenOtpHandlerStub
- func (stub *FrozenOtpHandlerStub) BackOffTime() uint64
- func (stub *FrozenOtpHandlerStub) IsInterfaceNil() bool
- func (stub *FrozenOtpHandlerStub) IsVerificationAllowedAndIncreaseTrials(account string, ip string) (*requests.OTPCodeVerifyData, error)
- func (stub *FrozenOtpHandlerStub) MaxFailures() uint64
- func (stub *FrozenOtpHandlerStub) Reset(account string, ip string)
- type GuardedTxBuilderStub
- type HttpClientWrapperStub
- type KeysGeneratorStub
- type MarshallerStub
- type MiddlewareStub
- type MongoDBClientStub
- func (m *MongoDBClientStub) Close() error
- func (m *MongoDBClientStub) Get(coll mongodb.CollectionID, key []byte) ([]byte, error)
- func (m *MongoDBClientStub) GetAllCollectionsIDs() []mongodb.CollectionID
- func (m *MongoDBClientStub) GetIndex(coll mongodb.CollectionID, key []byte) (uint32, error)
- func (m *MongoDBClientStub) Has(coll mongodb.CollectionID, key []byte) error
- func (m *MongoDBClientStub) IncrementIndex(coll mongodb.CollectionID, key []byte) (uint32, error)
- func (m *MongoDBClientStub) IsInterfaceNil() bool
- func (m *MongoDBClientStub) Put(coll mongodb.CollectionID, key []byte, data []byte) error
- func (m *MongoDBClientStub) PutIndexIfNotExists(collID mongodb.CollectionID, key []byte, index uint32) error
- func (m *MongoDBClientStub) Remove(coll mongodb.CollectionID, key []byte) error
- type OTPProviderStub
- type RateLimiterMock
- type RateLimiterStub
- type RedisClientStub
- func (r *RedisClientStub) ExpireTime(ctx context.Context, key string) (time.Duration, error)
- func (r *RedisClientStub) Increment(ctx context.Context, key string) (int64, error)
- func (r *RedisClientStub) IsConnected(ctx context.Context) bool
- func (r *RedisClientStub) IsInterfaceNil() bool
- func (r *RedisClientStub) ResetCounterAndKeepTTL(ctx context.Context, key string) error
- func (r *RedisClientStub) SetExpire(ctx context.Context, key string, ttl time.Duration) (bool, error)
- func (r *RedisClientStub) SetExpireIfNotExists(ctx context.Context, key string, ttl time.Duration) (bool, error)
- type ServiceResolverStub
- func (stub *ServiceResolverStub) IsInterfaceNil() bool
- func (stub *ServiceResolverStub) RegisterUser(userAddress core.AddressHandler, request requests.RegistrationPayload) (*requests.OTP, string, error)
- func (stub *ServiceResolverStub) RegisteredUsers() (uint32, error)
- func (stub *ServiceResolverStub) SignMultipleTransactions(userIp string, request requests.SignMultipleTransactions) ([][]byte, *requests.OTPCodeVerifyData, error)
- func (stub *ServiceResolverStub) SignTransaction(userIp string, request requests.SignTransaction) ([]byte, *requests.OTPCodeVerifyData, error)
- func (stub *ServiceResolverStub) TcsConfig() *tcsCore.TcsConfig
- func (stub *ServiceResolverStub) VerifyCode(userAddress core.AddressHandler, userIp string, ...) (*requests.OTPCodeVerifyData, error)
- type ShardedStorageWithIndexStub
- func (stub *ShardedStorageWithIndexStub) AllocateBucketIndex(address []byte) (uint32, error)
- func (stub *ShardedStorageWithIndexStub) AllocateIndex(address []byte) (uint32, error)
- func (stub *ShardedStorageWithIndexStub) Close() error
- func (stub *ShardedStorageWithIndexStub) Count() (uint32, error)
- func (stub *ShardedStorageWithIndexStub) Get(key []byte) ([]byte, error)
- func (stub *ShardedStorageWithIndexStub) Has(key []byte) error
- func (stub *ShardedStorageWithIndexStub) IsInterfaceNil() bool
- func (stub *ShardedStorageWithIndexStub) Put(key, data []byte) error
- type StatusMetricsStub
- type StorerMock
- func (sm *StorerMock) ClearCache()
- func (sm *StorerMock) Close() error
- func (sm *StorerMock) DestroyUnit() error
- func (sm *StorerMock) Get(key []byte) ([]byte, error)
- func (sm *StorerMock) GetBulkFromEpoch(_ [][]byte, _ uint32) ([]storage.KeyValuePair, error)
- func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
- func (sm *StorerMock) GetOldestEpoch() (uint32, error)
- func (sm *StorerMock) Has(key []byte) error
- func (sm *StorerMock) IsInterfaceNil() bool
- func (sm *StorerMock) Put(key, data []byte) error
- func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
- func (sm *StorerMock) Remove(key []byte) error
- func (sm *StorerMock) RemoveFromCurrentEpoch(key []byte) error
- func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) Close() error
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) ([]storage.KeyValuePair, error)
- func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (ss *StorerStub) GetOldestEpoch() (uint32, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
- func (ss *StorerStub) Remove(key []byte) error
- func (ss *StorerStub) RemoveFromCurrentEpoch(key []byte) error
- func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
- type TOTPHandlerStub
- type TotpStub
- type UserEncryptorStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewShardedStorageWithIndexMock ¶
func NewShardedStorageWithIndexMock() *shardedStorageWithIndexMock
NewShardedStorageWithIndexMock -
Types ¶
type BucketIDProviderStub ¶
func (*BucketIDProviderStub) GetBucketForAddress ¶
func (stub *BucketIDProviderStub) GetBucketForAddress(address []byte) uint32
GetBucketForAddress -
func (*BucketIDProviderStub) IsInterfaceNil ¶
func (stub *BucketIDProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type BucketIndexHandlerStub ¶
type BucketIndexHandlerStub struct { PutCalled func(key, data []byte) error GetCalled func(key []byte) ([]byte, error) HasCalled func(key []byte) error CloseCalled func() error AllocateBucketIndexCalled func() (uint32, error) GetLastIndexCalled func() (uint32, error) }
BucketIndexHandlerStub -
func (*BucketIndexHandlerStub) AllocateBucketIndex ¶
func (stub *BucketIndexHandlerStub) AllocateBucketIndex() (uint32, error)
AllocateBucketIndex -
func (*BucketIndexHandlerStub) Get ¶
func (stub *BucketIndexHandlerStub) Get(key []byte) ([]byte, error)
Get -
func (*BucketIndexHandlerStub) GetLastIndex ¶
func (stub *BucketIndexHandlerStub) GetLastIndex() (uint32, error)
GetLastIndex -
func (*BucketIndexHandlerStub) Has ¶
func (stub *BucketIndexHandlerStub) Has(key []byte) error
Has -
func (*BucketIndexHandlerStub) IsInterfaceNil ¶
func (stub *BucketIndexHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BucketIndexHandlerStub) Put ¶
func (stub *BucketIndexHandlerStub) Put(key, data []byte) error
Put -
type CryptoComponentsHolderFactoryStub ¶
type CryptoComponentsHolderFactoryStub struct {
CreateCalled func(privateKeyBytes []byte) (core.CryptoComponentsHolder, error)
}
CryptoComponentsHolderFactoryStub -
func (*CryptoComponentsHolderFactoryStub) Create ¶
func (stub *CryptoComponentsHolderFactoryStub) Create(privateKeyBytes []byte) (core.CryptoComponentsHolder, error)
Create -
func (*CryptoComponentsHolderFactoryStub) IsInterfaceNil ¶
func (stub *CryptoComponentsHolderFactoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type EncryptorStub ¶
type EncryptorStub struct { EncryptDataCalled func(data []byte) ([]byte, error) DecryptDataCalled func(data []byte) ([]byte, error) }
EncryptorStub is a stub implementation of Encryptor
func (*EncryptorStub) DecryptData ¶
func (es *EncryptorStub) DecryptData(data []byte) ([]byte, error)
DecryptData decrypts the provided data
func (*EncryptorStub) EncryptData ¶
func (es *EncryptorStub) EncryptData(data []byte) ([]byte, error)
EncryptData encrypts the provided data
func (*EncryptorStub) IsInterfaceNil ¶
func (es *EncryptorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type FrozenOtpHandlerStub ¶
type FrozenOtpHandlerStub struct { IsVerificationAllowedAndIncreaseTrialsCalled func(account string, ip string) (*requests.OTPCodeVerifyData, error) ResetCalled func(account string, ip string) BackoffTimeCalled func() uint64 MaxFailuresCalled func() uint64 }
FrozenOtpHandlerStub is a stub implementation of the FrozenOtpHandler interface
func (*FrozenOtpHandlerStub) BackOffTime ¶
func (stub *FrozenOtpHandlerStub) BackOffTime() uint64
BackOffTime returns the configured back off time
func (*FrozenOtpHandlerStub) IsInterfaceNil ¶
func (stub *FrozenOtpHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*FrozenOtpHandlerStub) IsVerificationAllowedAndIncreaseTrials ¶
func (stub *FrozenOtpHandlerStub) IsVerificationAllowedAndIncreaseTrials(account string, ip string) (*requests.OTPCodeVerifyData, error)
IsVerificationAllowedAndIncreaseTrials returns true if the verification is allowed for the given account and ip
func (*FrozenOtpHandlerStub) MaxFailures ¶
func (stub *FrozenOtpHandlerStub) MaxFailures() uint64
MaxFailures -
func (*FrozenOtpHandlerStub) Reset ¶
func (stub *FrozenOtpHandlerStub) Reset(account string, ip string)
Reset removes the account and ip from local cache
type GuardedTxBuilderStub ¶
type GuardedTxBuilderStub struct {
ApplyGuardianSignatureCalled func(cryptoHolderGuardian core.CryptoComponentsHolder, tx *transaction.FrontendTransaction) error
}
GuardedTxBuilderStub -
func (*GuardedTxBuilderStub) ApplyGuardianSignature ¶
func (stub *GuardedTxBuilderStub) ApplyGuardianSignature(cryptoHolderGuardian core.CryptoComponentsHolder, tx *transaction.FrontendTransaction) error
ApplyGuardianSignature -
func (*GuardedTxBuilderStub) IsInterfaceNil ¶
func (stub *GuardedTxBuilderStub) IsInterfaceNil() bool
IsInterfaceNil -
type HttpClientWrapperStub ¶
type HttpClientWrapperStub struct { GetAccountCalled func(ctx context.Context, address string) (*data.Account, error) GetGuardianDataCalled func(ctx context.Context, address string) (*api.GuardianData, error) }
HttpClientWrapperStub -
func (*HttpClientWrapperStub) GetAccount ¶
func (stub *HttpClientWrapperStub) GetAccount(ctx context.Context, address string) (*data.Account, error)
GetAccount -
func (*HttpClientWrapperStub) GetGuardianData ¶
func (stub *HttpClientWrapperStub) GetGuardianData(ctx context.Context, address string) (*api.GuardianData, error)
GetGuardianData -
func (*HttpClientWrapperStub) IsInterfaceNil ¶
func (stub *HttpClientWrapperStub) IsInterfaceNil() bool
IsInterfaceNil -
type KeysGeneratorStub ¶
type KeysGeneratorStub struct { GenerateManagedKeyCalled func() (crypto.PrivateKey, error) GenerateKeysCalled func(index uint32) ([]crypto.PrivateKey, error) }
KeysGeneratorStub -
func (*KeysGeneratorStub) GenerateKeys ¶
func (stub *KeysGeneratorStub) GenerateKeys(index uint32) ([]crypto.PrivateKey, error)
GenerateKeys -
func (*KeysGeneratorStub) GenerateManagedKey ¶
func (stub *KeysGeneratorStub) GenerateManagedKey() (crypto.PrivateKey, error)
GenerateManagedKey -
func (*KeysGeneratorStub) IsInterfaceNil ¶
func (stub *KeysGeneratorStub) IsInterfaceNil() bool
IsInterfaceNil -
type MarshallerStub ¶
type MarshallerStub struct { MarshalCalled func(obj interface{}) ([]byte, error) UnmarshalCalled func(obj interface{}, buff []byte) error }
MarshallerStub -
func (*MarshallerStub) IsInterfaceNil ¶
func (stub *MarshallerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MarshallerStub) Marshal ¶
func (stub *MarshallerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshallerStub) Unmarshal ¶
func (stub *MarshallerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MiddlewareStub ¶
type MiddlewareStub struct {
UserAddress string
}
func (*MiddlewareStub) IsInterfaceNil ¶
func (stub *MiddlewareStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MiddlewareStub) MiddlewareHandlerFunc ¶
func (stub *MiddlewareStub) MiddlewareHandlerFunc() gin.HandlerFunc
MiddlewareHandlerFunc -
type MongoDBClientStub ¶
type MongoDBClientStub struct { PutCalled func(coll mongodb.CollectionID, key []byte, data []byte) error GetCalled func(coll mongodb.CollectionID, key []byte) ([]byte, error) HasCalled func(coll mongodb.CollectionID, key []byte) error RemoveCalled func(coll mongodb.CollectionID, key []byte) error GetIndexCalled func(collID mongodb.CollectionID, key []byte) (uint32, error) IncrementIndexCalled func(collID mongodb.CollectionID, key []byte) (uint32, error) PutIndexIfNotExistsCalled func(collID mongodb.CollectionID, key []byte, index uint32) error GetAllCollectionsIDsCalled func() []mongodb.CollectionID CloseCalled func() error }
MongoDBClientStub implemented mongodb client wraper interface
func (*MongoDBClientStub) Get ¶
func (m *MongoDBClientStub) Get(coll mongodb.CollectionID, key []byte) ([]byte, error)
Get -
func (*MongoDBClientStub) GetAllCollectionsIDs ¶
func (m *MongoDBClientStub) GetAllCollectionsIDs() []mongodb.CollectionID
GetAllCollectionsIDs -
func (*MongoDBClientStub) GetIndex ¶
func (m *MongoDBClientStub) GetIndex(coll mongodb.CollectionID, key []byte) (uint32, error)
GetIndex -
func (*MongoDBClientStub) Has ¶
func (m *MongoDBClientStub) Has(coll mongodb.CollectionID, key []byte) error
Has -
func (*MongoDBClientStub) IncrementIndex ¶
func (m *MongoDBClientStub) IncrementIndex(coll mongodb.CollectionID, key []byte) (uint32, error)
IncrementIndex -
func (*MongoDBClientStub) IsInterfaceNil ¶
func (m *MongoDBClientStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MongoDBClientStub) Put ¶
func (m *MongoDBClientStub) Put(coll mongodb.CollectionID, key []byte, data []byte) error
Put -
func (*MongoDBClientStub) PutIndexIfNotExists ¶
func (m *MongoDBClientStub) PutIndexIfNotExists(collID mongodb.CollectionID, key []byte, index uint32) error
PutIndexIfNotExists -
func (*MongoDBClientStub) Remove ¶
func (m *MongoDBClientStub) Remove(coll mongodb.CollectionID, key []byte) error
Remove -
type OTPProviderStub ¶
type OTPProviderStub struct { GenerateTOTPCalled func(account string, hash crypto.Hash) (handlers.OTP, error) TOTPFromBytesCalled func(encryptedMessage []byte) (handlers.OTP, error) }
OTPProviderStub -
func (*OTPProviderStub) GenerateTOTP ¶
GenerateTOTP -
func (*OTPProviderStub) IsInterfaceNil ¶
func (stub *OTPProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*OTPProviderStub) TOTPFromBytes ¶
func (stub *OTPProviderStub) TOTPFromBytes(encryptedMessage []byte) (handlers.OTP, error)
TOTPFromBytes -
type RateLimiterMock ¶
type RateLimiterMock struct {
// contains filtered or unexported fields
}
RateLimiterMock -
func NewRateLimiterMock ¶
func NewRateLimiterMock(maxFailures int, periodLimit int) *RateLimiterMock
NewRateLimiterMock -
func (*RateLimiterMock) CheckAllowedAndIncreaseTrials ¶
func (r *RateLimiterMock) CheckAllowedAndIncreaseTrials(key string) (*redis.RateLimiterResult, error)
CheckAllowedAndIncreaseTrials -
func (*RateLimiterMock) IsInterfaceNil ¶
func (r *RateLimiterMock) IsInterfaceNil() bool
IsInterfaceNil -
type RateLimiterStub ¶
type RateLimiterStub struct { CheckAllowedAndIncreaseTrialsCalled func(key string) (*redis.RateLimiterResult, error) ResetCalled func(key string) error PeriodCalled func() time.Duration RateCalled func() int }
RateLimiterStub -
func (*RateLimiterStub) CheckAllowedAndIncreaseTrials ¶
func (r *RateLimiterStub) CheckAllowedAndIncreaseTrials(key string) (*redis.RateLimiterResult, error)
CheckAllowedAndIncreaseTrials -
func (*RateLimiterStub) IsInterfaceNil ¶
func (r *RateLimiterStub) IsInterfaceNil() bool
IsInterfaceNil -
type RedisClientStub ¶
type RedisClientStub struct { IncrementCalled func(ctx context.Context, key string) (int64, error) SetExpireCalled func(ctx context.Context, key string, ttl time.Duration) (bool, error) SetExpireIfNotExistsCalled func(ctx context.Context, key string, ttl time.Duration) (bool, error) ResetCounterAndKeepTTLCalled func(ctx context.Context, key string) error ExpireTimeCalled func(ctx context.Context, key string) (time.Duration, error) IsConnectedCalled func(ctx context.Context) bool }
RedisClientStub -
func (*RedisClientStub) ExpireTime ¶
ExpireTime -
func (*RedisClientStub) IsConnected ¶
func (r *RedisClientStub) IsConnected(ctx context.Context) bool
IsConnected -
func (*RedisClientStub) IsInterfaceNil ¶
func (r *RedisClientStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RedisClientStub) ResetCounterAndKeepTTL ¶
func (r *RedisClientStub) ResetCounterAndKeepTTL(ctx context.Context, key string) error
ResetCounterAndKeepTTL -
func (*RedisClientStub) SetExpire ¶
func (r *RedisClientStub) SetExpire(ctx context.Context, key string, ttl time.Duration) (bool, error)
SetExpire -
func (*RedisClientStub) SetExpireIfNotExists ¶
func (r *RedisClientStub) SetExpireIfNotExists(ctx context.Context, key string, ttl time.Duration) (bool, error)
SetExpireIfNotExists -
type ServiceResolverStub ¶
type ServiceResolverStub struct { GetGuardianAddressCalled func(userAddress core.AddressHandler) (string, error) RegisterUserCalled func(userAddress core.AddressHandler, request requests.RegistrationPayload) (*requests.OTP, string, error) VerifyCodeCalled func(userAddress core.AddressHandler, userIp string, request requests.VerificationPayload) (*requests.OTPCodeVerifyData, error) SignTransactionCalled func(userIp string, request requests.SignTransaction) ([]byte, *requests.OTPCodeVerifyData, error) SignMultipleTransactionsCalled func(userIp string, request requests.SignMultipleTransactions) ([][]byte, *requests.OTPCodeVerifyData, error) RegisteredUsersCalled func() (uint32, error) TcsConfigCalled func() *tcsCore.TcsConfig }
ServiceResolverStub -
func (*ServiceResolverStub) IsInterfaceNil ¶
func (stub *ServiceResolverStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ServiceResolverStub) RegisterUser ¶
func (stub *ServiceResolverStub) RegisterUser(userAddress core.AddressHandler, request requests.RegistrationPayload) (*requests.OTP, string, error)
RegisterUser -
func (*ServiceResolverStub) RegisteredUsers ¶
func (stub *ServiceResolverStub) RegisteredUsers() (uint32, error)
RegisteredUsers -
func (*ServiceResolverStub) SignMultipleTransactions ¶
func (stub *ServiceResolverStub) SignMultipleTransactions(userIp string, request requests.SignMultipleTransactions) ([][]byte, *requests.OTPCodeVerifyData, error)
SignMultipleTransactions -
func (*ServiceResolverStub) SignTransaction ¶
func (stub *ServiceResolverStub) SignTransaction(userIp string, request requests.SignTransaction) ([]byte, *requests.OTPCodeVerifyData, error)
SignTransaction -
func (*ServiceResolverStub) TcsConfig ¶
func (stub *ServiceResolverStub) TcsConfig() *tcsCore.TcsConfig
TcsConfig returns the current configuration of the TCS
func (*ServiceResolverStub) VerifyCode ¶
func (stub *ServiceResolverStub) VerifyCode(userAddress core.AddressHandler, userIp string, request requests.VerificationPayload) (*requests.OTPCodeVerifyData, error)
VerifyCode -
type ShardedStorageWithIndexStub ¶
type ShardedStorageWithIndexStub struct { AllocateIndexCalled func(address []byte) (uint32, error) PutCalled func(key, data []byte) error GetCalled func(key []byte) ([]byte, error) HasCalled func(key []byte) error CloseCalled func() error AllocateBucketIndexCalled func(address []byte) (uint32, error) CountCalled func() (uint32, error) }
ShardedStorageWithIndexStub -
func (*ShardedStorageWithIndexStub) AllocateBucketIndex ¶
func (stub *ShardedStorageWithIndexStub) AllocateBucketIndex(address []byte) (uint32, error)
AllocateBucketIndex -
func (*ShardedStorageWithIndexStub) AllocateIndex ¶
func (stub *ShardedStorageWithIndexStub) AllocateIndex(address []byte) (uint32, error)
AllocateIndex -
func (*ShardedStorageWithIndexStub) Close ¶
func (stub *ShardedStorageWithIndexStub) Close() error
Close -
func (*ShardedStorageWithIndexStub) Count ¶
func (stub *ShardedStorageWithIndexStub) Count() (uint32, error)
Count -
func (*ShardedStorageWithIndexStub) Get ¶
func (stub *ShardedStorageWithIndexStub) Get(key []byte) ([]byte, error)
Get -
func (*ShardedStorageWithIndexStub) Has ¶
func (stub *ShardedStorageWithIndexStub) Has(key []byte) error
Has -
func (*ShardedStorageWithIndexStub) IsInterfaceNil ¶
func (stub *ShardedStorageWithIndexStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ShardedStorageWithIndexStub) Put ¶
func (stub *ShardedStorageWithIndexStub) Put(key, data []byte) error
Put -
type StatusMetricsStub ¶
type StatusMetricsStub struct { AddRequestDataCalled func(path string, duration time.Duration, status int) GetAllCalled func() map[string]*requests.EndpointMetricsResponse GetMetricsForPrometheusCalled func() string }
StatusMetricsStub -
func (*StatusMetricsStub) AddRequestData ¶
func (s *StatusMetricsStub) AddRequestData(path string, duration time.Duration, status int)
AddRequestData -
func (*StatusMetricsStub) GetAll ¶
func (s *StatusMetricsStub) GetAll() map[string]*requests.EndpointMetricsResponse
GetAll -
func (*StatusMetricsStub) GetMetricsForPrometheus ¶
func (s *StatusMetricsStub) GetMetricsForPrometheus() string
GetMetricsForPrometheus -
func (*StatusMetricsStub) IsInterfaceNil ¶
func (s *StatusMetricsStub) IsInterfaceNil() bool
IsInterfaceNil -
type StorerMock ¶
type StorerMock struct {
// contains filtered or unexported fields
}
StorerMock -
func (*StorerMock) GetBulkFromEpoch ¶
func (sm *StorerMock) GetBulkFromEpoch(_ [][]byte, _ uint32) ([]storage.KeyValuePair, error)
GetBulkFromEpoch -
func (*StorerMock) GetFromEpoch ¶
func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
GetFromEpoch -
func (*StorerMock) GetOldestEpoch ¶
func (sm *StorerMock) GetOldestEpoch() (uint32, error)
GetOldestEpoch -
func (*StorerMock) IsInterfaceNil ¶
func (sm *StorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerMock) PutInEpoch ¶
func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
PutInEpoch -
func (*StorerMock) RemoveFromCurrentEpoch ¶
func (sm *StorerMock) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
func (*StorerMock) SearchFirst ¶
func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
SearchFirst -
type StorerStub ¶
type StorerStub struct { PutCalled func(key, data []byte) error PutInEpochCalled func(key, data []byte, epoch uint32) error GetCalled func(key []byte) ([]byte, error) HasCalled func(key []byte) error SearchFirstCalled func(key []byte) ([]byte, error) RemoveFromCurrentEpochCalled func(key []byte) error RemoveCalled func(key []byte) error ClearCacheCalled func() DestroyUnitCalled func() error GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error) GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) ([]storage.KeyValuePair, error) GetOldestEpochCalled func() (uint32, error) RangeKeysCalled func(handler func(key []byte, val []byte) bool) CloseCalled func() error }
StorerStub -
func (*StorerStub) GetBulkFromEpoch ¶
func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) ([]storage.KeyValuePair, error)
GetBulkFromEpoch -
func (*StorerStub) GetFromEpoch ¶
func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*StorerStub) GetOldestEpoch ¶
func (ss *StorerStub) GetOldestEpoch() (uint32, error)
GetOldestEpoch -
func (*StorerStub) PutInEpoch ¶
func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
PutInEpoch -
func (*StorerStub) RemoveFromCurrentEpoch ¶
func (ss *StorerStub) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
func (*StorerStub) SearchFirst ¶
func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type TOTPHandlerStub ¶
type TOTPHandlerStub struct { CreateTOTPCalled func(account string) (handlers.OTP, error) TOTPFromBytesCalled func(encryptedMessage []byte) (handlers.OTP, error) }
TOTPHandlerStub -
func (*TOTPHandlerStub) CreateTOTP ¶
func (stub *TOTPHandlerStub) CreateTOTP(account string) (handlers.OTP, error)
CreateTOTP -
func (*TOTPHandlerStub) IsInterfaceNil ¶
func (stub *TOTPHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TOTPHandlerStub) TOTPFromBytes ¶
func (stub *TOTPHandlerStub) TOTPFromBytes(encryptedMessage []byte) (handlers.OTP, error)
TOTPFromBytes -
type TotpStub ¶
type TotpStub struct { ValidateCalled func(userCode string) error OTPCalled func() (string, error) QRCalled func() ([]byte, error) ToBytesCalled func() ([]byte, error) UrlCalled func() (string, error) }
TotpStub -
type UserEncryptorStub ¶
type UserEncryptorStub struct { EncryptUserInfoCalled func(userInfo *core.UserInfo) (*core.UserInfo, error) DecryptUserInfoCalled func(userInfo *core.UserInfo) (*core.UserInfo, error) }
UserEncryptorStub is a stub implementation of UserEncryptor
func (*UserEncryptorStub) DecryptUserInfo ¶
DecryptUserInfo decrypts the provided user info
func (*UserEncryptorStub) EncryptUserInfo ¶
EncryptUserInfo encrypts the provided user info
func (*UserEncryptorStub) IsInterfaceNil ¶
func (ues *UserEncryptorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
Source Files
¶
- bucketIDProviderStub.go
- bucketIndexHandlerStub.go
- cryptoComponentsHolderFactoryStub.go
- encryptorStub.go
- frozenOtpHandlerStub.go
- guardedTxBuilderStub.go
- httpClientWrapperStub.go
- keysGeneratorStub.go
- marshallerStub.go
- middlewareStub.go
- mongoDBClientStub.go
- otpProviderStub.go
- rateLimiterMock.go
- rateLimiterStub.go
- redisClientStub.go
- serviceResolverStub.go
- shardedStorageWithIndexMock.go
- shardedStorageWithIndexStub.go
- statusMetricsStub.go
- storerMock.go
- storerStub.go
- totpHandlerStub.go
- totpStub.go
- userEncryptorStub.go