mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Created Amazon S3 API (markdown)
parent
d714feeb3d
commit
4e69294d0e
33
Amazon-S3-API.md
Normal file
33
Amazon-S3-API.md
Normal file
|
@ -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/<bucket_name> 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)
|
||||
|
||||
```
|
Loading…
Reference in a new issue