fake

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 10 Imported by: 0

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 FakeClusterPolicies

type FakeClusterPolicies struct {
	Fake *FakeKyvernoV1
}

FakeClusterPolicies implements ClusterPolicyInterface

func (*FakeClusterPolicies) Create

func (c *FakeClusterPolicies) Create(ctx context.Context, clusterPolicy *kyvernov1.ClusterPolicy, opts v1.CreateOptions) (result *kyvernov1.ClusterPolicy, err error)

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

func (*FakeClusterPolicies) Delete

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

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

func (*FakeClusterPolicies) DeleteCollection

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

DeleteCollection deletes a collection of objects.

func (*FakeClusterPolicies) Get

func (c *FakeClusterPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *kyvernov1.ClusterPolicy, err error)

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

func (*FakeClusterPolicies) List

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

func (*FakeClusterPolicies) Patch

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

Patch applies the patch and returns the patched clusterPolicy.

func (*FakeClusterPolicies) Update

func (c *FakeClusterPolicies) Update(ctx context.Context, clusterPolicy *kyvernov1.ClusterPolicy, opts v1.UpdateOptions) (result *kyvernov1.ClusterPolicy, err error)

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

func (*FakeClusterPolicies) UpdateStatus

func (c *FakeClusterPolicies) UpdateStatus(ctx context.Context, clusterPolicy *kyvernov1.ClusterPolicy, opts v1.UpdateOptions) (*kyvernov1.ClusterPolicy, error)

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

func (*FakeClusterPolicies) Watch

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

type FakeKyvernoV1

type FakeKyvernoV1 struct {
	*testing.Fake
}

func (*FakeKyvernoV1) ClusterPolicies

func (c *FakeKyvernoV1) ClusterPolicies() v1.ClusterPolicyInterface

func (*FakeKyvernoV1) Policies

func (c *FakeKyvernoV1) Policies(namespace string) v1.PolicyInterface

func (*FakeKyvernoV1) RESTClient

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

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

type FakePolicies

type FakePolicies struct {
	Fake *FakeKyvernoV1
	// contains filtered or unexported fields
}

FakePolicies implements PolicyInterface

func (*FakePolicies) Create

func (c *FakePolicies) Create(ctx context.Context, policy *kyvernov1.Policy, opts v1.CreateOptions) (result *kyvernov1.Policy, err error)

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

func (*FakePolicies) Delete

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

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

func (*FakePolicies) DeleteCollection

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

DeleteCollection deletes a collection of objects.

func (*FakePolicies) Get

func (c *FakePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *kyvernov1.Policy, err error)

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

func (*FakePolicies) List

func (c *FakePolicies) List(ctx context.Context, opts v1.ListOptions) (result *kyvernov1.PolicyList, err error)

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

func (*FakePolicies) Patch

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

Patch applies the patch and returns the patched policy.

func (*FakePolicies) Update

func (c *FakePolicies) Update(ctx context.Context, policy *kyvernov1.Policy, opts v1.UpdateOptions) (result *kyvernov1.Policy, err error)

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

func (*FakePolicies) UpdateStatus

func (c *FakePolicies) UpdateStatus(ctx context.Context, policy *kyvernov1.Policy, opts v1.UpdateOptions) (*kyvernov1.Policy, error)

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

func (*FakePolicies) Watch

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

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

Jump to

Keyboard shortcuts

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