fake

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 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 FakeResources

type FakeResources struct {
	Fake *FakeResourcesV1
	// contains filtered or unexported fields
}

FakeResources implements ResourceInterface

func (*FakeResources) Create

func (c *FakeResources) Create(ctx context.Context, resource *soloiov1.Resource, opts v1.CreateOptions) (result *soloiov1.Resource, err error)

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

func (*FakeResources) Delete

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

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

func (*FakeResources) DeleteCollection

func (c *FakeResources) DeleteCollection(ctx context.Context, options v1.DeleteOptions, listOptions v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeResources) Get

func (c *FakeResources) Get(ctx context.Context, name string, options v1.GetOptions) (result *soloiov1.Resource, err error)

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

func (*FakeResources) List

func (c *FakeResources) List(ctx context.Context, opts v1.ListOptions) (result *soloiov1.ResourceList, err error)

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

func (*FakeResources) Patch

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

Patch applies the patch and returns the patched resource.

func (*FakeResources) Update

func (c *FakeResources) Update(ctx context.Context, resource *soloiov1.Resource, opts v1.UpdateOptions) (result *soloiov1.Resource, err error)

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

func (*FakeResources) Watch

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

type FakeResourcesV1

type FakeResourcesV1 struct {
	*testing.Fake
	crd.Crd // NOTE(marco): this line was added
}

func (*FakeResourcesV1) RESTClient

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

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

func (*FakeResourcesV1) Resources

func (c *FakeResourcesV1) Resources(namespace string) v1.ResourceInterface

Jump to

Keyboard shortcuts

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