mocks

package
v0.12.7-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 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 Encryptor

type Encryptor struct {
	mock.Mock
}

Encryptor is an autogenerated mock type for the encryptor type

func NewEncryptor added in v0.9.0

func NewEncryptor(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*Encryptor) Decrypt

func (_m *Encryptor) Decrypt(_a0 string) (string, error)

Decrypt provides a mock function with given fields: _a0

func (*Encryptor) EXPECT

func (_m *Encryptor) EXPECT() *Encryptor_Expecter

func (*Encryptor) Encrypt

func (_m *Encryptor) Encrypt(_a0 string) (string, error)

Encrypt provides a mock function with given fields: _a0

type Encryptor_Decrypt_Call

type Encryptor_Decrypt_Call struct {
	*mock.Call
}

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

func (*Encryptor_Decrypt_Call) Return

func (*Encryptor_Decrypt_Call) Run

func (_c *Encryptor_Decrypt_Call) Run(run func(_a0 string)) *Encryptor_Decrypt_Call

func (*Encryptor_Decrypt_Call) RunAndReturn added in v0.9.0

func (_c *Encryptor_Decrypt_Call) RunAndReturn(run func(string) (string, error)) *Encryptor_Decrypt_Call

type Encryptor_Encrypt_Call

type Encryptor_Encrypt_Call struct {
	*mock.Call
}

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

func (*Encryptor_Encrypt_Call) Return

func (*Encryptor_Encrypt_Call) Run

func (_c *Encryptor_Encrypt_Call) Run(run func(_a0 string)) *Encryptor_Encrypt_Call

func (*Encryptor_Encrypt_Call) RunAndReturn added in v0.9.0

func (_c *Encryptor_Encrypt_Call) RunAndReturn(run func(string) (string, error)) *Encryptor_Encrypt_Call

type Encryptor_Expecter

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

func (*Encryptor_Expecter) Decrypt

func (_e *Encryptor_Expecter) Decrypt(_a0 interface{}) *Encryptor_Decrypt_Call

Decrypt is a helper method to define mock.On call

  • _a0 string

func (*Encryptor_Expecter) Encrypt

func (_e *Encryptor_Expecter) Encrypt(_a0 interface{}) *Encryptor_Encrypt_Call

Encrypt is a helper method to define mock.On call

  • _a0 string

type GcloudIamClient

type GcloudIamClient struct {
	mock.Mock
}

GcloudIamClient is an autogenerated mock type for the GcloudIamClient type

func NewGcloudIamClient added in v0.7.5

func NewGcloudIamClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *GcloudIamClient

NewGcloudIamClient creates a new instance of GcloudIamClient. 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 (*GcloudIamClient) EXPECT

func (*GcloudIamClient) GetGrantableRoles added in v0.7.5

func (_m *GcloudIamClient) GetGrantableRoles(ctx context.Context, resourceType string) ([]*iam.Role, error)

GetGrantableRoles provides a mock function with given fields: ctx, resourceType

func (*GcloudIamClient) GrantAccess

func (_m *GcloudIamClient) GrantAccess(ctx context.Context, accountType string, accountID string, role string) error

GrantAccess provides a mock function with given fields: ctx, accountType, accountID, role

func (*GcloudIamClient) GrantServiceAccountAccess added in v0.7.5

func (_m *GcloudIamClient) GrantServiceAccountAccess(ctx context.Context, sa string, accountType string, accountID string, roles string) error

GrantServiceAccountAccess provides a mock function with given fields: ctx, sa, accountType, accountID, roles

func (*GcloudIamClient) ListAccess

func (_m *GcloudIamClient) ListAccess(ctx context.Context, resources []*domain.Resource) (domain.MapResourceAccess, error)

ListAccess provides a mock function with given fields: ctx, resources

func (*GcloudIamClient) ListServiceAccounts added in v0.7.5

func (_m *GcloudIamClient) ListServiceAccounts(_a0 context.Context) ([]*iam.ServiceAccount, error)

ListServiceAccounts provides a mock function with given fields: _a0

func (*GcloudIamClient) RevokeAccess

func (_m *GcloudIamClient) RevokeAccess(ctx context.Context, accountType string, accountID string, role string) error

RevokeAccess provides a mock function with given fields: ctx, accountType, accountID, role

func (*GcloudIamClient) RevokeServiceAccountAccess added in v0.7.5

func (_m *GcloudIamClient) RevokeServiceAccountAccess(ctx context.Context, sa string, accountType string, accountID string, role string) error

RevokeServiceAccountAccess provides a mock function with given fields: ctx, sa, accountType, accountID, role

type GcloudIamClient_Expecter

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

func (*GcloudIamClient_Expecter) GetGrantableRoles added in v0.7.5

func (_e *GcloudIamClient_Expecter) GetGrantableRoles(ctx interface{}, resourceType interface{}) *GcloudIamClient_GetGrantableRoles_Call

GetGrantableRoles is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string

func (*GcloudIamClient_Expecter) GrantAccess

func (_e *GcloudIamClient_Expecter) GrantAccess(ctx interface{}, accountType interface{}, accountID interface{}, role interface{}) *GcloudIamClient_GrantAccess_Call

