Documentation ¶
Index ¶
- type K8SClientMock
- func (client *K8SClientMock) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (client *K8SClientMock) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (client *K8SClientMock) Get(ctx context.Context, key types.NamespacedName, obj client.Object, ...) error
- func (client *K8SClientMock) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (client *K8SClientMock) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (client *K8SClientMock) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- func (client *K8SClientMock) Watch(ctx context.Context, obj client.ObjectList, opts ...client.ListOption) (watch.Interface, error)
- type K8SDiscoveryMock
- func (getter *K8SDiscoveryMock) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)
- func (getter *K8SDiscoveryMock) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
- func (getter *K8SDiscoveryMock) ServerPreferredResources() ([]*metav1.APIResourceList, error)
- func (getter *K8SDiscoveryMock) ServerResources() ([]*metav1.APIResourceList, error)
- func (getter *K8SDiscoveryMock) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
- type K8SDynamicClientMock
- type K8SNamespaceMock
- type K8SResourceMock
- func (getter *K8SResourceMock) Create(ctx context.Context, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (getter *K8SResourceMock) Delete(ctx context.Context, name string, options metav1.DeleteOptions, ...) error
- func (getter *K8SResourceMock) DeleteCollection(ctx context.Context, options metav1.DeleteOptions, ...) error
- func (getter *K8SResourceMock) Get(ctx context.Context, name string, options metav1.GetOptions, ...) (*unstructured.Unstructured, error)
- func (getter *K8SResourceMock) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
- func (getter *K8SResourceMock) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (*unstructured.Unstructured, error)
- func (getter *K8SResourceMock) Update(ctx context.Context, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (getter *K8SResourceMock) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (getter *K8SResourceMock) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8SClientMock ¶
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 ¶
K8SDynamicClientMock represents struct for mocking a dynamic resource client in k8s
func (*K8SDynamicClientMock) Resource ¶
func (getter *K8SDynamicClientMock) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface
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 ¶
func (getter *K8SResourceMock) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
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 ¶
func (getter *K8SResourceMock) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error)
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