clientgoclient

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAppsV1

type FakeAppsV1 struct {
	FakeClient client.Client
}

FakeAppsV1 implements AppsV1Interface

func (*FakeAppsV1) ControllerRevisions

func (c *FakeAppsV1) ControllerRevisions(_ string) v1.ControllerRevisionInterface

ControllerRevisions takes a namespace and returns an ControllerRevisionInterface

func (*FakeAppsV1) DaemonSets

func (c *FakeAppsV1) DaemonSets(namespace string) v1.DaemonSetInterface

DaemonSets takea a namespace and returns an DaemonSetInterface

func (*FakeAppsV1) Deployments

func (c *FakeAppsV1) Deployments(namespace string) v1.DeploymentInterface

Deployments takea a namespace and returns an DeploymentInterface

func (*FakeAppsV1) RESTClient

func (c *FakeAppsV1) RESTClient() rest.Interface

RESTClient returns a RESTClient that is used to communicate with API server by this client implementation.

func (*FakeAppsV1) ReplicaSets

func (c *FakeAppsV1) ReplicaSets(_ string) v1.ReplicaSetInterface

ReplicaSets takes a namespace and returns an ReplicaSetInterface

func (*FakeAppsV1) StatefulSets

func (c *FakeAppsV1) StatefulSets(_ string) v1.StatefulSetInterface

StatefulSets takes a namespace and returns an StatefulSetInterface

type FakeDaemonSets

type FakeDaemonSets struct {
	FakeClient client.Client
	Namespace  string
}

FakeDaemonSets implements DaemonSetInterface

func (*FakeDaemonSets) Apply

Apply takes the given apply declarative configuration, applies it and returns the applied daemonSet.

func (*FakeDaemonSets) ApplyStatus

ApplyStatus was generated because the type contains a Status member. Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().

func (*FakeDaemonSets) Create

func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet, _ v1.CreateOptions) (result *appsv1.DaemonSet, err error)

Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.

func (*FakeDaemonSets) Delete

Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.

func (*FakeDaemonSets) DeleteCollection

func (c *FakeDaemonSets) DeleteCollection(_ context.Context, _ v1.DeleteOptions, _ v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeDaemonSets) Get

func (c *FakeDaemonSets) Get(ctx context.Context, name string, _ v1.GetOptions) (result *appsv1.DaemonSet, err error)

Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.

func (*FakeDaemonSets) List

func (c *FakeDaemonSets) List(_ context.Context, _ v1.ListOptions) (result *appsv1.DaemonSetList, err error)

List takes label and field selectors, and returns the list of DaemonSets that match those selectors.

func (*FakeDaemonSets) Patch

func (c *FakeDaemonSets) Patch(_ context.Context, _ string, _ types.PatchType, _ []byte, _ v1.PatchOptions, _ ...string) (result *appsv1.DaemonSet, err error)

Patch applies the patch and returns the patched daemonSet.

func (*FakeDaemonSets) Update

func (c *FakeDaemonSets) Update(_ context.Context, _ *appsv1.DaemonSet, _ v1.UpdateOptions) (result *appsv1.DaemonSet, err error)

Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.

func (*FakeDaemonSets) UpdateStatus

UpdateStatus was generated because the type contains a Status member. Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().

func (*FakeDaemonSets) Watch

Watch returns a watch.Interface that watches the requested daemonSets.

type FakeDeployments

type FakeDeployments struct {
	FakeClient client.Client
	Namespace  string
}

FakeDeployments implements DeploymentInterface

func (*FakeDeployments) Apply

Apply takes the given apply declarative configuration, applies it and returns the applied deployment.

func (*FakeDeployments) ApplyScale

ApplyScale takes top resource name and the apply declarative configuration for scale, applies it and returns the applied scale, and an error, if there is any.

func (*FakeDeployments) ApplyStatus

ApplyStatus was generated because the type contains a Status member. Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().

func (*FakeDeployments) AutoscalingV2

AutoscalingV2 takes top resource name and the apply declarative configuration for scale, applies it and returns the applied scale, and an error, if there is any.

func (*FakeDeployments) Create

func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deployment, _ v1.CreateOptions) (result *appsv1.Deployment, err error)

Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.

func (*FakeDeployments) Delete

Delete takes name of the deployment and deletes it. Returns an error if one occurs.

func (*FakeDeployments) DeleteCollection

func (c *FakeDeployments) DeleteCollection(_ context.Context, _ v1.DeleteOptions, _ v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeDeployments) Get

