manifestvalues

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDef               = errors.New("no value definition found")
	ErrConstraint          = errors.New("constraint violation")
	ErrConstraintRequired  = fmt.Errorf("%w: Required", ErrConstraint)
	ErrConstraintMin       = fmt.Errorf("%w: Min", ErrConstraint)
	ErrConstraintMax       = fmt.Errorf("%w: Max", ErrConstraint)
	ErrConstraintMinLength = fmt.Errorf("%w: MinLength", ErrConstraint)
	ErrConstraintMaxLength = fmt.Errorf("%w: MaxLength", ErrConstraint)
)

Functions

func NewConfigMapRefError

func NewConfigMapRefError(source v1alpha1.ObjectKeyValueSource, cause error) error

func NewFormatError

func NewFormatError(format string, cause error) error

func NewKeyError

func NewKeyError(key string) error

func NewOptionsError

func NewOptionsError(options []string) error

func NewPackageRefError

func NewPackageRefError(source v1alpha1.PackageValueSource, cause error) error

func NewPatternError

func NewPatternError(pattern string) error

func NewSecretRefError

func NewSecretRefError(source v1alpha1.ObjectKeyValueSource, cause error) error

func NewValidationError

func NewValidationError(name string, cause error) error

func NewValueTypeError

func NewValueTypeError(t v1alpha1.ValueType) error

func ValidatePackage

func ValidatePackage(manifest v1alpha1.PackageManifest, pkg ctrlpkg.Package) error

ValidatePackage performs a partial validation of a packages value configurations. Reference values are **not resolved**, so constraint validation is skipped for these values. If instead you want to validate **all** values, please resolve all references first, using a Resolver instance, and then use ValidateResolvedValues.

func ValidateResolvedValues

func ValidateResolvedValues(manifest v1alpha1.PackageManifest, values map[string]string) error

func ValidateSingle

func ValidateSingle(name string, def v1alpha1.ValueDefinition, value string) (err error)

func ValueAsString

func ValueAsString(value v1alpha1.ValueConfiguration) string

Types

type KeyError

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

func (*KeyError) Error

func (err *KeyError) Error() string

type Resolver

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

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, values map[string]v1alpha1.ValueConfiguration) (
	map[string]string,
	error,
)

func (*Resolver) ResolveValue

func (r *Resolver) ResolveValue(ctx context.Context, value v1alpha1.ValueConfiguration) (string, error)

type ValueTypeError

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

func (*ValueTypeError) Error

func (err *ValueTypeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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