From b5ac990453564dea7bb7f44e6c780b946d4e2c9d Mon Sep 17 00:00:00 2001 From: Mike Cowgill Date: Sun, 28 Jun 2020 10:17:42 -0700 Subject: [PATCH 1/3] feat: add s3 batch result code constants --- events/s3_batch_job.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/events/s3_batch_job.go b/events/s3_batch_job.go index f2626edd..ec1457f3 100644 --- a/events/s3_batch_job.go +++ b/events/s3_batch_job.go @@ -2,6 +2,16 @@ package events +// S3BatchJobResultCode represents the result of an S3BatchJobTask (i.e. +// succeeded, permanent failure, or temmporary failure) +type S3BatchJobResultCode string + +const ( + S3BatchJobResultCodeSucceeded S3BatchJobResultCode = "Succeeded" + S3BatchJobResultCodeTemporaryFailure = "TemporaryFailure" + S3BatchJobResultCodePermanentFailure = "PermanentFailure" +) + // S3BatchJobEvent encapsulates the detail of a s3 batch job type S3BatchJobEvent struct { InvocationSchemaVersion string `json:"invocationSchemaVersion"` @@ -33,7 +43,7 @@ type S3BatchJobResponse struct { // S3BatchJobResult represents the result of a given task type S3BatchJobResult struct { - TaskID string `json:"taskId"` - ResultCode string `json:"resultCode"` - ResultString string `json:"resultString"` + TaskID string `json:"taskId"` + ResultCode S3BatchJobResultCode `json:"resultCode"` + ResultString string `json:"resultString"` } From ab4970be290a560c4edb26f57986c9b207d91af9 Mon Sep 17 00:00:00 2001 From: Mike Cowgill Date: Sun, 28 Jun 2020 13:35:58 -0700 Subject: [PATCH 2/3] chore: fix linting --- events/s3_batch_job.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/events/s3_batch_job.go b/events/s3_batch_job.go index ec1457f3..78948025 100644 --- a/events/s3_batch_job.go +++ b/events/s3_batch_job.go @@ -6,10 +6,12 @@ package events // succeeded, permanent failure, or temmporary failure) type S3BatchJobResultCode string +// S3BatchJobResultCode represents the result of an S3BatchJobTask (i.e. +// succeeded, permanent failure, or temmporary failure) const ( S3BatchJobResultCodeSucceeded S3BatchJobResultCode = "Succeeded" - S3BatchJobResultCodeTemporaryFailure = "TemporaryFailure" - S3BatchJobResultCodePermanentFailure = "PermanentFailure" + S3BatchJobResultCodeTemporaryFailure S3BatchJobResultCode = "TemporaryFailure" + S3BatchJobResultCodePermanentFailure S3BatchJobResultCode = "PermanentFailure" ) // S3BatchJobEvent encapsulates the detail of a s3 batch job From 9e771ccd11639dd4abe2c0f2b3f7c9449ec74b2e Mon Sep 17 00:00:00 2001 From: Mike Cowgill Date: Sat, 3 Oct 2020 13:13:09 -0700 Subject: [PATCH 3/3] chore: remove breaking change proposal to s3 batch --- events/s3_batch_job.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/events/s3_batch_job.go b/events/s3_batch_job.go index 78948025..5d8dc3c0 100644 --- a/events/s3_batch_job.go +++ b/events/s3_batch_job.go @@ -45,7 +45,7 @@ type S3BatchJobResponse struct { // S3BatchJobResult represents the result of a given task type S3BatchJobResult struct { - TaskID string `json:"taskId"` - ResultCode S3BatchJobResultCode `json:"resultCode"` - ResultString string `json:"resultString"` + TaskID string `json:"taskId"` + ResultCode string `json:"resultCode"` + ResultString string `json:"resultString"` }