func (c *FakeDeployments) Get(ctx context.Context, name string, _ v1.GetOptions) (result *appsv1.Deployment, err error)

Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.

func (*FakeDeployments) GetScale

func (c *FakeDeployments) GetScale(_ context.Context, _ string, _ v1.GetOptions) (result *autoscalingv1.Scale, err error)

GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any.

func (*FakeDeployments) List

func (c *FakeDeployments) List(_ context.Context, _ v1.ListOptions) (result *appsv1.DeploymentList, err error)

List takes label and field selectors, and returns the list of Deployments that match those selectors.

func (*FakeDeployments) Patch

func (c *FakeDeployments) Patch(_ context.Context, _ string, _ types.PatchType, _ []byte, _ v1.PatchOptions, _ ...string) (result *appsv1.Deployment, err error)

Patch applies the patch and returns the patched deployment.

func (*FakeDeployments) Update

Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.

func (*FakeDeployments) UpdateScale

func (c *FakeDeployments) UpdateScale(_ context.Context, _ string, _ *autoscalingv1.Scale, _ v1.UpdateOptions) (result *autoscalingv1.Scale, err error)

UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.

func (*FakeDeployments) UpdateStatus

UpdateStatus was generated because the type contains a Status member. Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().

func (*FakeDeployments) Watch

Watch returns a watch.Interface that watches the requested deployments.

type K8sClient

type K8sClient struct {
	FakeClient client.Client
}

K8sClient implements client-go kubernetes interface Internally it's calling the FakeClient to apply/get/create/delete etc. as they need to shared the same map in memory

func NewFakeClient

func NewFakeClient(c client.Client) *K8sClient

NewFakeClient returns a new K8sClient

func (*K8sClient) AdmissionregistrationV1

AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client

func (*K8sClient) AdmissionregistrationV1alpha1 added in v1.3.0

AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client

func (*K8sClient) AdmissionregistrationV1beta1

AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client

func (*K8sClient) AppsV1

func (c *K8sClient) AppsV1() appsv1.AppsV1Interface

AppsV1 returns an fake AppsV1Interface implementation from the given client

func (*K8sClient) AppsV1beta1

func (c *K8sClient) AppsV1beta1() appsv1beta1.AppsV1beta1Interface

AppsV1beta1 retrieves the AppsV1beta1Client

func (*K8sClient) AppsV1beta2

func (c *K8sClient) AppsV1beta2() appsv1beta2.AppsV1beta2Interface

AppsV1beta2 retrieves the AppsV1beta2Client

func (*K8sClient) AuthenticationV1

AuthenticationV1 retrieves the AuthenticationV1Client

func (*K8sClient) AuthenticationV1alpha1 added in v1.3.0

AuthenticationV1alpha1 retrieves the AuthenticationV1alpha1Client

func (*K8sClient) AuthenticationV1beta1

AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client

func (*K8sClient) AuthorizationV1

func (c *K8sClient) AuthorizationV1() authorizationv1.AuthorizationV1Interface

AuthorizationV1 retrieves the AuthorizationV1Client

func (*K8sClient) AuthorizationV1beta1

AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client

func (*K8sClient) AutoscalingV1

func (c *K8sClient) AutoscalingV1() autoscalingv1.AutoscalingV1Interface

AutoscalingV1 retrieves the AutoscalingV1Client

func (*K8sClient) AutoscalingV2

func (c *K8sClient) AutoscalingV2() autoscalingv2.AutoscalingV2Interface

AutoscalingV2 retrieves the AutoscalingV2Client

func (*K8sClient) AutoscalingV2beta1

AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client

func (*K8sClient) AutoscalingV2beta2

AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client

func (*K8sClient) BatchV1

func (c *K8sClient) BatchV1() batchv1.BatchV1Interface

BatchV1 retrieves the BatchV1Client

func (*K8sClient) BatchV1beta1

func (c *K8sClient) BatchV1beta1() batchv1beta1.BatchV1beta1Interface

BatchV1beta1 retrieves the BatchV1beta1Client

func (*K8sClient) CertificatesV1

func (c *K8sClient) CertificatesV1() certificatesv1.CertificatesV1Interface

CertificatesV1 retrieves the CertificatesV1Client

func (*K8sClient) CertificatesV1alpha1 added in v1.3.0

CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client

func (*K8sClient) CertificatesV1beta1

CertificatesV1beta1 retrieves the CertificatesV1beta1Client

func (*K8sClient) CoordinationV1

func (c *K8sClient) CoordinationV1() coordinationv1.CoordinationV1Interface

