Documentation
¶
Overview ¶
Package mocks provides a mock implementation of the IEncryptorBuilder interface for testing purposes.
Index ¶
- type IEncrypter
- type IEncrypter_Decrypt_Call
- type IEncrypter_Encrypt_Call
- type IEncrypter_Expecter
- type IEncrypter_GetEncryptedDataKey_Call
- func (_c *IEncrypter_GetEncryptedDataKey_Call) Return(ciptherTextBlob []byte) *IEncrypter_GetEncryptedDataKey_Call
- func (_c *IEncrypter_GetEncryptedDataKey_Call) Run(run func()) *IEncrypter_GetEncryptedDataKey_Call
- func (_c *IEncrypter_GetEncryptedDataKey_Call) RunAndReturn(run func() []byte) *IEncrypter_GetEncryptedDataKey_Call
- type MockEncryptorBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IEncrypter ¶
IEncrypter is an autogenerated mock type for the IEncrypter type
func NewIEncrypter ¶
func NewIEncrypter(t interface {
mock.TestingT
Cleanup(func())
}) *IEncrypter
NewIEncrypter creates a new instance of IEncrypter. 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 (*IEncrypter) Decrypt ¶
func (_m *IEncrypter) Decrypt(cipherText []byte) ([]byte, error)
Decrypt provides a mock function with given fields: cipherText
func (*IEncrypter) EXPECT ¶
func (_m *IEncrypter) EXPECT() *IEncrypter_Expecter
func (*IEncrypter) Encrypt ¶
func (_m *IEncrypter) Encrypt(plainText []byte) ([]byte, error)
Encrypt provides a mock function with given fields: plainText
func (*IEncrypter) GetEncryptedDataKey ¶
func (_m *IEncrypter) GetEncryptedDataKey() []byte
GetEncryptedDataKey provides a mock function with no fields
type IEncrypter_Decrypt_Call ¶
IEncrypter_Decrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decrypt'
func (*IEncrypter_Decrypt_Call) Return ¶
func (_c *IEncrypter_Decrypt_Call) Return(plainText []byte, err error) *IEncrypter_Decrypt_Call
func (*IEncrypter_Decrypt_Call) Run ¶
func (_c *IEncrypter_Decrypt_Call) Run(run func(cipherText []byte)) *IEncrypter_Decrypt_Call
func (*IEncrypter_Decrypt_Call) RunAndReturn ¶
func (_c *IEncrypter_Decrypt_Call) RunAndReturn(run func([]byte) ([]byte, error)) *IEncrypter_Decrypt_Call
type IEncrypter_Encrypt_Call ¶
IEncrypter_Encrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encrypt'
func (*IEncrypter_Encrypt_Call) Return ¶
func (_c *IEncrypter_Encrypt_Call) Return(cipherText []byte, err error) *IEncrypter_Encrypt_Call
func (*IEncrypter_Encrypt_Call) Run ¶
func (_c *IEncrypter_Encrypt_Call) Run(run func(plainText []byte)) *IEncrypter_Encrypt_Call
func (*IEncrypter_Encrypt_Call) RunAndReturn ¶
func (_c *IEncrypter_Encrypt_Call) RunAndReturn(run func([]byte) ([]byte, error)) *IEncrypter_Encrypt_Call
type IEncrypter_Expecter ¶
type IEncrypter_Expecter struct {
// contains filtered or unexported fields
}
func (*IEncrypter_Expecter) Decrypt ¶
func (_e *IEncrypter_Expecter) Decrypt(cipherText interface{}) *IEncrypter_Decrypt_Call
Decrypt is a helper method to define mock.On call
- cipherText []byte
func (*IEncrypter_Expecter) Encrypt ¶
func (_e *IEncrypter_Expecter) Encrypt(plainText interface{}) *IEncrypter_Encrypt_Call
Encrypt is a helper method to define mock.On call
- plainText []byte
func (*IEncrypter_Expecter) GetEncryptedDataKey ¶
func (_e *IEncrypter_Expecter) GetEncryptedDataKey() *IEncrypter_GetEncryptedDataKey_Call
GetEncryptedDataKey is a helper method to define mock.On call
type IEncrypter_GetEncryptedDataKey_Call ¶
IEncrypter_GetEncryptedDataKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEncryptedDataKey'
func (*IEncrypter_GetEncryptedDataKey_Call) Return ¶
func (_c *IEncrypter_GetEncryptedDataKey_Call) Return(ciptherTextBlob []byte) *IEncrypter_GetEncryptedDataKey_Call
func (*IEncrypter_GetEncryptedDataKey_Call) Run ¶
func (_c *IEncrypter_GetEncryptedDataKey_Call) Run(run func()) *IEncrypter_GetEncryptedDataKey_Call
func (*IEncrypter_GetEncryptedDataKey_Call) RunAndReturn ¶
func (_c *IEncrypter_GetEncryptedDataKey_Call) RunAndReturn(run func() []byte) *IEncrypter_GetEncryptedDataKey_Call
type MockEncryptorBuilder ¶
type MockEncryptorBuilder struct {
// contains filtered or unexported fields
}
MockEncryptorBuilder is a mock implementation of the IEncryptorBuilder interface.
func NewMockEncryptorBuilder ¶
func NewMockEncryptorBuilder(encrypter encryption.IEncrypter) *MockEncryptorBuilder
NewMockEncryptorBuilder creates a new instance of MockEncryptorBuilder with the provided encrypter.
func (*MockEncryptorBuilder) Build ¶
func (b *MockEncryptorBuilder) Build(_ context.Context, _ string, _ string, _ string) (encryption.IEncrypter, error)
Build creates a new encryption.IEncrypter instance.