Luka-J9 commented on code in PR #1246:
URL: https://github.com/apache/pekko-connectors/pull/1246#discussion_r2440986912
##########
s3/src/main/scala/org/apache/pekko/stream/connectors/s3/impl/S3Request.scala:
##########
@@ -18,69 +18,322 @@ import org.apache.pekko.annotation.InternalApi
/**
* Internal Api
*/
-@InternalApi private[s3] sealed trait S3Request
+@InternalApi private[s3] sealed trait S3Request {
+ def allowedHeaders: Set[String]
+}
/**
* Internal Api
*/
-@InternalApi private[s3] case object GetObject extends S3Request
+@InternalApi private[s3] object S3Request {
+ def fromString(str: String): Option[S3Request] = {
+ str match {
+ case "GetObject" => Some(GetObject)
+ case "HeadObject" => Some(HeadObject)
+ case "PutObject" => Some(PutObject)
+ case "InitiateMultipartUpload" => Some(InitiateMultipartUpload)
+ case "UploadPart" => Some(UploadPart)
+ case "CopyPart" => Some(CopyPart)
+ case "DeleteObject" => Some(DeleteObject)
+ case "ListBucket" => Some(ListBucket)
+ case "MakeBucket" => Some(MakeBucket)
+ case "DeleteBucket" => Some(DeleteBucket)
+ case "CheckBucket" => Some(CheckBucket)
+ case _ => None
+ }
+ }
+
+ val allRequests: List[S3Request] = List(GetObject, HeadObject, PutObject,
InitiateMultipartUpload, UploadPart,
+ CopyPart, DeleteObject, ListBucket, MakeBucket, DeleteBucket, CheckBucket)
+}
/**
* Internal Api
*/
-@InternalApi private[s3] case object HeadObject extends S3Request
+@InternalApi private[s3] case object GetObject extends S3Request {
+
+ override def allowedHeaders: Set[String] = Set(
Review Comment:
I'll also double check these when I move this out of draft
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]