mocks

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 8 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
	// contains filtered or unexported fields
}

Client is an autogenerated mock type for the Client type

func NewClient added in v1.16.0

func NewClient(t mockConstructorTestingTNewClient) *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.

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 added in v1.20.0

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 added in v1.20.0

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

GroupVersionKindFor provides a mock function with given fields: obj

func (*Client) IsObjectNamespaced added in v1.20.0

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. Overrides normal mock functionality (can't be asserted)

func (*Client) SubResource added in v1.16.0

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

SubResource provides a mock function with given fields: subResource. Overrides normal mock functionality (can't be asserted)

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 added in v1.20.0

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 added in v1.20.0

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

func (*Client_Create_Call) Run added in v1.20.0

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 added in v1.20.0

type Client_DeleteAllOf_Call added in v1.20.0

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 added in v1.20.0

func (*Client_DeleteAllOf_Call) Run added in v1.20.0

func (*Client_DeleteAllOf_Call) RunAndReturn added in v1.20.0

type Client_Delete_Call added in v1.20.0

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 added in v1.20.0

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

func (*Client_Delete_Call) Run added in v1.20.0

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 added in v1.20.0

type Client_Expecter added in v1.20.0

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

func (*Client_Expecter) Create added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

func (_e *Client_Expecter) RESTMapper() *Client_RESTMapper_Call

RESTMapper is a helper method to define mock.On call

func (*Client_Expecter) Scheme added in v1.20.0

func (_e *Client_Expecter) Scheme() *Client_Scheme_Call

Scheme is a helper method to define mock.On call

func (*Client_Expecter) Status added in v1.20.0

func (_e *Client_Expecter) Status() *Client_Status_Call

Status is a helper method to define mock.On call

func (*Client_Expecter) SubResource added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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 added in v1.20.0

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

func (*Client_Get_Call) Run added in v1.20.0

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 added in v1.20.0

type Client_GroupVersionKindFor_Call added in v1.20.0

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 added in v1.20.0

func (*Client_GroupVersionKindFor_Call) Run added in v1.20.0

func (*Client_GroupVersionKindFor_Call) RunAndReturn added in v1.20.0

type Client_IsObjectNamespaced_Call added in v1.20.0

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 added in v1.20.0

func (*Client_IsObjectNamespaced_Call) Run added in v1.20.0

func (*Client_IsObjectNamespaced_Call) RunAndReturn added in v1.20.0

type Client_List_Call added in v1.20.0

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 added in v1.20.0

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

func (*Client_List_Call) Run added in v1.20.0

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 added in v1.20.0

type Client_Patch_Call added in v1.20.0

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 added in v1.20.0

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

func (*Client_Patch_Call) Run added in v1.20.0

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 added in v1.20.0

type Client_RESTMapper_Call added in v1.20.0

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 added in v1.20.0

func (*Client_RESTMapper_Call) Run added in v1.20.0

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

func (*Client_RESTMapper_Call) RunAndReturn added in v1.20.0

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

type Client_Scheme_Call added in v1.20.0

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 added in v1.20.0

func (*Client_Scheme_Call) Run added in v1.20.0

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

func (*Client_Scheme_Call) RunAndReturn added in v1.20.0

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

type Client_Status_Call added in v1.20.0

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 added in v1.20.0

func (*Client_Status_Call) Run added in v1.20.0

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

func (*Client_Status_Call) RunAndReturn added in v1.20.0

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

type Client_SubResource_Call added in v1.20.0

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 added in v1.20.0

func (*Client_SubResource_Call) Run added in v1.20.0

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

func (*Client_SubResource_Call) RunAndReturn added in v1.20.0

type Client_Update_Call added in v1.20.0

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 added in v1.20.0

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

func (*Client_Update_Call) Run added in v1.20.0

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 added in v1.20.0

type HttpClient

type HttpClient struct {
	mock.Mock
}

HttpClient is an autogenerated mock type for the HttpClient type

func NewHttpClient added in v1.16.0

func NewHttpClient(t mockConstructorTestingTNewHttpClient) *HttpClient

NewHttpClient creates a new instance of HttpClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*HttpClient) Do

func (_m *HttpClient) Do(req *http.Request) (*http.Response, error)

Do provides a mock function with given fields: req

type SubResourceClient added in v1.16.0

type SubResourceClient struct {
	mock.Mock
}

SubResourceClient is an autogenerated mock type for the SubResourceClient type

func NewSubResourceClient added in v1.16.0

func NewSubResourceClient(t mockConstructorTestingTNewSubResourceClient) *SubResourceClient

NewSubResourceClient creates a new instance of SubResourceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SubResourceClient) Create added in v1.16.0

func (_m *SubResourceClient) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error

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

func (*SubResourceClient) Get added in v1.16.0

func (_m *SubResourceClient) Get(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceGetOption) error

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

func (*SubResourceClient) Patch added in v1.16.0

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

func (*SubResourceClient) Update added in v1.16.0

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

Jump to

Keyboard shortcuts

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