|
@ -1,6 +1,8 @@ |
|
|
package s3api |
|
|
package s3api |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" |
|
|
"net/http" |
|
|
"net/http" |
|
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err" |
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err" |
|
@ -48,6 +50,28 @@ func (s3a *S3ApiServer) PutBucketVersioningHandler(w http.ResponseWriter, r *htt |
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GetBucketTaggingHandler Returns the tag set associated with the bucket
|
|
|
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html
|
|
|
|
|
|
func (s3a *S3ApiServer) GetBucketTaggingHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
bucket, _ := s3_constants.GetBucketAndObject(r) |
|
|
|
|
|
glog.V(3).Infof("GetBucketTagging %s", bucket) |
|
|
|
|
|
|
|
|
|
|
|
if err := s3a.checkBucket(r, bucket); err != s3err.ErrNone { |
|
|
|
|
|
s3err.WriteErrorResponse(w, r, err) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchTagSet) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s3a *S3ApiServer) PutBucketTaggingHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s3a *S3ApiServer) DeleteBucketTaggingHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// GetBucketEncryptionHandler Returns the default encryption configuration
|
|
|
// GetBucketEncryptionHandler Returns the default encryption configuration
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
|
|
|
func (s3a *S3ApiServer) GetBucketEncryptionHandler(w http.ResponseWriter, r *http.Request) { |
|
|
func (s3a *S3ApiServer) GetBucketEncryptionHandler(w http.ResponseWriter, r *http.Request) { |
|
@ -61,3 +85,17 @@ func (s3a *S3ApiServer) PutBucketEncryptionHandler(w http.ResponseWriter, r *htt |
|
|
func (s3a *S3ApiServer) DeleteBucketEncryptionHandler(w http.ResponseWriter, r *http.Request) { |
|
|
func (s3a *S3ApiServer) DeleteBucketEncryptionHandler(w http.ResponseWriter, r *http.Request) { |
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GetPublicAccessBlockHandler Retrieves the PublicAccessBlock configuration for an S3 bucket
|
|
|
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html
|
|
|
|
|
|
func (s3a *S3ApiServer) GetPublicAccessBlockHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s3a *S3ApiServer) PutPublicAccessBlockHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s3a *S3ApiServer) DeletePublicAccessBlockHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented) |
|
|
|
|
|
} |