validationresult

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package validationresult contains functions for handling ValidationResult objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build added in v0.1.1

Build creates a new ValidationResult for a specific ValidationRule.

func Finalize added in v0.1.1

Finalize finalizes a ValidationResult, ensuring that the overall validation status remains failed if a single rule fails.

func HandleExisting added in v0.1.1

func HandleExisting(vr *v1alpha1.ValidationResult, l logr.Logger)

HandleExisting processes a preexisting validation result for the active validator.

func HandleNew added in v0.1.1

HandleNew creates a new validation result for the active validator.

func Name added in v0.1.1

func Name(r ValidationRule) string

Name returns the name of a ValidationResult for a specific ValidationRule.

func SafeUpdate added in v0.1.1

SafeUpdate processes and patches a ValidationResult with retry logic.

Types

type Patcher

type Patcher interface {
	Patch(ctx context.Context, obj client.Object, opts ...patch.Option) error
}

Patcher is an interface for patching objects.

type ValidationRule added in v0.1.1

type ValidationRule interface {
	client.Object
	GetKind() string
	PluginCode() string
	ResultCount() int
}

ValidationRule is an interface for validation rules.

Jump to

Keyboard shortcuts

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