diff --git a/internal/flags/crds.go b/internal/flags/crds.go index 81f6d604..850688dd 100644 --- a/internal/flags/crds.go +++ b/internal/flags/crds.go @@ -52,7 +52,7 @@ func (a *CRDsPolicy) Set(str string) error { } func (a *CRDsPolicy) Type() string { - return "crds" + return strings.Join(supportedCRDsPolicies, "|") } func (a *CRDsPolicy) Description() string { diff --git a/internal/flags/decryption_provider.go b/internal/flags/decryption_provider.go index 085340ab..8ad3c302 100644 --- a/internal/flags/decryption_provider.go +++ b/internal/flags/decryption_provider.go @@ -46,7 +46,7 @@ func (d *DecryptionProvider) Set(str string) error { } func (d *DecryptionProvider) Type() string { - return "decryptionProvider" + return strings.Join(supportedDecryptionProviders, "|") } func (d *DecryptionProvider) Description() string { diff --git a/internal/flags/ecdsa_curve.go b/internal/flags/ecdsa_curve.go index 9be8469b..2d9c3324 100644 --- a/internal/flags/ecdsa_curve.go +++ b/internal/flags/ecdsa_curve.go @@ -49,7 +49,7 @@ func (c *ECDSACurve) Set(str string) error { } func (c *ECDSACurve) Type() string { - return "ecdsaCurve" + return strings.Join(ecdsaCurves(), "|") } func (c *ECDSACurve) Description() string { diff --git a/internal/flags/gitlab_visibility.go b/internal/flags/gitlab_visibility.go index 924dd898..ec0c2aec 100644 --- a/internal/flags/gitlab_visibility.go +++ b/internal/flags/gitlab_visibility.go @@ -58,7 +58,11 @@ func (d *GitLabVisibility) Set(str string) error { } func (d *GitLabVisibility) Type() string { - return "gitLabVisibility" + visibilities := make([]string, 0, len(supportedGitLabVisibilities)) + for visibility := range supportedGitLabVisibilities { + visibilities = append(visibilities, string(visibility)) + } + return strings.Join(visibilities, "|") } func (d *GitLabVisibility) Description() string { diff --git a/internal/flags/helm_chart_source.go b/internal/flags/helm_chart_source.go index 079ca4d3..a2a925c7 100644 --- a/internal/flags/helm_chart_source.go +++ b/internal/flags/helm_chart_source.go @@ -64,7 +64,7 @@ func (s *HelmChartSource) Set(str string) error { } func (s *HelmChartSource) Type() string { - return "helmChartSource" + return strings.Join(supportedHelmChartSourceKinds, "|") } func (s *HelmChartSource) Description() string { diff --git a/internal/flags/kustomization_source.go b/internal/flags/kustomization_source.go index 4dc124ab..88ecc3b0 100644 --- a/internal/flags/kustomization_source.go +++ b/internal/flags/kustomization_source.go @@ -71,7 +71,7 @@ func (s *KustomizationSource) Set(str string) error { } func (s *KustomizationSource) Type() string { - return "kustomizationSource" + return strings.Join(supportedKustomizationSourceKinds, "|") } func (s *KustomizationSource) Description() string { diff --git a/internal/flags/local_helm_chart_source.go b/internal/flags/local_helm_chart_source.go index 19d2e530..bbb7a592 100644 --- a/internal/flags/local_helm_chart_source.go +++ b/internal/flags/local_helm_chart_source.go @@ -58,7 +58,7 @@ func (s *LocalHelmChartSource) Set(str string) error { } func (s *LocalHelmChartSource) Type() string { - return "helmChartSource" + return strings.Join(supportedHelmChartSourceKinds, "|") } func (s *LocalHelmChartSource) Description() string { diff --git a/internal/flags/log_level.go b/internal/flags/log_level.go index 4101a902..5b26d0c0 100644 --- a/internal/flags/log_level.go +++ b/internal/flags/log_level.go @@ -46,7 +46,7 @@ func (l *LogLevel) Set(str string) error { } func (l *LogLevel) Type() string { - return "logLevel" + return strings.Join(supportedLogLevels, "|") } func (l *LogLevel) Description() string { diff --git a/internal/flags/public_key_algorithm.go b/internal/flags/public_key_algorithm.go index ed4902a7..325ff6b4 100644 --- a/internal/flags/public_key_algorithm.go +++ b/internal/flags/public_key_algorithm.go @@ -45,7 +45,7 @@ func (a *PublicKeyAlgorithm) Set(str string) error { } func (a *PublicKeyAlgorithm) Type() string { - return "publicKeyAlgorithm" + return strings.Join(supportedPublicKeyAlgorithms, "|") } func (a *PublicKeyAlgorithm) Description() string { diff --git a/internal/flags/source_bucket_provider.go b/internal/flags/source_bucket_provider.go index bd93b41d..9c8aaa19 100644 --- a/internal/flags/source_bucket_provider.go +++ b/internal/flags/source_bucket_provider.go @@ -52,7 +52,7 @@ func (p *SourceBucketProvider) Set(str string) error { } func (p *SourceBucketProvider) Type() string { - return "sourceBucketProvider" + return strings.Join(supportedSourceBucketProviders, "|") } func (p *SourceBucketProvider) Description() string { diff --git a/internal/flags/source_oci_provider.go b/internal/flags/source_oci_provider.go index 77ff0441..6624c0de 100644 --- a/internal/flags/source_oci_provider.go +++ b/internal/flags/source_oci_provider.go @@ -59,7 +59,7 @@ func (p *SourceOCIProvider) Set(str string) error { } func (p *SourceOCIProvider) Type() string { - return "sourceOCIProvider" + return strings.Join(supportedSourceOCIProviders, "|") } func (p *SourceOCIProvider) Description() string { diff --git a/internal/flags/source_oci_verify_provider.go b/internal/flags/source_oci_verify_provider.go index acd57a9d..57c8cdde 100644 --- a/internal/flags/source_oci_verify_provider.go +++ b/internal/flags/source_oci_verify_provider.go @@ -47,7 +47,7 @@ func (p *SourceOCIVerifyProvider) Set(str string) error { } func (p *SourceOCIVerifyProvider) Type() string { - return "sourceOCIVerifyProvider" + return strings.Join(supportedSourceOCIVerifyProviders, "|") } func (p *SourceOCIVerifyProvider) Description() string {