Documentation
¶
Index ¶
- func NewDeleteSpooferImpl(allowedObject runtime.Object) deleteSpoofer
- type Client
- func (f *Client) Apply(_ context.Context, _ runtime.ApplyConfiguration, _ ...client.ApplyOption) error
- func (f Client) Create(_ context.Context, obj client.Object, _ ...client.CreateOption) error
- func (f Client) Delete(_ context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (f Client) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error
- func (f Client) Get(_ context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (f Client) GroupVersionKindFor(_ runtime.Object) (schema.GroupVersionKind, error)
- func (f Client) IsObjectNamespaced(_ runtime.Object) (bool, error)
- func (f Client) List(_ context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (f Client) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.PatchOption) error
- func (f Client) RESTMapper() meta.RESTMapper
- func (f Client) Scheme() *runtime.Scheme
- func (f Client) Status() client.StatusWriter
- func (f Client) SubResource(_ string) client.SubResourceClient
- func (f Client) Update(_ context.Context, obj client.Object, _ ...client.UpdateOption) error
- type ErrorInjector
- type SubResourceClient
- func (f SubResourceClient) Create(_ context.Context, _ client.Object, _ client.Object, ...) error
- func (f SubResourceClient) Get(_ context.Context, _ client.Object, _ client.Object, ...) error
- func (f SubResourceClient) Patch(_ context.Context, _ client.Object, _ client.Patch, ...) error
- func (f SubResourceClient) Update(_ context.Context, _ client.Object, _ ...client.SubResourceUpdateOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeleteSpooferImpl ¶ added in v1.12.0
Types ¶
type Client ¶
type Client struct {
Objects map[storageKey]runtime.Object
SubResourceClient
// contains filtered or unexported fields
}
Client is a fake k8s client
func NewFakeClient ¶
func NewFakeClient(initialObjects []runtime.Object, errorInjector ErrorInjector, deleteSpoofer deleteSpoofer) (*Client, error)
func (*Client) Apply ¶ added in v1.13.0
func (f *Client) Apply(_ context.Context, _ runtime.ApplyConfiguration, _ ...client.ApplyOption) error
func (Client) DeleteAllOf ¶
func (f Client) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error
DeleteAllOf deletes all objects of the given type matching the given options
func (Client) Get ¶
func (f Client) Get(_ context.Context, key client.ObjectKey, obj client.Object, _ ...client.GetOption) error
Get finds object and puts it in client.Object obj argument
func (Client) GroupVersionKindFor ¶ added in v1.11.0
GroupVersionKindFor returns the GroupVersionKind for the given object.
func (Client) IsObjectNamespaced ¶ added in v1.11.0
IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced.
func (Client) List ¶
func (f Client) List(_ context.Context, list client.ObjectList, opts ...client.ListOption) error
List list all requested items in fake cluster
func (Client) Patch ¶
func (f Client) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.PatchOption) error
Patch patches the given obj in the Kubernetes cluster
func (Client) RESTMapper ¶
func (f Client) RESTMapper() meta.RESTMapper
RESTMapper returns the rest this client is using
func (Client) Status ¶
func (f Client) Status() client.StatusWriter
Status knows how to create a client which can update status subresource for kubernetes objects
func (Client) SubResource ¶ added in v1.5.0
func (f Client) SubResource(_ string) client.SubResourceClient
SubResource returns a subresource client for the named subResource. TODO: Implement
type ErrorInjector ¶ added in v1.12.0
type SubResourceClient ¶ added in v1.5.0
type SubResourceClient struct{}
SubResourceClient is a fake k8s subresource client
func (SubResourceClient) Create ¶ added in v1.5.0
func (f SubResourceClient) Create(_ context.Context, _ client.Object, _ client.Object, _ ...client.SubResourceCreateOption) error
Create saves the subResource object in the Kubernetes cluster. TODO: Implement
func (SubResourceClient) Get ¶ added in v1.5.0
func (f SubResourceClient) Get(_ context.Context, _ client.Object, _ client.Object, _ ...client.SubResourceGetOption) error
Get retrieves a subResource for the given obj object from the Kubernetes Cluster. TODO: Implement
func (SubResourceClient) Patch ¶ added in v1.5.0
func (f SubResourceClient) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.SubResourcePatchOption) error
Patch patches the given object's subresource. TODO: Implement
func (SubResourceClient) Update ¶ added in v1.5.0
func (f SubResourceClient) Update(_ context.Context, _ client.Object, _ ...client.SubResourceUpdateOption) error
Update updates the fields corresponding to the status subresource for the given obj. TODO: Implement