s3: add s3 copy

fix https://github.com/chrislusf/seaweedfs/issues/1190
This commit is contained in:
Chris Lu
2020-01-31 00:11:08 -08:00
parent 3b043ead49
commit a80ecbfe84
6 changed files with 225 additions and 6 deletions

32
weed/s3api/s3api_test.go Normal file
View File

@@ -0,0 +1,32 @@
package s3api
import (
"testing"
"time"
)
func TestCopyObjectResponse(t *testing.T) {
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
response := CopyObjectResult{
ETag: "12345678",
LastModified: time.Now(),
}
println(string(encodeResponse(response)))
}
func TestCopyPartResponse(t *testing.T) {
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
response := CopyPartResult{
ETag: "12345678",
LastModified: time.Now(),
}
println(string(encodeResponse(response)))
}