From 4e69294d0e08a95229c8b604f0389312fbe51a1a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 21 Jul 2018 21:23:26 -0700 Subject: [PATCH] Created Amazon S3 API (markdown) --- Amazon-S3-API.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Amazon-S3-API.md diff --git a/Amazon-S3-API.md b/Amazon-S3-API.md new file mode 100644 index 0000000..e6b8d8d --- /dev/null +++ b/Amazon-S3-API.md @@ -0,0 +1,33 @@ +To be compatible with Amazon S3 API, a separate "weed s3" command is provided. + +"weed s3" will start a stateless gateway server to bridge the Amazon S3 API to SeaweedFS Filer. + +Each bucket is stored in one collection, and mapped to folder /buckets/ by default. + +A bucket can be deleted efficiently by deleting the whole collection. + +Currently, the following APIs are supported. + +``` + // Object APIs + // PutObject + bucket.Methods("PUT").Path("/{object:.+}").HandlerFunc(s3a.PutObjectHandler) + // GetObject + bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(s3a.GetObjectHandler) + // HeadObject + bucket.Methods("HEAD").Path("/{object:.+}").HandlerFunc(s3a.HeadObjectHandler) + // DeleteObject + bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(s3a.DeleteObjectHandler) + + // Bucket APIs + // PutBucket + bucket.Methods("PUT").HandlerFunc(s3a.PutBucketHandler) + // DeleteBucket + bucket.Methods("DELETE").HandlerFunc(s3a.DeleteBucketHandler) + // HeadBucket + bucket.Methods("HEAD").HandlerFunc(s3a.HeadBucketHandler) + + // ListBuckets + apiRouter.Methods("GET").Path("/").HandlerFunc(s3a.ListBucketsHandler) + +``` \ No newline at end of file