mocks

package
v0.0.0-...-11b31ba Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) Create

func (_m *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

Create provides a mock function with given fields: ctx, obj, opts

func (*Client) Delete

func (_m *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

Delete provides a mock function with given fields: ctx, obj, opts

func (*Client) DeleteAllOf

func (_m *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

DeleteAllOf provides a mock function with given fields: ctx, obj, opts

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) Get

func (_m *Client) Get(ctx context.Context, key types.NamespacedName, obj client.Object, opts ...client.GetOption) error

Get provides a mock function with given fields: ctx, key, obj, opts

func (*Client) GroupVersionKindFor

func (_m *Client) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)

GroupVersionKindFor provides a mock function with given fields: obj

func (*Client) IsObjectNamespaced

func (_m *Client) IsObjectNamespaced(obj runtime.Object) (bool, error)

IsObjectNamespaced provides a mock function with given fields: obj

func (*Client) List

func (_m *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

List provides a mock function with given fields: ctx, list, opts

func (*Client) Patch

func (_m *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

Patch provides a mock function with given fields: ctx, obj, patch, opts

func (*Client) RESTMapper

func (_m *Client) RESTMapper() meta.RESTMapper

RESTMapper provides a mock function with given fields:

func (*Client) Scheme

func (_m *Client) Scheme() *runtime.Scheme

Scheme provides a mock function with given fields:

func (*Client) Status

func (_m *Client) Status() client.SubResourceWriter

Status provides a mock function with given fields:

func (*Client) SubResource

func (_m *Client) SubResource(subResource string) client.SubResourceClient

SubResource provides a mock function with given fields: subResource

func (*Client) Update

func (_m *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

Update provides a mock function with given fields: ctx, obj, opts

type Client_Create_Call

type Client_Create_Call struct {
	*mock.Call
}

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

func (*Client_Create_Call) Return

func (_c *Client_Create_Call) Return(_a0 error) *Client_Create_Call

func (*Client_Create_Call) Run

func (_c *Client_Create_Call) Run(run func(ctx context.Context, obj client.Object, opts ...client.CreateOption)) *Client_Create_Call

func (*Client_Create_Call) RunAndReturn

type Client_DeleteAllOf_Call

type Client_DeleteAllOf_Call struct {
	*mock.Call
}

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

func (*Client_DeleteAllOf_Call) Return

func (*Client_DeleteAllOf_Call) Run

func (*Client_DeleteAllOf_Call) RunAndReturn

type Client_Delete_Call

type Client_Delete_Call struct {
	*mock.Call
}

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

func (*Client_Delete_Call) Return

func (_c *Client_Delete_Call) Return(_a0 error) *Client_Delete_Call

func (*Client_Delete_Call) Run

func (_c *Client_Delete_Call) Run(run func(ctx context.Context, obj client.Object, opts ...client.DeleteOption)) *Client_Delete_Call

func (*Client_Delete_Call) RunAndReturn

type Client_Expecter

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

func (*Client_Expecter) Create

func (_e *Client_Expecter) Create(ctx interface{}, obj interface{}, opts ...interface{}) *Client_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.CreateOption

func (*Client_Expecter) Delete

func (_e *Client_Expecter) Delete(ctx interface{}, obj interface{}, opts ...interface{}) *Client_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.DeleteOption

func (*Client_Expecter) DeleteAllOf

func (_e *Client_Expecter) DeleteAllOf(ctx interface{}, obj interface{}, opts ...interface{}) *Client_DeleteAllOf_Call

DeleteAllOf is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.DeleteAllOfOption

func (*Client_Expecter) Get

func (_e *Client_Expecter) Get(ctx interface{}, key interface{}, obj interface{}, opts ...interface{}) *Client_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key types.NamespacedName
  • obj client.Object
  • opts ...client.GetOption

func (*Client_Expecter) GroupVersionKindFor

func (_e *Client_Expecter) GroupVersionKindFor(obj interface{}) *Client_GroupVersionKindFor_Call

GroupVersionKindFor is a helper method to define mock.On call

  • obj runtime.Object

func (*Client_Expecter) IsObjectNamespaced

func (_e *Client_Expecter) IsObjectNamespaced(obj interface{}) *Client_IsObjectNamespaced_Call

IsObjectNamespaced is a helper method to define mock.On call

  • obj runtime.Object

func (*Client_Expecter) List

func (_e *Client_Expecter) List(ctx interface{}, list interface{}, opts ...interface{}) *Client_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • list client.ObjectList
  • opts ...client.ListOption

func (*Client_Expecter) Patch

func (_e *Client_Expecter) Patch(ctx interface{}, obj interface{}, patch interface{}, opts ...interface{}) *Client_Patch_Call

Patch is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • patch client.Patch
  • opts ...client.PatchOption

func (*Client_Expecter) RESTMapper

func (_e *Client_Expecter) RESTMapper() *Client_RESTMapper_Call

RESTMapper is a helper method to define mock.On call

func (*Client_Expecter) Scheme

func (_e *Client_Expecter) Scheme() *Client_Scheme_Call

Scheme is a helper method to define mock.On call

func (*Client_Expecter) Status

func (_e *Client_Expecter) Status() *Client_Status_Call

Status is a helper method to define mock.On call

func (*Client_Expecter) SubResource

func (_e *Client_Expecter) SubResource(subResource interface{}) *Client_SubResource_Call

SubResource is a helper method to define mock.On call

  • subResource string

func (*Client_Expecter) Update

func (_e *Client_Expecter) Update(ctx interface{}, obj interface{}, opts ...interface{}) *Client_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.UpdateOption

type Client_Get_Call

type Client_Get_Call struct {
	*mock.Call
}

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

func (*Client_Get_Call) Return

func (_c *Client_Get_Call) Return(_a0 error) *Client_Get_Call

func (*Client_Get_Call) Run

func (_c *Client_Get_Call) Run(run func(ctx context.Context, key types.NamespacedName, obj client.Object, opts ...client.GetOption)) *Client_Get_Call

func (*Client_Get_Call) RunAndReturn

type Client_GroupVersionKindFor_Call

type Client_GroupVersionKindFor_Call struct {
	*mock.Call
}

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

func (*Client_GroupVersionKindFor_Call) Return

func (*Client_GroupVersionKindFor_Call) Run

func (*Client_GroupVersionKindFor_Call) RunAndReturn

type Client_IsObjectNamespaced_Call

type Client_IsObjectNamespaced_Call struct {
	*mock.Call
}

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

func (*Client_IsObjectNamespaced_Call) Return

func (*Client_IsObjectNamespaced_Call) Run

func (*Client_IsObjectNamespaced_Call) RunAndReturn

type Client_List_Call

type Client_List_Call struct {
	*mock.Call
}

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

func (*Client_List_Call) Return

func (_c *Client_List_Call) Return(_a0 error) *Client_List_Call

func (*Client_List_Call) Run

func (_c *Client_List_Call) Run(run func(ctx context.Context, list client.ObjectList, opts ...client.ListOption)) *Client_List_Call

func (*Client_List_Call) RunAndReturn

type Client_Patch_Call

type Client_Patch_Call struct {
	*mock.Call
}

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

func (*Client_Patch_Call) Return

func (_c *Client_Patch_Call) Return(_a0 error) *Client_Patch_Call

func (*Client_Patch_Call) Run

func (_c *Client_Patch_Call) Run(run func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption)) *Client_Patch_Call

func (*Client_Patch_Call) RunAndReturn

type Client_RESTMapper_Call

type Client_RESTMapper_Call struct {
	*mock.Call
}

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

func (*Client_RESTMapper_Call) Return

func (*Client_RESTMapper_Call) Run

func (_c *Client_RESTMapper_Call) Run(run func()) *Client_RESTMapper_Call

func (*Client_RESTMapper_Call) RunAndReturn

func (_c *Client_RESTMapper_Call) RunAndReturn(run func() meta.RESTMapper) *Client_RESTMapper_Call

type Client_Scheme_Call

type Client_Scheme_Call struct {
	*mock.Call
}

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

func (*Client_Scheme_Call) Return

func (*Client_Scheme_Call) Run

func (_c *Client_Scheme_Call) Run(run func()) *Client_Scheme_Call

func (*Client_Scheme_Call) RunAndReturn

func (_c *Client_Scheme_Call) RunAndReturn(run func() *runtime.Scheme) *Client_Scheme_Call

type Client_Status_Call

type Client_Status_Call struct {
	*mock.Call
}

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

func (*Client_Status_Call) Return

func (*Client_Status_Call) Run

func (_c *Client_Status_Call) Run(run func()) *Client_Status_Call

func (*Client_Status_Call) RunAndReturn

func (_c *Client_Status_Call) RunAndReturn(run func() client.SubResourceWriter) *Client_Status_Call

type Client_SubResource_Call

type Client_SubResource_Call struct {
	*mock.Call
}

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

func (*Client_SubResource_Call) Return

func (*Client_SubResource_Call) Run

func (_c *Client_SubResource_Call) Run(run func(subResource string)) *Client_SubResource_Call

func (*Client_SubResource_Call) RunAndReturn

type Client_Update_Call

type Client_Update_Call struct {
	*mock.Call
}

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

func (*Client_Update_Call) Return

func (_c *Client_Update_Call) Return(_a0 error) *Client_Update_Call

func (*Client_Update_Call) Run

func (_c *Client_Update_Call) Run(run func(ctx context.Context, obj client.Object, opts ...client.UpdateOption)) *Client_Update_Call

func (*Client_Update_Call) RunAndReturn

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *Manager

NewManager creates a new instance of Manager. 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 (*Manager) DeletePublisherProxyResources

func (_m *Manager) DeletePublisherProxyResources(ctx context.Context, _a1 *v1alpha1.Eventing) error

DeletePublisherProxyResources provides a mock function with given fields: ctx, _a1

func (*Manager) DeployPublisherProxy

func (_m *Manager) DeployPublisherProxy(ctx context.Context, _a1 *v1alpha1.Eventing, natsConfig *env.NATSConfig, backendType v1alpha1.BackendType) (*v1.Deployment, error)

DeployPublisherProxy provides a mock function with given fields: ctx, _a1, natsConfig, backendType

func (*Manager) DeployPublisherProxyResources

func (_m *Manager) DeployPublisherProxyResources(ctx context.Context, _a1 *v1alpha1.Eventing, deploy *v1.Deployment) error

DeployPublisherProxyResources provides a mock function with given fields: ctx, _a1, deploy

func (*Manager) EXPECT

func (_m *Manager) EXPECT() *Manager_Expecter

func (*Manager) GetBackendConfig

func (_m *Manager) GetBackendConfig() *env.BackendConfig

GetBackendConfig provides a mock function with given fields:

func (*Manager) IsNATSAvailable

func (_m *Manager) IsNATSAvailable(ctx context.Context, namespace string) (bool, error)

IsNATSAvailable provides a mock function with given fields: ctx, namespace

func (*Manager) SetBackendConfig

func (_m *Manager) SetBackendConfig(config env.BackendConfig)

SetBackendConfig provides a mock function with given fields: config

func (*Manager) SubscriptionExists

func (_m *Manager) SubscriptionExists(ctx context.Context) (bool, error)

SubscriptionExists provides a mock function with given fields: ctx

type Manager_DeletePublisherProxyResources_Call

type Manager_DeletePublisherProxyResources_Call struct {
	*mock.Call
}

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

func (*Manager_DeletePublisherProxyResources_Call) Return

func (*Manager_DeletePublisherProxyResources_Call) Run

func (*Manager_DeletePublisherProxyResources_Call) RunAndReturn

type Manager_DeployPublisherProxyResources_Call

type Manager_DeployPublisherProxyResources_Call struct {
	*mock.Call
}

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

func (*Manager_DeployPublisherProxyResources_Call) Return

func (*Manager_DeployPublisherProxyResources_Call) Run

func (*Manager_DeployPublisherProxyResources_Call) RunAndReturn

type Manager_DeployPublisherProxy_Call

type Manager_DeployPublisherProxy_Call struct {
	*mock.Call
}

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

func (*Manager_DeployPublisherProxy_Call) Return

func (*Manager_DeployPublisherProxy_Call) Run

type Manager_Expecter

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

func (*Manager_Expecter) DeletePublisherProxyResources

func (_e *Manager_Expecter) DeletePublisherProxyResources(ctx interface{}, _a1 interface{}) *Manager_DeletePublisherProxyResources_Call

DeletePublisherProxyResources is a helper method to define mock.On call

  • ctx context.Context
  • _a1 *v1alpha1.Eventing

func (*Manager_Expecter) DeployPublisherProxy

func (_e *Manager_Expecter) DeployPublisherProxy(ctx interface{}, _a1 interface{}, natsConfig interface{}, backendType interface{}) *Manager_DeployPublisherProxy_Call

DeployPublisherProxy is a helper method to define mock.On call

  • ctx context.Context
  • _a1 *v1alpha1.Eventing
  • natsConfig *env.NATSConfig
  • backendType v1alpha1.BackendType

func (*Manager_Expecter) DeployPublisherProxyResources

func (_e *Manager_Expecter) DeployPublisherProxyResources(ctx interface{}, _a1 interface{}, deploy interface{}) *Manager_DeployPublisherProxyResources_Call

DeployPublisherProxyResources is a helper method to define mock.On call

  • ctx context.Context
  • _a1 *v1alpha1.Eventing
  • deploy *v1.Deployment

func (*Manager_Expecter) GetBackendConfig

func (_e *Manager_Expecter) GetBackendConfig() *Manager_GetBackendConfig_Call

GetBackendConfig is a helper method to define mock.On call

func (*Manager_Expecter) IsNATSAvailable

func (_e *Manager_Expecter) IsNATSAvailable(ctx interface{}, namespace interface{}) *Manager_IsNATSAvailable_Call

IsNATSAvailable is a helper method to define mock.On call

  • ctx context.Context
  • namespace string

func (*Manager_Expecter) SetBackendConfig

func (_e *Manager_Expecter) SetBackendConfig(config interface{}) *Manager_SetBackendConfig_Call

SetBackendConfig is a helper method to define mock.On call

  • config env.BackendConfig

func (*Manager_Expecter) SubscriptionExists

func (_e *Manager_Expecter) SubscriptionExists(ctx interface{}) *Manager_SubscriptionExists_Call

SubscriptionExists is a helper method to define mock.On call

  • ctx context.Context

type Manager_GetBackendConfig_Call

type Manager_GetBackendConfig_Call struct {
	*mock.Call
}

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

func (*Manager_GetBackendConfig_Call) Return

func (*Manager_GetBackendConfig_Call) Run

func (*Manager_GetBackendConfig_Call) RunAndReturn

type Manager_IsNATSAvailable_Call

type Manager_IsNATSAvailable_Call struct {
	*mock.Call
}

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

func (*Manager_IsNATSAvailable_Call) Return

func (*Manager_IsNATSAvailable_Call) Run

func (*Manager_IsNATSAvailable_Call) RunAndReturn

type Manager_SetBackendConfig_Call

type Manager_SetBackendConfig_Call struct {
	*mock.Call
}

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

func (*Manager_SetBackendConfig_Call) Return

func (*Manager_SetBackendConfig_Call) Run

func (*Manager_SetBackendConfig_Call) RunAndReturn

type Manager_SubscriptionExists_Call

type Manager_SubscriptionExists_Call struct {
	*mock.Call
}

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

func (*Manager_SubscriptionExists_Call) Return

func (*Manager_SubscriptionExists_Call) Run

func (*Manager_SubscriptionExists_Call) RunAndReturn

Jump to

Keyboard shortcuts

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