mocks

package
v0.0.0-...-982e07a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encryptor

type Encryptor struct {
	mock.Mock
}

Encryptor is an autogenerated mock type for the Encryptor type

func NewEncryptor

func NewEncryptor(t mockConstructorTestingTNewEncryptor) *Encryptor

NewEncryptor creates a new instance of Encryptor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Encryptor) Decrypt

func (_m *Encryptor) Decrypt(ctx context.Context, keyID []byte, data []byte, _a3 []byte) ([]byte, error)

Decrypt provides a mock function with given fields: ctx, keyID, data, _a3

func (*Encryptor) Encrypt

func (_m *Encryptor) Encrypt(ctx context.Context, keyID []byte, data []byte, _a3 []byte) ([]byte, error)

Encrypt provides a mock function with given fields: ctx, keyID, data, _a3

type KeyManager

type KeyManager struct {
	mock.Mock
}

KeyManager is an autogenerated mock type for the KeyManager type

func NewKeyManager

func NewKeyManager(t mockConstructorTestingTNewKeyManager) *KeyManager

NewKeyManager creates a new instance of KeyManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*KeyManager) CreateKey

func (_m *KeyManager) CreateKey(ctx context.Context, metaData base.CreateKeyMetadata) (*base.KeyMetadata, error)

CreateKey provides a mock function with given fields: ctx, metaData

func (*KeyManager) Decrypt

func (_m *KeyManager) Decrypt(ctx context.Context, keyID []byte, data []byte, _a3 []byte) ([]byte, error)

Decrypt provides a mock function with given fields: ctx, keyID, data, _a3

func (*KeyManager) Encrypt

func (_m *KeyManager) Encrypt(ctx context.Context, keyID []byte, data []byte, _a3 []byte) ([]byte, error)

Encrypt provides a mock function with given fields: ctx, keyID, data, _a3

func (*KeyManager) ID

func (_m *KeyManager) ID() string

ID provides a mock function with given fields:

func (*KeyManager) IsKeyExist

func (_m *KeyManager) IsKeyExist(ctx context.Context, keyID string) (bool, error)

IsKeyExist provides a mock function with given fields: ctx, keyID

type ServerKeyStore

type ServerKeyStore struct {
	mock.Mock
}

ServerKeyStore is an autogenerated mock type for the ServerKeyStore type

func NewServerKeyStore

func NewServerKeyStore(t mockConstructorTestingTNewServerKeyStore) *ServerKeyStore

NewServerKeyStore creates a new instance of ServerKeyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ServerKeyStore) CacheOnStart

func (_m *ServerKeyStore) CacheOnStart() error

CacheOnStart provides a mock function with given fields:

func (*ServerKeyStore) GenerateClientIDSymmetricKey

func (_m *ServerKeyStore) GenerateClientIDSymmetricKey(id []byte) error

GenerateClientIDSymmetricKey provides a mock function with given fields: id

func (*ServerKeyStore) GenerateDataEncryptionKeys

func (_m *ServerKeyStore) GenerateDataEncryptionKeys(clientID []byte) error

GenerateDataEncryptionKeys provides a mock function with given fields: clientID

func (*ServerKeyStore) GenerateHmacKey

func (_m *ServerKeyStore) GenerateHmacKey(id []byte) error

GenerateHmacKey provides a mock function with given fields: id

func (*ServerKeyStore) GetClientIDEncryptionPublicKey

func (_m *ServerKeyStore) GetClientIDEncryptionPublicKey(clientID []byte) (*keys.PublicKey, error)

GetClientIDEncryptionPublicKey provides a mock function with given fields: clientID

func (*ServerKeyStore) GetClientIDSymmetricKey

func (_m *ServerKeyStore) GetClientIDSymmetricKey(id []byte) ([]byte, error)

GetClientIDSymmetricKey provides a mock function with given fields: id

func (*ServerKeyStore) GetClientIDSymmetricKeys

func (_m *ServerKeyStore) GetClientIDSymmetricKeys(id []byte) ([][]byte, error)

GetClientIDSymmetricKeys provides a mock function with given fields: id

func (*ServerKeyStore) GetHMACSecretKey

func (_m *ServerKeyStore) GetHMACSecretKey(id []byte) ([]byte, error)

GetHMACSecretKey provides a mock function with given fields: id

func (*ServerKeyStore) GetLogSecretKey

func (_m *ServerKeyStore) GetLogSecretKey() ([]byte, error)

GetLogSecretKey provides a mock function with given fields:

func (*ServerKeyStore) GetPoisonKeyPair

func (_m *ServerKeyStore) GetPoisonKeyPair() (*keys.Keypair, error)

GetPoisonKeyPair provides a mock function with given fields:

func (*ServerKeyStore) GetPoisonPrivateKeys

func (_m *ServerKeyStore) GetPoisonPrivateKeys() ([]*keys.PrivateKey, error)

GetPoisonPrivateKeys provides a mock function with given fields:

func (*ServerKeyStore) GetPoisonSymmetricKey

