mocks

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 9 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 added in v0.19.1

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) 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 v0.29.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 v0.29.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 added in v0.16.0

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

RESTMapper provides a mock function with given fields:

func (*Client) Scheme added in v0.16.0

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 added in v0.24.1

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 NewClientFunc added in v0.29.0

type NewClientFunc struct {
	mock.Mock
}

NewClientFunc is an autogenerated mock type for the NewClientFunc type

func NewNewClientFunc added in v0.29.0

func NewNewClientFunc(t interface {
	mock.TestingT
	Cleanup(func())
}) *NewClientFunc

NewNewClientFunc creates a new instance of NewClientFunc. 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 (*NewClientFunc) Execute added in v0.29.0

func (_m *NewClientFunc) Execute(config *rest.Config, options client.Options) (client.Client, error)

Execute provides a mock function with given fields: config, options

type Object added in v0.16.0

type Object struct {
	mock.Mock
}

Object is an autogenerated mock type for the Object type

func NewObject added in v0.19.1

func NewObject(t interface {
	mock.TestingT
	Cleanup(func())
}) *Object

NewObject creates a new instance of Object. 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 (*Object) DeepCopyObject added in v0.16.0

func (_m *Object) DeepCopyObject() runtime.Object

DeepCopyObject provides a mock function with given fields:

func (*Object) GetAnnotations added in v0.16.0

func (_m *Object) GetAnnotations() map[string]string

GetAnnotations provides a mock function with given fields:

func (*Object) GetCreationTimestamp added in v0.16.0

func (_m *Object) GetCreationTimestamp() v1.Time

GetCreationTimestamp provides a mock function with given fields:

func (*Object) GetDeletionGracePeriodSeconds added in v0.16.0

func (_m *Object) GetDeletionGracePeriodSeconds() *int64

GetDeletionGracePeriodSeconds provides a mock function with given fields:

func (*Object) GetDeletionTimestamp added in v0.16.0

func (_m *Object) GetDeletionTimestamp() *v1.Time

GetDeletionTimestamp provides a mock function with given fields:

func (*Object) GetFinalizers added in v0.16.0

func (_m *Object) GetFinalizers() []string

GetFinalizers provides a mock function with given fields:

func (*Object) GetGenerateName added in v0.16.0

func (_m *Object) GetGenerateName() string

GetGenerateName provides a mock function with given fields:

func (*Object) GetGeneration added in v0.16.0

func (_m *Object) GetGeneration() int64

GetGeneration provides a mock function with given fields:

func (*Object) GetLabels added in v0.16.0

func (_m *Object) GetLabels() map[string]string

GetLabels provides a mock function with given fields:

func (*Object) GetManagedFields added in v0.16.0

func (_m *Object) GetManagedFields() []v1.ManagedFieldsEntry

GetManagedFields provides a mock function with given fields:

func (*Object) GetName added in v0.16.0

func (_m *Object) GetName() string

GetName provides a mock function with given fields:

func (*Object) GetNamespace added in v0.16.0

func (_m *Object) GetNamespace() string

GetNamespace provides a mock function with given fields:

func (*Object) GetObjectKind added in v0.16.0

func (_m *Object) GetObjectKind() schema.ObjectKind

GetObjectKind provides a mock function with given fields:

func (*Object) GetOwnerReferences added in v0.16.0

func (_m *Object) GetOwnerReferences() []v1.OwnerReference

GetOwnerReferences provides a mock function with given fields:

func (*Object) GetResourceVersion added in v0.16.0

func (_m *Object) GetResourceVersion() string

GetResourceVersion provides a mock function with given fields:

func (_m *Object) GetSelfLink() string

GetSelfLink provides a mock function with given fields:

func (*Object) GetUID added in v0.16.0

func (_m *Object) GetUID() types.UID

GetUID provides a mock function with given fields:

func (*Object) SetAnnotations added in v0.16.0

func (_m *Object) SetAnnotations(annotations map[string]string)

SetAnnotations provides a mock function with given fields: annotations

func (*Object) SetCreationTimestamp added in v0.16.0

func (_m *Object) SetCreationTimestamp(timestamp v1.Time)

SetCreationTimestamp provides a mock function with given fields: timestamp

func (*Object) SetDeletionGracePeriodSeconds added in v0.16.0

func (_m *Object) SetDeletionGracePeriodSeconds(_a0 *int64)

SetDeletionGracePeriodSeconds provides a mock function with given fields: _a0

func (*Object) SetDeletionTimestamp added in v0.16.0

func (_m *Object) SetDeletionTimestamp(timestamp *v1.Time)

SetDeletionTimestamp provides a mock function with given fields: timestamp

func (*Object) SetFinalizers added in v0.16.0

func (_m *Object) SetFinalizers(finalizers []string)

SetFinalizers provides a mock function with given fields: finalizers

func (*Object) SetGenerateName added in v0.16.0

func (_m *Object) SetGenerateName(name string)

SetGenerateName provides a mock function with given fields: name

func (*Object) SetGeneration added in v0.16.0

func (_m *Object) SetGeneration(generation int64)

SetGeneration provides a mock function with given fields: generation

func (*Object) SetLabels added in v0.16.0

func (_m *Object) SetLabels(labels map[string]string)

SetLabels provides a mock function with given fields: labels

func (*Object) SetManagedFields added in v0.16.0

func (_m *Object) SetManagedFields(managedFields []v1.ManagedFieldsEntry)

SetManagedFields provides a mock function with given fields: managedFields

func (*Object) SetName added in v0.16.0

