fake

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package fake has the automatically generated clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCoreV1

type FakeCoreV1 struct {
	*testing.Fake
}

func (*FakeCoreV1) Endpoints

func (c *FakeCoreV1) Endpoints(namespace string) v1.EndpointsInterface

func (*FakeCoreV1) Namespaces

func (c *FakeCoreV1) Namespaces() v1.NamespaceInterface

func (*FakeCoreV1) Nodes

func (c *FakeCoreV1) Nodes() v1.NodeInterface

func (*FakeCoreV1) Pods

func (c *FakeCoreV1) Pods(namespace string) v1.PodInterface

func (*FakeCoreV1) RESTClient

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

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

func (*FakeCoreV1) Services

func (c *FakeCoreV1) Services(namespace string) v1.ServiceInterface

type FakeEndpoints

type FakeEndpoints struct {
	Fake *FakeCoreV1
	// contains filtered or unexported fields
}

FakeEndpoints implements EndpointsInterface

func (*FakeEndpoints) Create

func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints, opts v1.CreateOptions) (result *corev1.Endpoints, err error)

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

func (*FakeEndpoints) Delete

func (c *FakeEndpoints) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error

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

func (*FakeEndpoints) DeleteCollection

func (c *FakeEndpoints) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeEndpoints) Get

func (c *FakeEndpoints) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Endpoints, err error)

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

func (*FakeEndpoints) List

func (c *FakeEndpoints) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EndpointsList, err error)

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

func (*FakeEndpoints) Patch

func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Endpoints, err error)

Patch applies the patch and returns the patched endpoints.

func (*FakeEndpoints) Update

func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints, opts v1.UpdateOptions) (result *corev1.Endpoints, err error)

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

func (*FakeEndpoints) Watch

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

type FakeNamespaces

type FakeNamespaces struct {
	Fake *FakeCoreV1
}

FakeNamespaces implements NamespaceInterface

func (*FakeNamespaces) Create

func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace, opts v1.CreateOptions) (result *corev1.Namespace, err error)

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

func (*FakeNamespaces) Delete

func (c *FakeNamespaces) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error

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

func (*FakeNamespaces) Get

func (c *FakeNamespaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Namespace, err error)

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

func (*FakeNamespaces) List

func (c *FakeNamespaces) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NamespaceList, err error)

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

func (*FakeNamespaces) Patch

func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Namespace, err error)

Patch applies the patch and returns the patched namespace.

func (*FakeNamespaces) Update

func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (result *corev1.Namespace, err error)

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

func (*FakeNamespaces) Watch

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

type FakeNodes

type FakeNodes struct {
	Fake *FakeCoreV1
}

FakeNodes implements NodeInterface

func (*FakeNodes) Create

func (c *FakeNodes) Create(ctx context.Context, node *corev1.Node, opts v1.CreateOptions) (result *corev1.Node, err error)

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

func (*FakeNodes) Delete

func (c *FakeNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error

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

func (*FakeNodes) DeleteCollection

func (c *FakeNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeNodes) Get

func (c *FakeNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Node, err error)

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

func (*FakeNodes) List

func (c *FakeNodes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NodeList, err error)

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

func (*FakeNodes) Patch

func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Node, err error)

Patch applies the patch and returns the patched node.

func (*FakeNodes) Update

func (c *FakeNodes) Update(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (result *corev1.Node, err error)

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

func (*FakeNodes) UpdateStatus

func (c *FakeNodes) UpdateStatus(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (*corev1.Node, error)

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

func (*FakeNodes) Watch

func (c *FakeNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)

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

type FakePods

type FakePods struct {
	Fake *FakeCoreV1
	// contains filtered or unexported fields
}

FakePods implements PodInterface

func (*FakePods) Create

func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod, opts v1.CreateOptions) (result *corev1.Pod, err error)

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

func (*FakePods) Delete

func (c *FakePods) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error

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

func (*FakePods) DeleteCollection

func (c *FakePods) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakePods) Get

func (c *FakePods) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Pod, err error)

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

func (*FakePods) GetEphemeralContainers added in v1.8.0

func (c *FakePods) GetEphemeralContainers(ctx context.Context, podName string, options v1.GetOptions) (result *corev1.EphemeralContainers, err error)

GetEphemeralContainers takes name of the pod, and returns the corresponding ephemeralContainers object, and an error if there is any.

func (*FakePods) List

func (c *FakePods) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodList, err error)

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

func (*FakePods) Patch

func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Pod, err error)

Patch applies the patch and returns the patched pod.

func (*FakePods) Update

func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (result *corev1.Pod, err error)

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

func (*FakePods) UpdateEphemeralContainers

func (c *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *corev1.EphemeralContainers, opts v1.UpdateOptions) (result *corev1.EphemeralContainers, err error)

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

func (*FakePods) UpdateStatus

func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (*corev1.Pod, error)

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

func (*FakePods) Watch

func (c *FakePods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)

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

type FakeServices

type FakeServices struct {
	Fake *FakeCoreV1
	// contains filtered or unexported fields
}

FakeServices implements ServiceInterface

func (*FakeServices) Create

func (c *FakeServices) Create(ctx context.Context, service *corev1.Service, opts v1.CreateOptions) (result *corev1.Service, err error)

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

func (*FakeServices) Delete

func (c *FakeServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error

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

func (*FakeServices) Get

func (c *FakeServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Service, err error)

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

func (*FakeServices) List

func (c *FakeServices) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceList, err error)

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

func (*FakeServices) Patch

func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Service, err error)

Patch applies the patch and returns the patched service.

func (*FakeServices) Update

func (c *FakeServices) Update(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (result *corev1.Service, err error)

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

func (*FakeServices) UpdateStatus

func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (*corev1.Service, error)

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

func (*FakeServices) Watch

func (c *FakeServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)

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

Jump to

Keyboard shortcuts

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