mocks

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAEAD

type MockAEAD struct {
	mock.Mock
}

MockAEAD is an autogenerated mock type for the AEAD type

func NewMockAEAD

func NewMockAEAD(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAEAD

NewMockAEAD creates a new instance of MockAEAD. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAEAD) Decrypt

func (_mock *MockAEAD) Decrypt(ciphertext []byte, nonce []byte, aad []byte) ([]byte, error)

Decrypt provides a mock function for the type MockAEAD

func (*MockAEAD) EXPECT

func (_m *MockAEAD) EXPECT() *MockAEAD_Expecter

func (*MockAEAD) Encrypt

func (_mock *MockAEAD) Encrypt(plaintext []byte, aad []byte) ([]byte, []byte, error)

Encrypt provides a mock function for the type MockAEAD

type MockAEADManager

type MockAEADManager struct {
	mock.Mock
}

MockAEADManager is an autogenerated mock type for the AEADManager type

func NewMockAEADManager

func NewMockAEADManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAEADManager

NewMockAEADManager creates a new instance of MockAEADManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAEADManager) CreateCipher

func (_mock *MockAEADManager) CreateCipher(key []byte, alg domain.Algorithm) (service.AEAD, error)

CreateCipher provides a mock function for the type MockAEADManager

func (*MockAEADManager) EXPECT

type MockAEADManager_CreateCipher_Call

type MockAEADManager_CreateCipher_Call struct {
	*mock.Call
}

MockAEADManager_CreateCipher_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCipher'

func (*MockAEADManager_CreateCipher_Call) Return

func (*MockAEADManager_CreateCipher_Call) Run

func (*MockAEADManager_CreateCipher_Call) RunAndReturn

type MockAEADManager_Expecter

type MockAEADManager_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockAEADManager_Expecter) CreateCipher

func (_e *MockAEADManager_Expecter) CreateCipher(key interface{}, alg interface{}) *MockAEADManager_CreateCipher_Call

CreateCipher is a helper method to define mock.On call

  • key []byte
  • alg domain.Algorithm

type MockAEAD_Decrypt_Call

type MockAEAD_Decrypt_Call struct {
	*mock.Call
}

MockAEAD_Decrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decrypt'

func (*MockAEAD_Decrypt_Call) Return

func (_c *MockAEAD_Decrypt_Call) Return(bytes []byte, err error) *MockAEAD_Decrypt_Call

func (*MockAEAD_Decrypt_Call) Run

func (_c *MockAEAD_Decrypt_Call) Run(run func(ciphertext []byte, nonce []byte, aad []byte)) *MockAEAD_Decrypt_Call

func (*MockAEAD_Decrypt_Call) RunAndReturn

func (_c *MockAEAD_Decrypt_Call) RunAndReturn(run func(ciphertext []byte, nonce []byte, aad []byte) ([]byte, error)) *MockAEAD_Decrypt_Call

type MockAEAD_Encrypt_Call

type MockAEAD_Encrypt_Call struct {
	*mock.Call
}

MockAEAD_Encrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encrypt'

func (*MockAEAD_Encrypt_Call) Return

func (_c *MockAEAD_Encrypt_Call) Return(ciphertext []byte, nonce []byte, err error) *MockAEAD_Encrypt_Call

func (*MockAEAD_Encrypt_Call) Run

func (_c *MockAEAD_Encrypt_Call) Run(run func(plaintext []byte, aad []byte)) *MockAEAD_Encrypt_Call

func (*MockAEAD_Encrypt_Call) RunAndReturn

func (_c *MockAEAD_Encrypt_Call) RunAndReturn(run func(plaintext []byte, aad []byte) ([]byte, []byte, error)) *MockAEAD_Encrypt_Call

type MockAEAD_Expecter

type MockAEAD_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockAEAD_Expecter) Decrypt

func (_e *MockAEAD_Expecter) Decrypt(ciphertext interface{}, nonce interface{}, aad interface{}) *MockAEAD_Decrypt_Call

Decrypt is a helper method to define mock.On call

  • ciphertext []byte
  • nonce []byte
  • aad []byte

func (*MockAEAD_Expecter) Encrypt

func (_e *MockAEAD_Expecter) Encrypt(plaintext interface{}, aad interface{}) *MockAEAD_Encrypt_Call

Encrypt is a helper method to define mock.On call

  • plaintext []byte
  • aad []byte

type MockKeyManager

type MockKeyManager struct {
	mock.Mock
}