GrantAccess is a helper method to define mock.On call

  • ctx context.Context
  • accountType string
  • accountID string
  • role string

func (*GcloudIamClient_Expecter) GrantServiceAccountAccess added in v0.7.5

func (_e *GcloudIamClient_Expecter) GrantServiceAccountAccess(ctx interface{}, sa interface{}, accountType interface{}, accountID interface{}, roles interface{}) *GcloudIamClient_GrantServiceAccountAccess_Call

GrantServiceAccountAccess is a helper method to define mock.On call

  • ctx context.Context
  • sa string
  • accountType string
  • accountID string
  • roles string

func (*GcloudIamClient_Expecter) ListAccess

func (_e *GcloudIamClient_Expecter) ListAccess(ctx interface{}, resources interface{}) *GcloudIamClient_ListAccess_Call

ListAccess is a helper method to define mock.On call

  • ctx context.Context
  • resources []*domain.Resource

func (*GcloudIamClient_Expecter) ListServiceAccounts added in v0.7.5

func (_e *GcloudIamClient_Expecter) ListServiceAccounts(_a0 interface{}) *GcloudIamClient_ListServiceAccounts_Call

ListServiceAccounts is a helper method to define mock.On call

  • _a0 context.Context

func (*GcloudIamClient_Expecter) RevokeAccess

func (_e *GcloudIamClient_Expecter) RevokeAccess(ctx interface{}, accountType interface{}, accountID interface{}, role interface{}) *GcloudIamClient_RevokeAccess_Call

RevokeAccess is a helper method to define mock.On call

  • ctx context.Context
  • accountType string
  • accountID string
  • role string

func (*GcloudIamClient_Expecter) RevokeServiceAccountAccess added in v0.7.5

func (_e *GcloudIamClient_Expecter) RevokeServiceAccountAccess(ctx interface{}, sa interface{}, accountType interface{}, accountID interface{}, role interface{}) *GcloudIamClient_RevokeServiceAccountAccess_Call

RevokeServiceAccountAccess is a helper method to define mock.On call

  • ctx context.Context
  • sa string
  • accountType string
  • accountID string
  • role string

type GcloudIamClient_GetGrantableRoles_Call added in v0.7.5

type GcloudIamClient_GetGrantableRoles_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_GetGrantableRoles_Call) Return added in v0.7.5

func (*GcloudIamClient_GetGrantableRoles_Call) Run added in v0.7.5

func (*GcloudIamClient_GetGrantableRoles_Call) RunAndReturn added in v0.7.5

type GcloudIamClient_GrantAccess_Call

type GcloudIamClient_GrantAccess_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_GrantAccess_Call) Return

func (*GcloudIamClient_GrantAccess_Call) Run

func (_c *GcloudIamClient_GrantAccess_Call) Run(run func(ctx context.Context, accountType string, accountID string, role string)) *GcloudIamClient_GrantAccess_Call

func (*GcloudIamClient_GrantAccess_Call) RunAndReturn added in v0.7.5

type GcloudIamClient_GrantServiceAccountAccess_Call added in v0.7.5

type GcloudIamClient_GrantServiceAccountAccess_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_GrantServiceAccountAccess_Call) Return added in v0.7.5

func (*GcloudIamClient_GrantServiceAccountAccess_Call) Run added in v0.7.5

func (*GcloudIamClient_GrantServiceAccountAccess_Call) RunAndReturn added in v0.7.5

type GcloudIamClient_ListAccess_Call

type GcloudIamClient_ListAccess_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_ListAccess_Call) Return

func (*GcloudIamClient_ListAccess_Call) Run

func (*GcloudIamClient_ListAccess_Call) RunAndReturn added in v0.7.5

type GcloudIamClient_ListServiceAccounts_Call added in v0.7.5

type GcloudIamClient_ListServiceAccounts_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_ListServiceAccounts_Call) Return added in v0.7.5

func (*GcloudIamClient_ListServiceAccounts_Call) Run added in v0.7.5

func (*GcloudIamClient_ListServiceAccounts_Call) RunAndReturn added in v0.7.5

type GcloudIamClient_RevokeAccess_Call

type GcloudIamClient_RevokeAccess_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_RevokeAccess_Call) Return

func (*GcloudIamClient_RevokeAccess_Call) Run

func (_c *GcloudIamClient_RevokeAccess_Call) Run(run func(ctx context.Context, accountType string, accountID string, role string)) *GcloudIamClient_RevokeAccess_Call

func (*GcloudIamClient_RevokeAccess_Call) RunAndReturn added in v0.7.5

type GcloudIamClient_RevokeServiceAccountAccess_Call added in v0.7.5

type GcloudIamClient_RevokeServiceAccountAccess_Call struct {
	*mock.Call
}

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

func (*GcloudIamClient_RevokeServiceAccountAccess_Call) Return added in v0.7.5

func (*GcloudIamClient_RevokeServiceAccountAccess_Call) Run added in v0.7.5

func (*GcloudIamClient_RevokeServiceAccountAccess_Call) RunAndReturn added in v0.7.5

Jump to

Keyboard shortcuts

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