Documentation
¶
Index ¶
- type Encrypter
- type Encrypter_Decrypt_Call
- type Encrypter_Encrypt_Call
- type Encrypter_Expecter
- type Repository
- func (_m *Repository) Delete(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, ...) error
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) Find(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, ...) (*vault.Credential, error)
- func (_m *Repository) ListByPrincipal(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string) ([]*vault.Credential, error)
- func (_m *Repository) Upsert(ctx context.Context, c *vault.Credential) error
- type Repository_Delete_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Delete(ctx interface{}, gatewayID interface{}, principalSub interface{}, ...) *Repository_Delete_Call
- func (_e *Repository_Expecter) Find(ctx interface{}, gatewayID interface{}, principalSub interface{}, ...) *Repository_Find_Call
- func (_e *Repository_Expecter) ListByPrincipal(ctx interface{}, gatewayID interface{}, principalSub interface{}) *Repository_ListByPrincipal_Call
- func (_e *Repository_Expecter) Upsert(ctx interface{}, c interface{}) *Repository_Upsert_Call
- type Repository_Find_Call
- type Repository_ListByPrincipal_Call
- type Repository_Upsert_Call
- func (_c *Repository_Upsert_Call) Return(_a0 error) *Repository_Upsert_Call
- func (_c *Repository_Upsert_Call) Run(run func(ctx context.Context, c *vault.Credential)) *Repository_Upsert_Call
- func (_c *Repository_Upsert_Call) RunAndReturn(run func(context.Context, *vault.Credential) error) *Repository_Upsert_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encrypter ¶
Encrypter is an autogenerated mock type for the Encrypter type
func NewEncrypter ¶
NewEncrypter creates a new instance of Encrypter. 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 (*Encrypter) EXPECT ¶
func (_m *Encrypter) EXPECT() *Encrypter_Expecter
type Encrypter_Decrypt_Call ¶
Encrypter_Decrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decrypt'
func (*Encrypter_Decrypt_Call) Return ¶
func (_c *Encrypter_Decrypt_Call) Return(_a0 string, _a1 error) *Encrypter_Decrypt_Call
func (*Encrypter_Decrypt_Call) Run ¶
func (_c *Encrypter_Decrypt_Call) Run(run func(ciphertext string)) *Encrypter_Decrypt_Call
func (*Encrypter_Decrypt_Call) RunAndReturn ¶
func (_c *Encrypter_Decrypt_Call) RunAndReturn(run func(string) (string, error)) *Encrypter_Decrypt_Call
type Encrypter_Encrypt_Call ¶
Encrypter_Encrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encrypt'
func (*Encrypter_Encrypt_Call) Return ¶
func (_c *Encrypter_Encrypt_Call) Return(_a0 string, _a1 error) *Encrypter_Encrypt_Call
func (*Encrypter_Encrypt_Call) Run ¶
func (_c *Encrypter_Encrypt_Call) Run(run func(plaintext string)) *Encrypter_Encrypt_Call
func (*Encrypter_Encrypt_Call) RunAndReturn ¶
func (_c *Encrypter_Encrypt_Call) RunAndReturn(run func(string) (string, error)) *Encrypter_Encrypt_Call
type Encrypter_Expecter ¶
type Encrypter_Expecter struct {
// contains filtered or unexported fields
}
func (*Encrypter_Expecter) Decrypt ¶
func (_e *Encrypter_Expecter) Decrypt(ciphertext interface{}) *Encrypter_Decrypt_Call
Decrypt is a helper method to define mock.On call
- ciphertext string
func (*Encrypter_Expecter) Encrypt ¶
func (_e *Encrypter_Expecter) Encrypt(plaintext interface{}) *Encrypter_Encrypt_Call
Encrypt is a helper method to define mock.On call
- plaintext string
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface {
mock.TestingT
Cleanup(func())
}) *Repository
NewRepository creates a new instance of Repository. 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 (*Repository) Delete ¶
func (_m *Repository) Delete(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, provider string) error
Delete provides a mock function with given fields: ctx, gatewayID, principalSub, provider
func (*Repository) EXPECT ¶
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) Find ¶
func (_m *Repository) Find(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, provider string) (*vault.Credential, error)
Find provides a mock function with given fields: ctx, gatewayID, principalSub, provider
func (*Repository) ListByPrincipal ¶
func (_m *Repository) ListByPrincipal(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string) ([]*vault.Credential, error)
ListByPrincipal provides a mock function with given fields: ctx, gatewayID, principalSub
func (*Repository) Upsert ¶
func (_m *Repository) Upsert(ctx context.Context, c *vault.Credential) error
Upsert provides a mock function with given fields: ctx, c
type Repository_Delete_Call ¶
Repository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*Repository_Delete_Call) Return ¶
func (_c *Repository_Delete_Call) Return(_a0 error) *Repository_Delete_Call
func (*Repository_Delete_Call) Run ¶
func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, provider string)) *Repository_Delete_Call
func (*Repository_Delete_Call) RunAndReturn ¶
func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], string, string) error) *Repository_Delete_Call
type Repository_Expecter ¶
type Repository_Expecter struct {
// contains filtered or unexported fields
}
func (*Repository_Expecter) Delete ¶
func (_e *Repository_Expecter) Delete(ctx interface{}, gatewayID interface{}, principalSub interface{}, provider interface{}) *Repository_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- gatewayID ids.ID[ids.GatewayKind]
- principalSub string
- provider string
func (*Repository_Expecter) Find ¶
func (_e *Repository_Expecter) Find(ctx interface{}, gatewayID interface{}, principalSub interface{}, provider interface{}) *Repository_Find_Call
Find is a helper method to define mock.On call
- ctx context.Context
- gatewayID ids.ID[ids.GatewayKind]
- principalSub string
- provider string
func (*Repository_Expecter) ListByPrincipal ¶
func (_e *Repository_Expecter) ListByPrincipal(ctx interface{}, gatewayID interface{}, principalSub interface{}) *Repository_ListByPrincipal_Call
ListByPrincipal is a helper method to define mock.On call
- ctx context.Context
- gatewayID ids.ID[ids.GatewayKind]
- principalSub string
func (*Repository_Expecter) Upsert ¶
func (_e *Repository_Expecter) Upsert(ctx interface{}, c interface{}) *Repository_Upsert_Call
Upsert is a helper method to define mock.On call
- ctx context.Context
- c *vault.Credential
type Repository_Find_Call ¶
Repository_Find_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Find'
func (*Repository_Find_Call) Return ¶
func (_c *Repository_Find_Call) Return(_a0 *vault.Credential, _a1 error) *Repository_Find_Call
func (*Repository_Find_Call) Run ¶
func (_c *Repository_Find_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, provider string)) *Repository_Find_Call
func (*Repository_Find_Call) RunAndReturn ¶
func (_c *Repository_Find_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], string, string) (*vault.Credential, error)) *Repository_Find_Call
type Repository_ListByPrincipal_Call ¶
Repository_ListByPrincipal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByPrincipal'
func (*Repository_ListByPrincipal_Call) Return ¶
func (_c *Repository_ListByPrincipal_Call) Return(_a0 []*vault.Credential, _a1 error) *Repository_ListByPrincipal_Call
func (*Repository_ListByPrincipal_Call) Run ¶
func (_c *Repository_ListByPrincipal_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string)) *Repository_ListByPrincipal_Call
func (*Repository_ListByPrincipal_Call) RunAndReturn ¶
func (_c *Repository_ListByPrincipal_Call) RunAndReturn(run func(context.Context, ids.ID[ids.GatewayKind], string) ([]*vault.Credential, error)) *Repository_ListByPrincipal_Call
type Repository_Upsert_Call ¶
Repository_Upsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upsert'
func (*Repository_Upsert_Call) Return ¶
func (_c *Repository_Upsert_Call) Return(_a0 error) *Repository_Upsert_Call
func (*Repository_Upsert_Call) Run ¶
func (_c *Repository_Upsert_Call) Run(run func(ctx context.Context, c *vault.Credential)) *Repository_Upsert_Call
func (*Repository_Upsert_Call) RunAndReturn ¶
func (_c *Repository_Upsert_Call) RunAndReturn(run func(context.Context, *vault.Credential) error) *Repository_Upsert_Call