func (_m *Object) SetName(name string)

SetName provides a mock function with given fields: name

func (*Object) SetNamespace added in v0.16.0

func (_m *Object) SetNamespace(namespace string)

SetNamespace provides a mock function with given fields: namespace

func (*Object) SetOwnerReferences added in v0.16.0

func (_m *Object) SetOwnerReferences(_a0 []v1.OwnerReference)

SetOwnerReferences provides a mock function with given fields: _a0

func (*Object) SetResourceVersion added in v0.16.0

func (_m *Object) SetResourceVersion(version string)

SetResourceVersion provides a mock function with given fields: version

func (_m *Object) SetSelfLink(selfLink string)

SetSelfLink provides a mock function with given fields: selfLink

func (*Object) SetUID added in v0.16.0

func (_m *Object) SetUID(uid types.UID)

SetUID provides a mock function with given fields: uid

type ObjectList added in v0.16.0

type ObjectList struct {
	mock.Mock
}

ObjectList is an autogenerated mock type for the ObjectList type

func NewObjectList added in v0.19.1

func NewObjectList(t interface {
	mock.TestingT
	Cleanup(func())
}) *ObjectList

NewObjectList creates a new instance of ObjectList. 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 (*ObjectList) DeepCopyObject added in v0.16.0

func (_m *ObjectList) DeepCopyObject() runtime.Object

DeepCopyObject provides a mock function with given fields:

func (*ObjectList) GetContinue added in v0.16.0

func (_m *ObjectList) GetContinue() string

GetContinue provides a mock function with given fields:

func (*ObjectList) GetObjectKind added in v0.16.0

func (_m *ObjectList) GetObjectKind() schema.ObjectKind

GetObjectKind provides a mock function with given fields:

func (*ObjectList) GetRemainingItemCount added in v0.16.0

func (_m *ObjectList) GetRemainingItemCount() *int64

GetRemainingItemCount provides a mock function with given fields:

func (*ObjectList) GetResourceVersion added in v0.16.0

func (_m *ObjectList) GetResourceVersion() string

GetResourceVersion provides a mock function with given fields:

func (_m *ObjectList) GetSelfLink() string

GetSelfLink provides a mock function with given fields:

func (*ObjectList) SetContinue added in v0.16.0

func (_m *ObjectList) SetContinue(c string)

SetContinue provides a mock function with given fields: c

func (*ObjectList) SetRemainingItemCount added in v0.16.0

func (_m *ObjectList) SetRemainingItemCount(c *int64)

SetRemainingItemCount provides a mock function with given fields: c

func (*ObjectList) SetResourceVersion added in v0.16.0

func (_m *ObjectList) SetResourceVersion(version string)

SetResourceVersion provides a mock function with given fields: version

func (_m *ObjectList) SetSelfLink(selfLink string)

SetSelfLink provides a mock function with given fields: selfLink

type Reader added in v0.14.1

type Reader struct {
	mock.Mock
}

Reader is an autogenerated mock type for the Reader type

func NewReader added in v0.19.1

func NewReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *Reader

NewReader creates a new instance of Reader. 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 (*Reader) Get added in v0.14.1

func (_m *Reader) 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 (*Reader) List added in v0.14.1

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

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

type StatusClient

type StatusClient struct {
	mock.Mock
}

StatusClient is an autogenerated mock type for the StatusClient type

func NewStatusClient added in v0.19.1

func NewStatusClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *StatusClient

NewStatusClient creates a new instance of StatusClient. 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 (*StatusClient) Status

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

Status provides a mock function with given fields:

type SubResourceClient added in v0.24.1

type SubResourceClient struct {
	mock.Mock
}

SubResourceClient is an autogenerated mock type for the SubResourceClient type

func NewSubResourceClient added in v0.24.1

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

func (*SubResourceClient) Create added in v0.24.1

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 v0.24.1

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 v0.24.1

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

func (*SubResourceClient) Update added in v0.24.1

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

type SubResourceClientConstructor added in v0.24.1

type SubResourceClientConstructor struct {
	mock.Mock
}

SubResourceClientConstructor is an autogenerated mock type for the SubResourceClientConstructor type

func NewSubResourceClientConstructor added in v0.24.1

func NewSubResourceClientConstructor(t interface {
	mock.TestingT
	Cleanup(func())
}) *SubResourceClientConstructor

NewSubResourceClientConstructor creates a new instance of SubResourceClientConstructor. 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 (*SubResourceClientConstructor) SubResource added in v0.24.1

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

SubResource provides a mock function with given fields: subResource

type SubResourceReader added in v0.24.1

type SubResourceReader struct {
	mock.Mock
}

SubResourceReader is an autogenerated mock type for the SubResourceReader type

func NewSubResourceReader added in v0.24.1

func NewSubResourceReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *SubResourceReader

NewSubResourceReader creates a new instance of SubResourceReader. 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 (*SubResourceReader) Get added in v0.24.1

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

type SubResourceWriter added in v0.24.1

type SubResourceWriter struct {
	mock.Mock
}

SubResourceWriter is an autogenerated mock type for the SubResourceWriter type

func NewSubResourceWriter added in v0.24.1

func NewSubResourceWriter(t interface {
	mock.TestingT
	Cleanup(func())
}) *SubResourceWriter

NewSubResourceWriter creates a new instance of SubResourceWriter. 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 (*SubResourceWriter) Create added in v0.24.1

func (_m *SubResourceWriter) 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 (*SubResourceWriter) Patch added in v0.24.1

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

func (*SubResourceWriter) Update added in v0.24.1

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