CoordinationV1 retrieves the CoordinationV1Client

func (*K8sClient) CoordinationV1beta1

CoordinationV1beta1 retrieves the CoordinationV1beta1Client

func (*K8sClient) CoreV1

func (c *K8sClient) CoreV1() corev1.CoreV1Interface

CoreV1 retrieves the CoreV1Client

func (*K8sClient) Discovery

func (c *K8sClient) Discovery() discovery.DiscoveryInterface

Discovery retrieves DiscoveryInterface

func (*K8sClient) DiscoveryV1

func (c *K8sClient) DiscoveryV1() discoveryv1.DiscoveryV1Interface

DiscoveryV1 retrieves the DiscoveryV1Client

func (*K8sClient) DiscoveryV1beta1

DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client

func (*K8sClient) EventsV1

func (c *K8sClient) EventsV1() eventsv1.EventsV1Interface

EventsV1 retrieves the EventsV1Client

func (*K8sClient) EventsV1beta1

func (c *K8sClient) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface

EventsV1beta1 retrieves the EventsV1beta1Client

func (*K8sClient) ExtensionsV1beta1

ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client

func (*K8sClient) FlowcontrolV1alpha1

FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client

func (*K8sClient) FlowcontrolV1beta1

FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client

func (*K8sClient) FlowcontrolV1beta2

FlowcontrolV1beta2 retrieves the FlowcontrolV1beta2Client

func (*K8sClient) FlowcontrolV1beta3 added in v1.3.0

FlowcontrolV1beta3 retrieves the FlowcontrolV1beta3Client

func (*K8sClient) InternalV1alpha1

InternalV1alpha1 retrieves the InternalV1alpha1Client

func (*K8sClient) NetworkingV1

func (c *K8sClient) NetworkingV1() networkingv1.NetworkingV1Interface

NetworkingV1 retrieves the NetworkingV1Client

func (*K8sClient) NetworkingV1alpha1 added in v1.3.0

NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client

func (*K8sClient) NetworkingV1beta1

NetworkingV1beta1 retrieves the NetworkingV1beta1Client

func (*K8sClient) NodeV1

func (c *K8sClient) NodeV1() nodev1.NodeV1Interface

NodeV1 retrieves the NodeV1Client

func (*K8sClient) NodeV1alpha1

func (c *K8sClient) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface

NodeV1alpha1 retrieves the NodeV1alpha1Client

func (*K8sClient) NodeV1beta1

func (c *K8sClient) NodeV1beta1() nodev1beta1.NodeV1beta1Interface

NodeV1beta1 retrieves the NodeV1beta1Client

func (*K8sClient) PolicyV1

func (c *K8sClient) PolicyV1() policyv1.PolicyV1Interface

PolicyV1 retrieves the PolicyV1Client

func (*K8sClient) PolicyV1beta1

func (c *K8sClient) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface

PolicyV1beta1 retrieves the PolicyV1beta1Client

func (*K8sClient) RbacV1

func (c *K8sClient) RbacV1() rbacv1.RbacV1Interface

RbacV1 retrieves the RbacV1Client

func (*K8sClient) RbacV1alpha1

func (c *K8sClient) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface

RbacV1alpha1 retrieves the RbacV1alpha1Client

func (*K8sClient) RbacV1beta1

func (c *K8sClient) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface

RbacV1beta1 retrieves the RbacV1beta1Client

func (*K8sClient) ResourceV1alpha2 added in v1.3.0

ResourceV1alpha2 retrieves the ResourceV1alpha2Client

func (*K8sClient) SchedulingV1

func (c *K8sClient) SchedulingV1() schedulingv1.SchedulingV1Interface

SchedulingV1 retrieves the SchedulingV1Client

func (*K8sClient) SchedulingV1alpha1

SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client

func (*K8sClient) SchedulingV1beta1

SchedulingV1beta1 retrieves the SchedulingV1beta1Client

func (*K8sClient) StorageV1

func (c *K8sClient) StorageV1() storagev1.StorageV1Interface

StorageV1 retrieves the StorageV1Client

func (*K8sClient) StorageV1alpha1

func (c *K8sClient) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface

StorageV1alpha1 retrieves the StorageV1alpha1Client

func (*K8sClient) StorageV1beta1

func (c *K8sClient) StorageV1beta1() storagev1beta1.StorageV1beta1Interface

StorageV1beta1 retrieves the StorageV1beta1Client

Jump to

Keyboard shortcuts

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