mockclient

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ...ClientOption) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*Client) CreateCapture

func (c *Client) CreateCapture() CreateCapture

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (*Client) DeleteAllOf

func (c *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error

func (*Client) GetStatus

func (c *Client) GetStatus() *Status

func (*Client) List

func (c *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

func (*Client) Patch

func (c *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

func (*Client) RESTMapper

func (c *Client) RESTMapper() meta.RESTMapper

func (*Client) Scheme

func (c *Client) Scheme() *runtime.Scheme

func (*Client) Status

func (c *Client) Status() client.StatusWriter

func (*Client) Update

func (c *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

func (*Client) UpdateCapture

func (c *Client) UpdateCapture() UpdateCapture

type ClientOption

type ClientOption func(*Client)

func WithCreate

func WithCreate(b Create) ClientOption

func WithGet

func WithGet(g Get) ClientOption

func WithList

func WithList(l List) ClientOption

func WithStatus

func WithStatus(s *Status) ClientOption

func WithUpdate

func WithUpdate(u Update) ClientOption

type Create

type Create struct {
	Error error

	Capture CreateCapture
}

type CreateCapture

type CreateCapture struct {
	ParameterCapture
	Objects []client.Object
}

type Get

type Get struct {
	Object client.Object
	Error  error

	Capture GetCapture
}

type GetCapture

type GetCapture struct {
	ParameterCapture
}

type List

type List struct {
	ObjectList client.ObjectList
	Error      error

	Capture ListCapture
}

type ListCapture

type ListCapture struct {
	ParameterCapture
}

type ParameterCapture

type ParameterCapture struct {
	Called int
}

type RestMapper

type RestMapper struct{}

func NewRestMapper

func NewRestMapper() *RestMapper

func (*RestMapper) KindFor

func (*RestMapper) KindsFor

func (*RestMapper) RESTMapping

func (r *RestMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)

func (*RestMapper) RESTMappings

func (r *RestMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)

func (*RestMapper) ResourceFor

func (*RestMapper) ResourceSingularizer

func (r *RestMapper) ResourceSingularizer(resource string) (singular string, err error)

func (*RestMapper) ResourcesFor

type Status

type Status struct {
	// contains filtered or unexported fields
}

func NewStatus

func NewStatus() *Status

func (*Status) Patch

func (s *Status) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

func (*Status) Update

func (s *Status) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

func (*Status) UpdateCapture

func (s *Status) UpdateCapture() StatusUpdateCapture

type StatusUpdate

type StatusUpdate struct {
	Error error

	Capture StatusUpdateCapture
}

type StatusUpdateCapture

type StatusUpdateCapture struct {
	ParameterCapture
	Objects []client.Object
}

type Update

type Update struct {
	Error error

	Capture UpdateCapture
}

type UpdateCapture

type UpdateCapture struct {
	ParameterCapture
	Objects []client.Object
}

Jump to

Keyboard shortcuts

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