From 70f5c9d3bca7114442e2af8062b210aaf7d1b6df Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Sun, 30 Jul 2023 23:51:57 -0400 Subject: [PATCH] Fix a few misc bugs due to unused code --- arn/generator.go | 3 --- services/kinesis/types.go | 6 ------ services/kms/http.go | 1 + services/s3/s3.go | 5 +++++ 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arn/generator.go b/arn/generator.go index 10036d7..8ef6a08 100644 --- a/arn/generator.go +++ b/arn/generator.go @@ -5,9 +5,6 @@ import ( "strings" ) -type ARN struct { -} - type Generator struct { AwsAccountId string Region string diff --git a/services/kinesis/types.go b/services/kinesis/types.go index 614c7f4..a6dc680 100755 --- a/services/kinesis/types.go +++ b/services/kinesis/types.go @@ -215,12 +215,6 @@ type APIStartingPosition struct { Timestamp int64 } -type SubscribeToShardOutput struct { - EventStream struct { - SubscribeToShardEvent APISubscribeToShardEvent - } -} - type APISubscribeToShardEvent struct { ContinuationSequenceNumber string MillisBehindLatest int32 diff --git a/services/kms/http.go b/services/kms/http.go index 8eac458..b012958 100755 --- a/services/kms/http.go +++ b/services/kms/http.go @@ -13,6 +13,7 @@ func (k *KMS) RegisterHTTPHandlers(logger *slog.Logger, methodRegistry http.Regi http.Register(logger, methodRegistry, service, "CreateKey", k.CreateKey) http.Register(logger, methodRegistry, service, "Decrypt", k.Decrypt) http.Register(logger, methodRegistry, service, "DeleteAlias", k.DeleteAlias) + http.Register(logger, methodRegistry, service, "DescribeKey", k.DescribeKey) http.Register(logger, methodRegistry, service, "DisableKey", k.DisableKey) http.Register(logger, methodRegistry, service, "EnableKey", k.EnableKey) http.Register(logger, methodRegistry, service, "Encrypt", k.Encrypt) diff --git a/services/s3/s3.go b/services/s3/s3.go index 2b5348a..1177cd4 100644 --- a/services/s3/s3.go +++ b/services/s3/s3.go @@ -658,6 +658,11 @@ func (s *S3) AbortMultipartUpload(input AbortMultipartUploadInput) (*Response204 return nil, awserrors.XXX_TODO("bad upload status") } + if upload.Bucket != input.Bucket || upload.Key != input.Key { + // TODO: check this behavior + return nil, awserrors.XXX_TODO("bad upload") + } + upload.Status = UploadStatusCompleted return response204, nil }