Documentation ¶
Index ¶
- type FakeApprover
- func (f *FakeApprover) Prepare(ctx context.Context, log logr.Logger, mgr manager.Manager) error
- func (f *FakeApprover) RegisterFlags(pf *pflag.FlagSet)
- func (f *FakeApprover) WithEvaluator(evaluator *FakeEvaluator) *FakeApprover
- func (f *FakeApprover) WithPrepare(fn func(context.Context, logr.Logger, manager.Manager) error) *FakeApprover
- func (f *FakeApprover) WithReconciler(reconciler *FakeReconciler) *FakeApprover
- func (f *FakeApprover) WithRegisterFlags(fn func(*pflag.FlagSet)) *FakeApprover
- type FakeEvaluator
- type FakeReconciler
- func (f *FakeReconciler) EnqueueChan() <-chan string
- func (f *FakeReconciler) Name() string
- func (f *FakeReconciler) Ready(ctx context.Context, policy *policyapi.CertificateRequestPolicy) (approver.ReconcilerReadyResponse, error)
- func (f *FakeReconciler) WithEnqueueChan(fn func() <-chan string) *FakeReconciler
- func (f *FakeReconciler) WithName(name string) *FakeReconciler
- func (f *FakeReconciler) WithReady(...) *FakeReconciler
- type FakeWebhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeApprover ¶
type FakeApprover struct { *FakeEvaluator *FakeWebhook *FakeReconciler // contains filtered or unexported fields }
FakeApprover is a testing approver designed to mock approvers with a pre-determined response.
func NewFakeApprover ¶
func NewFakeApprover() *FakeApprover
func (*FakeApprover) RegisterFlags ¶
func (f *FakeApprover) RegisterFlags(pf *pflag.FlagSet)
func (*FakeApprover) WithEvaluator ¶
func (f *FakeApprover) WithEvaluator(evaluator *FakeEvaluator) *FakeApprover
func (*FakeApprover) WithPrepare ¶
func (f *FakeApprover) WithPrepare(fn func(context.Context, logr.Logger, manager.Manager) error) *FakeApprover
func (*FakeApprover) WithReconciler ¶
func (f *FakeApprover) WithReconciler(reconciler *FakeReconciler) *FakeApprover
func (*FakeApprover) WithRegisterFlags ¶
func (f *FakeApprover) WithRegisterFlags(fn func(*pflag.FlagSet)) *FakeApprover
type FakeEvaluator ¶
type FakeEvaluator struct {
// contains filtered or unexported fields
}
FakeEvaluator is a testing evaluator designed to mock evaluators with a pre-determined response.
func NewFakeEvaluator ¶
func NewFakeEvaluator() *FakeEvaluator
func (*FakeEvaluator) Evaluate ¶
func (f *FakeEvaluator) Evaluate(ctx context.Context, policy *policyapi.CertificateRequestPolicy, cr *cmapi.CertificateRequest) (approver.EvaluationResponse, error)
func (*FakeEvaluator) WithEvaluate ¶
func (f *FakeEvaluator) WithEvaluate(fn func(context.Context, *policyapi.CertificateRequestPolicy, *cmapi.CertificateRequest) (approver.EvaluationResponse, error)) *FakeEvaluator
type FakeReconciler ¶
type FakeReconciler struct {
// contains filtered or unexported fields
}
FakeReconciler is a testing reconciler designed to mock Reconcilers with a pre-determined response.
func NewFakeReconciler ¶
func NewFakeReconciler() *FakeReconciler
func (*FakeReconciler) EnqueueChan ¶ added in v0.2.0
func (f *FakeReconciler) EnqueueChan() <-chan string
func (*FakeReconciler) Name ¶
func (f *FakeReconciler) Name() string
func (*FakeReconciler) Ready ¶
func (f *FakeReconciler) Ready(ctx context.Context, policy *policyapi.CertificateRequestPolicy) (approver.ReconcilerReadyResponse, error)
func (*FakeReconciler) WithEnqueueChan ¶ added in v0.2.0
func (f *FakeReconciler) WithEnqueueChan(fn func() <-chan string) *FakeReconciler
func (*FakeReconciler) WithName ¶
func (f *FakeReconciler) WithName(name string) *FakeReconciler
func (*FakeReconciler) WithReady ¶
func (f *FakeReconciler) WithReady(fn func(context.Context, *policyapi.CertificateRequestPolicy) (approver.ReconcilerReadyResponse, error)) *FakeReconciler
type FakeWebhook ¶
type FakeWebhook struct {
// contains filtered or unexported fields
}
FakeWebhook is a testing webook designed to mock webhooks with a pre-determined response.
func NewFakeWebhook ¶
func NewFakeWebhook() *FakeWebhook
func (*FakeWebhook) Validate ¶
func (f *FakeWebhook) Validate(ctx context.Context, policy *policyapi.CertificateRequestPolicy) (approver.WebhookValidationResponse, error)
func (*FakeWebhook) WithValidate ¶
func (f *FakeWebhook) WithValidate(fn func(context.Context, *policyapi.CertificateRequestPolicy) (approver.WebhookValidationResponse, error)) *FakeWebhook
Click to show internal directories.
Click to hide internal directories.