From 22be4ddb29ae71789fa3a67a7295010c35f20157 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Wed, 13 Nov 2024 16:30:45 +0100 Subject: [PATCH] delete unversioned common api Signed-off-by: Matthias Wessendorf --- pkg/apis/common/aws.go | 93 -------------- pkg/apis/common/doc.go | 19 --- pkg/apis/common/zz_generated.deepcopy.go | 147 ----------------------- 3 files changed, 259 deletions(-) delete mode 100644 pkg/apis/common/aws.go delete mode 100644 pkg/apis/common/doc.go delete mode 100644 pkg/apis/common/zz_generated.deepcopy.go diff --git a/pkg/apis/common/aws.go b/pkg/apis/common/aws.go deleted file mode 100644 index f2e76ddb7da..00000000000 --- a/pkg/apis/common/aws.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package common - -type AWSCommon struct { - // Auth is the S3 authentication (accessKey/secretKey) configuration. - Region string `json:"region,omitempty"` // AWS region - //UseDefaultCredentials bool `json:"useDefaultCredentials" default:"false"` // Use default credentials provider - //UseProfileCredentials bool `json:"useProfileCredentials" default:"false"` // Use profile credentials provider - ProfileCredentialsName string `json:"profileCredentialsName,omitempty"` // Profile name for profile credentials provider - // UseSessionCredentials bool `json:"useSessionCredentials" default:"false"` // Use session credentials - SessionToken string `json:"sessionToken,omitempty"` // Session token - URIEndpointOverride string `json:"uriEndpointOverride,omitempty"` // Override endpoint URI - OverrideEndpoint bool `json:"overrideEndpoint" default:"false"` // Override endpoint flag -} - -type AWSS3 struct { - AWSCommon - BucketNameOrArn string `json:"bucketNameOrArn,omitempty"` // S3 Bucket name or ARN - DeleteAfterRead bool `json:"deleteAfterRead" default:"true"` // Auto-delete objects after reading - MoveAfterRead bool `json:"moveAfterRead" default:"false"` // Move objects after reading - DestinationBucket string `json:"destinationBucket,omitempty"` // Destination bucket for moved objects - DestinationBucketPrefix string `json:"destinationBucketPrefix,omitempty"` // Prefix for moved objects - DestinationBucketSuffix string `json:"destinationBucketSuffix,omitempty"` // Suffix for moved objects - AutoCreateBucket bool `json:"autoCreateBucket" default:"false"` // Auto-create S3 bucket - Prefix string `json:"prefix,omitempty"` // S3 bucket prefix for search - IgnoreBody bool `json:"ignoreBody" default:"false"` // Ignore object body - ForcePathStyle bool `json:"forcePathStyle" default:"false"` // Force path style for bucket access - Delay int `json:"delay" default:"500"` // Delay between polls in milliseconds - MaxMessagesPerPoll int `json:"maxMessagesPerPoll" default:"10"` // Max messages to poll per request -} - -type AWSSQS struct { - AWSCommon - QueueNameOrArn string `json:"queueNameOrArn,omitempty"` // SQS Queue name or ARN - DeleteAfterRead bool `json:"deleteAfterRead" default:"true"` // Auto-delete messages after reading - AutoCreateQueue bool `json:"autoCreateQueue" default:"false"` // Auto-create SQS queue - AmazonAWSHost string `json:"amazonAWSHost" default:"amazonaws.com"` // AWS host - Protocol string `json:"protocol" default:"https"` // Communication protocol (http/https) - QueueURL string `json:"queueURL,omitempty"` // Full SQS queue URL - Greedy bool `json:"greedy" default:"false"` // Greedy scheduler - Delay int `json:"delay" default:"500"` // Delay between polls in milliseconds - MaxMessagesPerPoll int `json:"maxMessagesPerPoll" default:"1"` // Max messages to return (1-10) - WaitTimeSeconds int `json:"waitTimeSeconds,omitempty"` // Wait time for messages - VisibilityTimeout int `json:"visibilityTimeout,omitempty"` // Visibility timeout in seconds -} - -type AWSDDBStreams struct { - AWSCommon - Table string `json:"table,omitempty"` // The name of the DynamoDB table - StreamIteratorType string `json:"streamIteratorType,omitempty" default:"FROM_LATEST"` // Defines where in the DynamoDB stream to start getting records - Delay int `json:"delay,omitempty" default:"500"` // Delay in milliseconds before the next poll from the database -} - -type Auth struct { - // Auth Secret - Secret *Secret `json:"secret,omitempty"` - - // AccessKey is the AWS access key ID. - AccessKey string `json:"accessKey,omitempty"` - - // SecretKey is the AWS secret access key. - SecretKey string `json:"secretKey,omitempty"` -} - -func (a *Auth) HasAuth() bool { - return a != nil && a.Secret != nil && - a.Secret.Ref != nil && a.Secret.Ref.Name != "" -} - -type Secret struct { - // Secret reference for SASL and SSL configurations. - Ref *SecretReference `json:"ref,omitempty"` -} - -type SecretReference struct { - // Secret name. - Name string `json:"name"` -} diff --git a/pkg/apis/common/doc.go b/pkg/apis/common/doc.go deleted file mode 100644 index 8002e3c88d1..00000000000 --- a/pkg/apis/common/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// +k8s:deepcopy-gen=package - -package common diff --git a/pkg/apis/common/zz_generated.deepcopy.go b/pkg/apis/common/zz_generated.deepcopy.go deleted file mode 100644 index 6f388e737fd..00000000000 --- a/pkg/apis/common/zz_generated.deepcopy.go +++ /dev/null @@ -1,147 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package common - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSCommon) DeepCopyInto(out *AWSCommon) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSCommon. -func (in *AWSCommon) DeepCopy() *AWSCommon { - if in == nil { - return nil - } - out := new(AWSCommon) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSDDBStreams) DeepCopyInto(out *AWSDDBStreams) { - *out = *in - out.AWSCommon = in.AWSCommon - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSDDBStreams. -func (in *AWSDDBStreams) DeepCopy() *AWSDDBStreams { - if in == nil { - return nil - } - out := new(AWSDDBStreams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSS3) DeepCopyInto(out *AWSS3) { - *out = *in - out.AWSCommon = in.AWSCommon - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSS3. -func (in *AWSS3) DeepCopy() *AWSS3 { - if in == nil { - return nil - } - out := new(AWSS3) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSSQS) DeepCopyInto(out *AWSSQS) { - *out = *in - out.AWSCommon = in.AWSCommon - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSSQS. -func (in *AWSSQS) DeepCopy() *AWSSQS { - if in == nil { - return nil - } - out := new(AWSSQS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Auth) DeepCopyInto(out *Auth) { - *out = *in - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(Secret) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auth. -func (in *Auth) DeepCopy() *Auth { - if in == nil { - return nil - } - out := new(Auth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Secret) DeepCopyInto(out *Secret) { - *out = *in - if in.Ref != nil { - in, out := &in.Ref, &out.Ref - *out = new(SecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret. -func (in *Secret) DeepCopy() *Secret { - if in == nil { - return nil - } - out := new(Secret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretReference) DeepCopyInto(out *SecretReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference. -func (in *SecretReference) DeepCopy() *SecretReference { - if in == nil { - return nil - } - out := new(SecretReference) - in.DeepCopyInto(out) - return out -}