mocks

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encrypter

type Encrypter struct {
	mock.Mock
}

Encrypter is an autogenerated mock type for the Encrypter type

func NewEncrypter

func NewEncrypter(t interface {
	mock.TestingT
	Cleanup(func())
}) *Encrypter

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) Decrypt

func (_m *Encrypter) Decrypt(ciphertext string) (string, error)

Decrypt provides a mock function with given fields: ciphertext

func (*Encrypter) EXPECT

func (_m *Encrypter) EXPECT() *Encrypter_Expecter

func (*Encrypter) Encrypt

func (_m *Encrypter) Encrypt(plaintext string) (string, error)

Encrypt provides a mock function with given fields: plaintext

type Encrypter_Decrypt_Call

type Encrypter_Decrypt_Call struct {
	*mock.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 (*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

type Encrypter_Encrypt_Call struct {
	*mock.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 (*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

type Repository struct {
	mock.Mock
}

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

type Repository_Delete_Call struct {
	*mock.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 (*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

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

type Repository_Find_Call struct {
	*mock.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 (*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

type Repository_ListByPrincipal_Call

type Repository_ListByPrincipal_Call struct {
	*mock.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 (*Repository_ListByPrincipal_Call) Run

func (*Repository_ListByPrincipal_Call) RunAndReturn

type Repository_Upsert_Call

type Repository_Upsert_Call struct {
	*mock.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 (*Repository_Upsert_Call) Run

func (*Repository_Upsert_Call) RunAndReturn

Jump to

Keyboard shortcuts

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