validation

package
v0.0.0-...-c05a9de Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 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 IsInvalidURL

func IsInvalidURL(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 struct {
	HandlerValidator          handlerValidator
	AccessStrategiesValidator accessStrategyValidator
	MutatorsValidator         mutatorValidator
	InjectionValidator        injectionValidator
	RulesValidator            rulesValidator
	ServiceBlockList          map[string][]string
	DomainAllowList           []string
	HostBlockList             []string
	DefaultDomainName         string
}

APIRuleValidator is used to validate github.com/kyma-project/api-gateway/api/v1beta1/APIRule instances

func (*APIRuleValidator) Validate

Validate performs APIRule validation

func (*APIRuleValidator) ValidateConfig

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

type Failure

type Failure struct {
	AttributePath string
	Message       string
}

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

func CheckForExclusiveAccessStrategy

func CheckForExclusiveAccessStrategy(accessStrategies []*gatewayv1beta1.Authenticator, exclusiveAccessStrategy string, attributePath string) []Failure

CheckForExclusiveAccessStrategy checks if there is an access strategy that is not allowed in combination with other access strategies.

func CheckForSecureAndUnsecureAccessStrategies

func CheckForSecureAndUnsecureAccessStrategies(accessStrategies []*gatewayv1beta1.Authenticator, attributePath string) []Failure

CheckForSecureAndUnsecureAccessStrategies checks if there are secure and unsecure access strategies used at the same time.

Jump to

Keyboard shortcuts

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