Documentation ¶
Index ¶
- func ConfigNotEmpty(config *runtime.RawExtension) bool
- func IsInvalidURL(toTest string) (bool, error)
- func ValidateDomainName(domain string) bool
- func ValidateServiceName(service string) bool
- func ValidateSubdomainName(subdomain string) bool
- func VerifyLabelKey(key string) error
- func VerifyLabelValue(value string) error
- type APIRuleValidator
- type Failure
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 ValidateSubdomainName ¶
ValidateSubdomainName ?
func VerifyLabelKey ¶
VerifyLabelKey returns error if the provided string is not a proper k8s label key
func VerifyLabelValue ¶
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 ¶
func (v *APIRuleValidator) Validate(ctx context.Context, client client.Client, api *gatewayv1beta1.APIRule, vsList networkingv1beta1.VirtualServiceList) []Failure
Validate performs APIRule validation
func (*APIRuleValidator) ValidateConfig ¶
func (v *APIRuleValidator) ValidateConfig(config *helpers.Config) []Failure
type Failure ¶
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.