mock

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockReconciler

func NewMockReconciler(reconciler controller.Reconciler, metaMock any) controller.Reconciler

func NewMockRemoteReconcilerAction added in v0.1.3

func NewMockRemoteReconcilerAction[k8sObject comparable, apiObject comparable, apiClient any](reconciler controller.RemoteReconcilerAction[k8sObject, apiObject, apiClient], mockRemoteHandler func(ctx context.Context, req ctrl.Request, o object.RemoteObject) (handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], res ctrl.Result, err error)) controller.RemoteReconcilerAction[k8sObject, apiObject, apiClient]

Types

type MockReconciler

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

func (MockReconciler) Configure

func (h MockReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

func (MockReconciler) Create

func (h MockReconciler) Create(ctx context.Context, r client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

func (MockReconciler) Delete

func (h MockReconciler) Delete(ctx context.Context, r client.Object, data map[string]any, meta any) (err error)

func (MockReconciler) Diff

func (h MockReconciler) Diff(r client.Object, data map[string]any, meta any) (diff controller.Diff, err error)

func (MockReconciler) OnError

func (h MockReconciler) OnError(ctx context.Context, r client.Object, data map[string]any, meta any, err error)

func (MockReconciler) OnSuccess

func (h MockReconciler) OnSuccess(ctx context.Context, r client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

func (MockReconciler) Read

func (h MockReconciler) Read(ctx context.Context, r client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

func (MockReconciler) Update

func (h MockReconciler) Update(ctx context.Context, r client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

type MockRemoteReconcilerAction added in v0.1.3

type MockRemoteReconcilerAction[k8sObject comparable, apiObject comparable, apiClient any] struct {
	// contains filtered or unexported fields
}

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Configure added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Configure(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient]) (res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Create added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Create(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], object apiObject) (res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Delete added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Delete(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient]) (err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Diff added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Diff(ctx context.Context, o object.RemoteObject, read controller.RemoteRead[apiObject], data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], ignoreDiff ...patch.CalculateOption) (diff controller.RemoteDiff[apiObject], res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) GetIgnoresDiff added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) GetIgnoresDiff() []patch.CalculateOption

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) GetRemoteHandler added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) GetRemoteHandler(ctx context.Context, req ctrl.Request, o object.RemoteObject) (handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) OnError added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) OnError(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], currentErr error) (res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) OnSuccess added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) OnSuccess(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], diff controller.RemoteDiff[apiObject]) (res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Read added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Read(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient]) (read controller.RemoteRead[apiObject], res ctrl.Result, err error)

func (*MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Update added in v0.1.3

func (h *MockRemoteReconcilerAction[k8sObject, apiObject, apiClient]) Update(ctx context.Context, o object.RemoteObject, data map[string]any, handler controller.RemoteExternalReconciler[k8sObject, apiObject, apiClient], object apiObject) (res ctrl.Result, err error)

Jump to

Keyboard shortcuts

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