// ValidatorFromResourceType is a helper method that gets a resource type and returns the fitting validator
ValidatorFromResourceType is a helper method that gets a resource type and returns the fitting validator
// ValidatorFromResourceType is a helper method that gets a resource type and returns the fitting validator
func ValidatorFromResourceType(log logr.Logger, kubeClient client.Client, scheme *runtime.Scheme, resource string) (GenericValidator, error) {
	abstrVal := newAbstractedValidator(log, kubeClient, scheme)
	var val GenericValidator
	if resource == "landscaperdeployments" {
		val = &LandscaperDeploymentValidator{abstrVal}
	} else if resource == "instances" {
		val = &InstanceValidator{abstrVal}
	} else if resource == "servicetargetconfigs" {
		val = &ServiceTargetConfigValidator{abstrVal}
	} else {
		return nil, fmt.Errorf("unable to find validator for resource type %q", resource)
	}
	return val, nil
}
func ValidatorFromResourceType ( log logr . Logger , kubeClient client . Client , scheme * runtime . Scheme , resource string ) ( GenericValidator , error ) { abstrVal := newAbstractedValidator ( log , kubeClient , scheme ) var val GenericValidator if resource == " " { val = & LandscaperDeploymentValidator { abstrVal } } else if resource == " " { val = & InstanceValidator { abstrVal } } else if resource == " " { val = & ServiceTargetConfigValidator { abstrVal } } else { return nil , fmt . Errorf ( " " , resource ) } return val , nil }
ValidatorFromResourceType is a helper method that gets a resource type and returns the fitting validator
ValidatorFromResourceType is a helper method that gets a resource type and returns the fitting validator