Documentation ¶
Index ¶
- type FakeClient
- func (c *FakeClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *FakeClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *FakeClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (c *FakeClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (c *FakeClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c *FakeClient) NumCalls() int
- func (c *FakeClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *FakeClient) RESTMapper() meta.RESTMapper
- func (c *FakeClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeClient ¶
type FakeClient struct { GetFn func(ctx context.Context, call int, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error CreateFn func(ctx context.Context, call int, obj client.Object, opts ...client.CreateOption) error UpdateFn func(ctx context.Context, call int, obj client.Object, opts ...client.UpdateOption) error DeleteFn func(ctx context.Context, call int, obj client.Object, opts ...client.DeleteOption) error ListFn func(ctx context.Context, call int, list client.ObjectList, opts ...client.ListOption) error PatchFn func(ctx context.Context, call int, obj client.Object, patch client.Patch, opts ...client.PatchOption) error IsObjectNamespacedFn func(call int, obj runtime.Object) (bool, error) RESTMapperFn func(call int) meta.RESTMapper // contains filtered or unexported fields }
TODO: not thread safe
func (*FakeClient) Create ¶
func (c *FakeClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*FakeClient) Delete ¶
func (c *FakeClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*FakeClient) IsObjectNamespaced ¶
func (c *FakeClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
func (*FakeClient) List ¶
func (c *FakeClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*FakeClient) NumCalls ¶
func (c *FakeClient) NumCalls() int
func (*FakeClient) Patch ¶
func (c *FakeClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*FakeClient) RESTMapper ¶ added in v0.1.3
func (c *FakeClient) RESTMapper() meta.RESTMapper
func (*FakeClient) Update ¶ added in v0.1.9
func (c *FakeClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Click to show internal directories.
Click to hide internal directories.