func (_m *ServerKeyStore) GetPoisonSymmetricKey() ([]byte, error)

GetPoisonSymmetricKey provides a mock function with given fields:

func (*ServerKeyStore) GetPoisonSymmetricKeys

func (_m *ServerKeyStore) GetPoisonSymmetricKeys() ([][]byte, error)

GetPoisonSymmetricKeys provides a mock function with given fields:

func (*ServerKeyStore) GetServerDecryptionPrivateKey

func (_m *ServerKeyStore) GetServerDecryptionPrivateKey(id []byte) (*keys.PrivateKey, error)

GetServerDecryptionPrivateKey provides a mock function with given fields: id

func (*ServerKeyStore) GetServerDecryptionPrivateKeys

func (_m *ServerKeyStore) GetServerDecryptionPrivateKeys(id []byte) ([]*keys.PrivateKey, error)

GetServerDecryptionPrivateKeys provides a mock function with given fields: id

func (*ServerKeyStore) ListKeys

func (_m *ServerKeyStore) ListKeys() ([]keystore.KeyDescription, error)

ListKeys provides a mock function with given fields:

func (*ServerKeyStore) ListRotatedKeys

func (_m *ServerKeyStore) ListRotatedKeys() ([]keystore.KeyDescription, error)

ListRotatedKeys provides a mock function with given fields:

func (*ServerKeyStore) Reset

func (_m *ServerKeyStore) Reset()

Reset provides a mock function with given fields:

func (*ServerKeyStore) SaveDataEncryptionKeys

func (_m *ServerKeyStore) SaveDataEncryptionKeys(clientID []byte, keypair *keys.Keypair) error

SaveDataEncryptionKeys provides a mock function with given fields: clientID, keypair

type TranslationKeyStore

type TranslationKeyStore struct {
	mock.Mock
}

TranslationKeyStore is an autogenerated mock type for the TranslationKeyStore type

func NewTranslationKeyStore

func NewTranslationKeyStore(t mockConstructorTestingTNewTranslationKeyStore) *TranslationKeyStore

NewTranslationKeyStore creates a new instance of TranslationKeyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TranslationKeyStore) CacheOnStart

func (_m *TranslationKeyStore) CacheOnStart() error

CacheOnStart provides a mock function with given fields:

func (*TranslationKeyStore) GetClientIDEncryptionPublicKey

func (_m *TranslationKeyStore) GetClientIDEncryptionPublicKey(clientID []byte) (*keys.PublicKey, error)

GetClientIDEncryptionPublicKey provides a mock function with given fields: clientID

func (*TranslationKeyStore) GetClientIDSymmetricKey

func (_m *TranslationKeyStore) GetClientIDSymmetricKey(id []byte) ([]byte, error)

GetClientIDSymmetricKey provides a mock function with given fields: id

func (*TranslationKeyStore) GetClientIDSymmetricKeys

func (_m *TranslationKeyStore) GetClientIDSymmetricKeys(id []byte) ([][]byte, error)

GetClientIDSymmetricKeys provides a mock function with given fields: id

func (*TranslationKeyStore) GetHMACSecretKey

func (_m *TranslationKeyStore) GetHMACSecretKey(id []byte) ([]byte, error)

GetHMACSecretKey provides a mock function with given fields: id

func (*TranslationKeyStore) GetLogSecretKey

func (_m *TranslationKeyStore) GetLogSecretKey() ([]byte, error)

GetLogSecretKey provides a mock function with given fields:

func (*TranslationKeyStore) GetPoisonKeyPair

func (_m *TranslationKeyStore) GetPoisonKeyPair() (*keys.Keypair, error)

GetPoisonKeyPair provides a mock function with given fields:

func (*TranslationKeyStore) GetPoisonPrivateKeys

func (_m *TranslationKeyStore) GetPoisonPrivateKeys() ([]*keys.PrivateKey, error)

GetPoisonPrivateKeys provides a mock function with given fields:

func (*TranslationKeyStore) GetPoisonSymmetricKey

func (_m *TranslationKeyStore) GetPoisonSymmetricKey() ([]byte, error)

GetPoisonSymmetricKey provides a mock function with given fields:

func (*TranslationKeyStore) GetPoisonSymmetricKeys

func (_m *TranslationKeyStore) GetPoisonSymmetricKeys() ([][]byte, error)

GetPoisonSymmetricKeys provides a mock function with given fields:

func (*TranslationKeyStore) GetServerDecryptionPrivateKey

func (_m *TranslationKeyStore) GetServerDecryptionPrivateKey(id []byte) (*keys.PrivateKey, error)

GetServerDecryptionPrivateKey provides a mock function with given fields: id

func (*TranslationKeyStore) GetServerDecryptionPrivateKeys

func (_m *TranslationKeyStore) GetServerDecryptionPrivateKeys(id []byte) ([]*keys.PrivateKey, error)

GetServerDecryptionPrivateKeys provides a mock function with given fields: id

Jump to

Keyboard shortcuts

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