From 644e72f2f0c6ceceb2050243bc4c648d55c9041d Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Wed, 18 Dec 2024 20:29:49 +0100 Subject: [PATCH] regen --- .../applyconfiguration/internal/internal.go | 4 +- .../stas/v1alpha1/containerimagescan.go | 40 +++++++++---------- .../stas/v1alpha1/containerimagescanspec.go | 8 ++-- .../stas/v1alpha1/imagescanspec.go | 8 ++-- .../stas/v1alpha1/scanconfig.go | 8 ++-- .../stas/v1alpha1/vulnerability.go | 20 +++++----- 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/internal/client/applyconfiguration/internal/internal.go b/internal/client/applyconfiguration/internal/internal.go index 47f29e51..e1fd6791 100644 --- a/internal/client/applyconfiguration/internal/internal.go +++ b/internal/client/applyconfiguration/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/internal/client/applyconfiguration/stas/v1alpha1/containerimagescan.go b/internal/client/applyconfiguration/stas/v1alpha1/containerimagescan.go index c2e58212..5d6b96e9 100644 --- a/internal/client/applyconfiguration/stas/v1alpha1/containerimagescan.go +++ b/internal/client/applyconfiguration/stas/v1alpha1/containerimagescan.go @@ -32,7 +32,7 @@ func ContainerImageScan(name, namespace string) *ContainerImageScanApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithKind(value string) *ContainerImageScanApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -40,7 +40,7 @@ func (b *ContainerImageScanApplyConfiguration) WithKind(value string) *Container // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithAPIVersion(value string) *ContainerImageScanApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -49,7 +49,7 @@ func (b *ContainerImageScanApplyConfiguration) WithAPIVersion(value string) *Con // If called multiple times, the Name field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithName(value string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -58,7 +58,7 @@ func (b *ContainerImageScanApplyConfiguration) WithName(value string) *Container // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithGenerateName(value string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -67,7 +67,7 @@ func (b *ContainerImageScanApplyConfiguration) WithGenerateName(value string) *C // If called multiple times, the Namespace field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithNamespace(value string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -76,7 +76,7 @@ func (b *ContainerImageScanApplyConfiguration) WithNamespace(value string) *Cont // If called multiple times, the UID field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithUID(value types.UID) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -85,7 +85,7 @@ func (b *ContainerImageScanApplyConfiguration) WithUID(value types.UID) *Contain // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithResourceVersion(value string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -94,7 +94,7 @@ func (b *ContainerImageScanApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithGeneration(value int64) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -103,7 +103,7 @@ func (b *ContainerImageScanApplyConfiguration) WithGeneration(value int64) *Cont // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -112,7 +112,7 @@ func (b *ContainerImageScanApplyConfiguration) WithCreationTimestamp(value metav // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -121,7 +121,7 @@ func (b *ContainerImageScanApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ContainerImageScanApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -131,11 +131,11 @@ func (b *ContainerImageScanApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *ContainerImageScanApplyConfiguration) WithLabels(entries map[string]string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -146,11 +146,11 @@ func (b *ContainerImageScanApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *ContainerImageScanApplyConfiguration) WithAnnotations(entries map[string]string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -164,7 +164,7 @@ func (b *ContainerImageScanApplyConfiguration) WithOwnerReferences(values ...*v1 if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -175,7 +175,7 @@ func (b *ContainerImageScanApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *ContainerImageScanApplyConfiguration) WithFinalizers(values ...string) *ContainerImageScanApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -205,5 +205,5 @@ func (b *ContainerImageScanApplyConfiguration) WithStatus(value *ContainerImageS // GetName retrieves the value of the Name field in the declarative configuration. func (b *ContainerImageScanApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/internal/client/applyconfiguration/stas/v1alpha1/containerimagescanspec.go b/internal/client/applyconfiguration/stas/v1alpha1/containerimagescanspec.go index b7c27e5d..0aea5dbf 100644 --- a/internal/client/applyconfiguration/stas/v1alpha1/containerimagescanspec.go +++ b/internal/client/applyconfiguration/stas/v1alpha1/containerimagescanspec.go @@ -25,7 +25,7 @@ func ContainerImageScanSpec() *ContainerImageScanSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ContainerImageScanSpecApplyConfiguration) WithName(value string) *ContainerImageScanSpecApplyConfiguration { - b.Name = &value + b.ImageApplyConfiguration.Name = &value return b } @@ -33,7 +33,7 @@ func (b *ContainerImageScanSpecApplyConfiguration) WithName(value string) *Conta // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Digest field is set to the value of the last call. func (b *ContainerImageScanSpecApplyConfiguration) WithDigest(value godigest.Digest) *ContainerImageScanSpecApplyConfiguration { - b.Digest = &value + b.ImageApplyConfiguration.Digest = &value return b } @@ -41,7 +41,7 @@ func (b *ContainerImageScanSpecApplyConfiguration) WithDigest(value godigest.Dig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinSeverity field is set to the value of the last call. func (b *ContainerImageScanSpecApplyConfiguration) WithMinSeverity(value stasv1alpha1.Severity) *ContainerImageScanSpecApplyConfiguration { - b.MinSeverity = &value + b.ScanConfigApplyConfiguration.MinSeverity = &value return b } @@ -49,7 +49,7 @@ func (b *ContainerImageScanSpecApplyConfiguration) WithMinSeverity(value stasv1a // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IgnoreUnfixed field is set to the value of the last call. func (b *ContainerImageScanSpecApplyConfiguration) WithIgnoreUnfixed(value bool) *ContainerImageScanSpecApplyConfiguration { - b.IgnoreUnfixed = &value + b.ScanConfigApplyConfiguration.IgnoreUnfixed = &value return b } diff --git a/internal/client/applyconfiguration/stas/v1alpha1/imagescanspec.go b/internal/client/applyconfiguration/stas/v1alpha1/imagescanspec.go index cb5a84af..a7d92b56 100644 --- a/internal/client/applyconfiguration/stas/v1alpha1/imagescanspec.go +++ b/internal/client/applyconfiguration/stas/v1alpha1/imagescanspec.go @@ -24,7 +24,7 @@ func ImageScanSpec() *ImageScanSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ImageScanSpecApplyConfiguration) WithName(value string) *ImageScanSpecApplyConfiguration { - b.Name = &value + b.ImageApplyConfiguration.Name = &value return b } @@ -32,7 +32,7 @@ func (b *ImageScanSpecApplyConfiguration) WithName(value string) *ImageScanSpecA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Digest field is set to the value of the last call. func (b *ImageScanSpecApplyConfiguration) WithDigest(value godigest.Digest) *ImageScanSpecApplyConfiguration { - b.Digest = &value + b.ImageApplyConfiguration.Digest = &value return b } @@ -40,7 +40,7 @@ func (b *ImageScanSpecApplyConfiguration) WithDigest(value godigest.Digest) *Ima // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinSeverity field is set to the value of the last call. func (b *ImageScanSpecApplyConfiguration) WithMinSeverity(value stasv1alpha1.Severity) *ImageScanSpecApplyConfiguration { - b.MinSeverity = &value + b.ScanConfigApplyConfiguration.MinSeverity = &value return b } @@ -48,6 +48,6 @@ func (b *ImageScanSpecApplyConfiguration) WithMinSeverity(value stasv1alpha1.Sev // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IgnoreUnfixed field is set to the value of the last call. func (b *ImageScanSpecApplyConfiguration) WithIgnoreUnfixed(value bool) *ImageScanSpecApplyConfiguration { - b.IgnoreUnfixed = &value + b.ScanConfigApplyConfiguration.IgnoreUnfixed = &value return b } diff --git a/internal/client/applyconfiguration/stas/v1alpha1/scanconfig.go b/internal/client/applyconfiguration/stas/v1alpha1/scanconfig.go index 8e7d85e8..b9e9a8bd 100644 --- a/internal/client/applyconfiguration/stas/v1alpha1/scanconfig.go +++ b/internal/client/applyconfiguration/stas/v1alpha1/scanconfig.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/statnett/image-scanner-operator/api/stas/v1alpha1" + stasv1alpha1 "github.com/statnett/image-scanner-operator/api/stas/v1alpha1" ) // ScanConfigApplyConfiguration represents a declarative configuration of the ScanConfig type for use // with apply. type ScanConfigApplyConfiguration struct { - MinSeverity *v1alpha1.Severity `json:"minSeverity,omitempty"` - IgnoreUnfixed *bool `json:"ignoreUnfixed,omitempty"` + MinSeverity *stasv1alpha1.Severity `json:"minSeverity,omitempty"` + IgnoreUnfixed *bool `json:"ignoreUnfixed,omitempty"` } // ScanConfigApplyConfiguration constructs a declarative configuration of the ScanConfig type for use with @@ -22,7 +22,7 @@ func ScanConfig() *ScanConfigApplyConfiguration { // WithMinSeverity sets the MinSeverity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinSeverity field is set to the value of the last call. -func (b *ScanConfigApplyConfiguration) WithMinSeverity(value v1alpha1.Severity) *ScanConfigApplyConfiguration { +func (b *ScanConfigApplyConfiguration) WithMinSeverity(value stasv1alpha1.Severity) *ScanConfigApplyConfiguration { b.MinSeverity = &value return b } diff --git a/internal/client/applyconfiguration/stas/v1alpha1/vulnerability.go b/internal/client/applyconfiguration/stas/v1alpha1/vulnerability.go index 454bf0b2..399322ed 100644 --- a/internal/client/applyconfiguration/stas/v1alpha1/vulnerability.go +++ b/internal/client/applyconfiguration/stas/v1alpha1/vulnerability.go @@ -3,20 +3,20 @@ package v1alpha1 import ( - v1alpha1 "github.com/statnett/image-scanner-operator/api/stas/v1alpha1" + stasv1alpha1 "github.com/statnett/image-scanner-operator/api/stas/v1alpha1" ) // VulnerabilityApplyConfiguration represents a declarative configuration of the Vulnerability type for use // with apply. type VulnerabilityApplyConfiguration struct { - VulnerabilityID *string `json:"vulnerabilityID,omitempty"` - PkgName *string `json:"pkgName,omitempty"` - InstalledVersion *string `json:"installedVersion,omitempty"` - Severity *v1alpha1.Severity `json:"severity,omitempty"` - PkgPath *string `json:"pkgPath,omitempty"` - FixedVersion *string `json:"fixedVersion,omitempty"` - Title *string `json:"title,omitempty"` - PrimaryURL *string `json:"primaryURL,omitempty"` + VulnerabilityID *string `json:"vulnerabilityID,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + InstalledVersion *string `json:"installedVersion,omitempty"` + Severity *stasv1alpha1.Severity `json:"severity,omitempty"` + PkgPath *string `json:"pkgPath,omitempty"` + FixedVersion *string `json:"fixedVersion,omitempty"` + Title *string `json:"title,omitempty"` + PrimaryURL *string `json:"primaryURL,omitempty"` } // VulnerabilityApplyConfiguration constructs a declarative configuration of the Vulnerability type for use with @@ -52,7 +52,7 @@ func (b *VulnerabilityApplyConfiguration) WithInstalledVersion(value string) *Vu // WithSeverity sets the Severity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Severity field is set to the value of the last call. -func (b *VulnerabilityApplyConfiguration) WithSeverity(value v1alpha1.Severity) *VulnerabilityApplyConfiguration { +func (b *VulnerabilityApplyConfiguration) WithSeverity(value stasv1alpha1.Severity) *VulnerabilityApplyConfiguration { b.Severity = &value return b }