validation

package
v0.0.0-...-3a859c3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigNotEmpty

func ConfigNotEmpty(config *runtime.RawExtension) bool

ConfigNotEmpty Verify if the config object is not empty

func IsInvalidURI

func IsInvalidURI(toTest string) (bool, error)

func ValidateDomainName

func ValidateDomainName(domain string) bool

ValidateDomainName ?

func ValidateServiceName

func ValidateServiceName(service string) bool

ValidateServiceName ?

func ValidateSubdomainName

func ValidateSubdomainName(subdomain string) bool

ValidateSubdomainName ?

func VerifyLabelKey

func VerifyLabelKey(key string) error

VerifyLabelKey returns error if the provided string is not a proper k8s label key

func VerifyLabelValue

func VerifyLabelValue(value string) error

VerifyLabelValue returns error if the provided string is not a proper k8s label value

Types

type ApiRuleValidator

type ApiRuleValidator interface {
	Validate(ctx context.Context, client client.Client, vsList networkingv1beta1.VirtualServiceList, gwList networkingv1beta1.GatewayList) []Failure
}

type Failure

type Failure struct {
	AttributePath string
	Message       string
}

Failure carries validation failures for a single attribute of an object.

func ValidateConfig

func ValidateConfig(config *helpers.Config) []Failure

type InjectionValidator

type InjectionValidator struct {
	Ctx    context.Context
	Client client.Client
}

func NewInjectionValidator

func NewInjectionValidator(ctx context.Context, client client.Client) *InjectionValidator

func (*InjectionValidator) Validate

func (v *InjectionValidator) Validate(attributePath string, selector *apiv1beta1.WorkloadSelector, workloadNamespace string) (problems []Failure, err error)

Directories

Path Synopsis
ory

Jump to

Keyboard shortcuts

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