client

package
v1.12.6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

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

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

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

func (*MockClient) Delete

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

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

func (*MockClient) DeleteAllOf

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

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

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Get

func (_m *MockClient) 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 (*MockClient) GroupVersionKindFor

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

GroupVersionKindFor provides a mock function with given fields: obj

func (*MockClient) IsObjectNamespaced

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

IsObjectNamespaced provides a mock function with given fields: obj

func (*MockClient) List

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

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

func (*MockClient) Patch

func (_m *MockClient) 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 (*MockClient) RESTMapper

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

RESTMapper provides a mock function with given fields:

func (*MockClient) Scheme

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

Scheme provides a mock function with given fields:

func (*MockClient) Status

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

Status provides a mock function with given fields:

func (*MockClient) SubResource

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

SubResource provides a mock function with given fields: subResource

func (*MockClient) Update

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

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

type MockClient_Create_Call

type MockClient_Create_Call struct {
	*mock.Call
}

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

func (*MockClient_Create_Call) Return

func (*MockClient_Create_Call) Run

func (*MockClient_Create_Call) RunAndReturn

type MockClient_DeleteAllOf_Call

type MockClient_DeleteAllOf_Call struct {
	*mock.Call
}

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

func (*MockClient_DeleteAllOf_Call) Return

func (*MockClient_DeleteAllOf_Call) Run

func (*MockClient_DeleteAllOf_Call) RunAndReturn

type MockClient_Delete_Call

type MockClient_Delete_Call struct {
	*mock.Call
}

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

func (*MockClient_Delete_Call) Return

func (*MockClient_Delete_Call) Run

func (*MockClient_Delete_Call) RunAndReturn

type MockClient_Expecter

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

func (*MockClient_Expecter) Create

func (_e *MockClient_Expecter) Create(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Create_Call

Create is a helper method to define mock.On call

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

func (*MockClient_Expecter) Delete

func (_e *MockClient_Expecter) Delete(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Delete_Call

Delete is a helper method to define mock.On call

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

func (*MockClient_Expecter) DeleteAllOf

func (_e *MockClient_Expecter) DeleteAllOf(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_DeleteAllOf_Call

DeleteAllOf is a helper method to define mock.On call

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

func (*MockClient_Expecter) Get

func (_e *MockClient_Expecter) Get(ctx interface{}, key interface{}, obj interface{}, opts ...interface{}) *MockClient_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 (*MockClient_Expecter) GroupVersionKindFor

func (_e *MockClient_Expecter) GroupVersionKindFor(obj interface{}) *MockClient_GroupVersionKindFor_Call

GroupVersionKindFor is a helper method to define mock.On call

  • obj runtime.Object

func (*MockClient_Expecter) IsObjectNamespaced

func (_e *MockClient_Expecter) IsObjectNamespaced(obj interface{}) *MockClient_IsObjectNamespaced_Call

IsObjectNamespaced is a helper method to define mock.On call

  • obj runtime.Object

func (*MockClient_Expecter) List

func (_e *MockClient_Expecter) List(ctx interface{}, list interface{}, opts ...interface{}) *MockClient_List_Call

List is a helper method to define mock.On call

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

func (*MockClient_Expecter) Patch

func (_e *MockClient_Expecter) Patch(ctx interface{}, obj interface{}, patch interface{}, opts ...interface{}) *MockClient_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 (*MockClient_Expecter) RESTMapper

RESTMapper is a helper method to define mock.On call

func (*MockClient_Expecter) Scheme

Scheme is a helper method to define mock.On call

func (*MockClient_Expecter) Status

Status is a helper method to define mock.On call

func (*MockClient_Expecter) SubResource

func (_e *MockClient_Expecter) SubResource(subResource interface{}) *MockClient_SubResource_Call

SubResource is a helper method to define mock.On call

  • subResource string

func (*MockClient_Expecter) Update

func (_e *MockClient_Expecter) Update(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Update_Call

Update is a helper method to define mock.On call

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

type MockClient_Get_Call

type MockClient_Get_Call struct {
	*mock.Call
}

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

func (*MockClient_Get_Call) Return

func (*MockClient_Get_Call) Run

func (*MockClient_Get_Call) RunAndReturn

type MockClient_GroupVersionKindFor_Call

type MockClient_GroupVersionKindFor_Call struct {
	*mock.Call
}

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

func (*MockClient_GroupVersionKindFor_Call) Return

func (*MockClient_GroupVersionKindFor_Call) Run

func (*MockClient_GroupVersionKindFor_Call) RunAndReturn

type MockClient_IsObjectNamespaced_Call

type MockClient_IsObjectNamespaced_Call struct {
	*mock.Call
}

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

func (*MockClient_IsObjectNamespaced_Call) Return

func (*MockClient_IsObjectNamespaced_Call) Run

func (*MockClient_IsObjectNamespaced_Call) RunAndReturn

type MockClient_List_Call

type MockClient_List_Call struct {
	*mock.Call
}

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

func (*MockClient_List_Call) Return

func (*MockClient_List_Call) Run

func (*MockClient_List_Call) RunAndReturn

type MockClient_Patch_Call

type MockClient_Patch_Call struct {
	*mock.Call
}

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

func (*MockClient_Patch_Call) Return

func (*MockClient_Patch_Call) Run

func (*MockClient_Patch_Call) RunAndReturn

type MockClient_RESTMapper_Call

type MockClient_RESTMapper_Call struct {
	*mock.Call
}

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

func (*MockClient_RESTMapper_Call) Return

func (*MockClient_RESTMapper_Call) Run

func (*MockClient_RESTMapper_Call) RunAndReturn

type MockClient_Scheme_Call

type MockClient_Scheme_Call struct {
	*mock.Call
}

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

func (*MockClient_Scheme_Call) Return

func (*MockClient_Scheme_Call) Run

func (_c *MockClient_Scheme_Call) Run(run func()) *MockClient_Scheme_Call

func (*MockClient_Scheme_Call) RunAndReturn

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

type MockClient_Status_Call

type MockClient_Status_Call struct {
	*mock.Call
}

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

func (*MockClient_Status_Call) Return

func (*MockClient_Status_Call) Run

func (_c *MockClient_Status_Call) Run(run func()) *MockClient_Status_Call

func (*MockClient_Status_Call) RunAndReturn

type MockClient_SubResource_Call

type MockClient_SubResource_Call struct {
	*mock.Call
}

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

func (*MockClient_SubResource_Call) Return

func (*MockClient_SubResource_Call) Run

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

func (*MockClient_SubResource_Call) RunAndReturn

type MockClient_Update_Call

type MockClient_Update_Call struct {
	*mock.Call
}

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

func (*MockClient_Update_Call) Return

func (*MockClient_Update_Call) Run

func (*MockClient_Update_Call) RunAndReturn

Jump to

Keyboard shortcuts

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