MockKeyManager is an autogenerated mock type for the KeyManager type

func NewMockKeyManager

func NewMockKeyManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockKeyManager

NewMockKeyManager creates a new instance of MockKeyManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockKeyManager) CreateDek

func (_mock *MockKeyManager) CreateDek(kek *domain.Kek, alg domain.Algorithm) (domain.Dek, error)

CreateDek provides a mock function for the type MockKeyManager

func (*MockKeyManager) CreateKek

func (_mock *MockKeyManager) CreateKek(masterKey *domain.MasterKey, alg domain.Algorithm) (domain.Kek, error)

CreateKek provides a mock function for the type MockKeyManager

func (*MockKeyManager) DecryptDek

func (_mock *MockKeyManager) DecryptDek(dek *domain.Dek, kek *domain.Kek) ([]byte, error)

DecryptDek provides a mock function for the type MockKeyManager

func (*MockKeyManager) DecryptKek

func (_mock *MockKeyManager) DecryptKek(kek *domain.Kek, masterKey *domain.MasterKey) ([]byte, error)

DecryptKek provides a mock function for the type MockKeyManager

func (*MockKeyManager) EXPECT

type MockKeyManager_CreateDek_Call

type MockKeyManager_CreateDek_Call struct {
	*mock.Call
}

MockKeyManager_CreateDek_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDek'

func (*MockKeyManager_CreateDek_Call) Return

func (*MockKeyManager_CreateDek_Call) Run

func (*MockKeyManager_CreateDek_Call) RunAndReturn

type MockKeyManager_CreateKek_Call

type MockKeyManager_CreateKek_Call struct {
	*mock.Call
}

MockKeyManager_CreateKek_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateKek'

func (*MockKeyManager_CreateKek_Call) Return

func (*MockKeyManager_CreateKek_Call) Run

func (*MockKeyManager_CreateKek_Call) RunAndReturn

type MockKeyManager_DecryptDek_Call

type MockKeyManager_DecryptDek_Call struct {
	*mock.Call
}

MockKeyManager_DecryptDek_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecryptDek'

func (*MockKeyManager_DecryptDek_Call) Return

func (*MockKeyManager_DecryptDek_Call) Run

func (*MockKeyManager_DecryptDek_Call) RunAndReturn

func (_c *MockKeyManager_DecryptDek_Call) RunAndReturn(run func(dek *domain.Dek, kek *domain.Kek) ([]byte, error)) *MockKeyManager_DecryptDek_Call

type MockKeyManager_DecryptKek_Call

type MockKeyManager_DecryptKek_Call struct {
	*mock.Call
}

MockKeyManager_DecryptKek_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecryptKek'

func (*MockKeyManager_DecryptKek_Call) Return

func (*MockKeyManager_DecryptKek_Call) Run

func (*MockKeyManager_DecryptKek_Call) RunAndReturn

func (_c *MockKeyManager_DecryptKek_Call) RunAndReturn(run func(kek *domain.Kek, masterKey *domain.MasterKey) ([]byte, error)) *MockKeyManager_DecryptKek_Call

type MockKeyManager_Expecter

type MockKeyManager_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockKeyManager_Expecter) CreateDek

func (_e *MockKeyManager_Expecter) CreateDek(kek interface{}, alg interface{}) *MockKeyManager_CreateDek_Call

CreateDek is a helper method to define mock.On call

  • kek *domain.Kek
  • alg domain.Algorithm

func (*MockKeyManager_Expecter) CreateKek

func (_e *MockKeyManager_Expecter) CreateKek(masterKey interface{}, alg interface{}) *MockKeyManager_CreateKek_Call

CreateKek is a helper method to define mock.On call

  • masterKey *domain.MasterKey
  • alg domain.Algorithm

func (*MockKeyManager_Expecter) DecryptDek

func (_e *MockKeyManager_Expecter) DecryptDek(dek interface{}, kek interface{}) *MockKeyManager_DecryptDek_Call

DecryptDek is a helper method to define mock.On call

  • dek *domain.Dek
  • kek *domain.Kek

func (*MockKeyManager_Expecter) DecryptKek

func (_e *MockKeyManager_Expecter) DecryptKek(kek interface{}, masterKey interface{}) *MockKeyManager_DecryptKek_Call

DecryptKek is a helper method to define mock.On call

  • kek *domain.Kek
  • masterKey *domain.MasterKey

Jump to

Keyboard shortcuts

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