unstructured

package
v0.0.0-...-3e220e4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: GPL-3.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 K8SClientMock

type K8SClientMock struct {
	mock.Mock
	client.WithWatch
}

K8SClientMock represents mock struct for k8s runtime client

func (*K8SClientMock) Create

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

Create represents mock func for similar dynamic runtime client func

func (*K8SClientMock) Delete

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

func (*K8SClientMock) Get

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

Get represents mock func for similar dynamic runtime client func

func (*K8SClientMock) List

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

List represents mock func for similar dynamic runtime client func

func (*K8SClientMock) Patch

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

Patch represents mock func for similar dynamic runtime client func

func (*K8SClientMock) Update

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

Update represents mock func for similar dynamic runtime client func

func (*K8SClientMock) Watch

func (client *K8SClientMock) Watch(ctx context.Context, obj client.ObjectList, opts ...client.ListOption) (watch.Interface, error)

Watch represents mock func for similar dynamic runtime client func

type K8SDiscoveryMock

type K8SDiscoveryMock struct {
	mock.Mock
	discovery.ServerResourcesInterface
}

K8SDiscoveryMock represents struct for mocking a runtime discovery client

func (*K8SDiscoveryMock) ServerGroupsAndResources

func (getter *K8SDiscoveryMock) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)

ServerGroupsAndResources represents mock func for similar runtime discovery client func

func (*K8SDiscoveryMock) ServerPreferredNamespacedResources

func (getter *K8SDiscoveryMock) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)

ServerPreferredNamespacedResources represents mock func for similar runtime discovery client func

func (*K8SDiscoveryMock) ServerPreferredResources

func (getter *K8SDiscoveryMock) ServerPreferredResources() ([]*metav1.APIResourceList, error)

ServerPreferredResources represents mock func for similar runtime discovery client func

func (*K8SDiscoveryMock) ServerResources

func (getter *K8SDiscoveryMock) ServerResources() ([]*metav1.APIResourceList, error)

ServerResources represents mock func for similar runtime discovery client func

func (*K8SDiscoveryMock) ServerResourcesForGroupVersion

func (getter *K8SDiscoveryMock) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)

ServerResourcesForGroupVersion represents mock func for similar runtime discovery client func

type K8SDynamicClientMock

type K8SDynamicClientMock struct {
	mock.Mock
	dynamic.Interface
}

K8SDynamicClientMock represents struct for mocking a dynamic resource client in k8s

func (*K8SDynamicClientMock) Resource

Resource represents mock func for similar dynamic runtime client func for getting a resource struct

type K8SNamespaceMock

type K8SNamespaceMock struct {
	mock.Mock
	dynamic.NamespaceableResourceInterface
}

K8SNamespaceMock represents struct for mocking a namespaced unstructured resource

func (*K8SNamespaceMock) Namespace

func (getter *K8SNamespaceMock) Namespace(resource string) dynamic.ResourceInterface

Namespace represents mock func for similar dynamic runtime client func for getting a namespaced resource struct

type K8SResourceMock

type K8SResourceMock struct {
	mock.Mock
	dynamic.ResourceInterface
}

K8SResourceMock represents struct for mocking a unstructured resource

func (*K8SResourceMock) Create

func (getter *K8SResourceMock) Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)

Create represents mock func for similar runtime client func

func (*K8SResourceMock) Delete

func (getter *K8SResourceMock) Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error

Delete represents mock func for similar runtime client func

func (*K8SResourceMock) DeleteCollection

func (getter *K8SResourceMock) DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error

DeleteCollection represents mock func for similar runtime client func

func (*K8SResourceMock) Get

func (getter *K8SResourceMock) Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)

Get represents mock func for similar runtime client func

func (*K8SResourceMock) List

List represents mock func for similar runtime client func

func (*K8SResourceMock) Patch

func (getter *K8SResourceMock) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error)

Patch represents mock func for similar runtime client func

func (*K8SResourceMock) Update

func (getter *K8SResourceMock) Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)

Update represents mock func for similar runtime client func

func (*K8SResourceMock) UpdateStatus

UpdateStatus represents mock func for similar runtime client func

func (*K8SResourceMock) Watch

func (getter *K8SResourceMock) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)

Watch represents mock func for similar runtime client func

Jump to

Keyboard shortcuts

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