You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.7 KiB

  1. package s3api
  2. import (
  3. "net/http"
  4. "github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
  5. )
  6. // GetBucketCorsHandler Get bucket CORS
  7. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html
  8. func (s3a *S3ApiServer) GetBucketCorsHandler(w http.ResponseWriter, r *http.Request) {
  9. s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchCORSConfiguration)
  10. }
  11. // PutBucketCorsHandler Put bucket CORS
  12. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html
  13. func (s3a *S3ApiServer) PutBucketCorsHandler(w http.ResponseWriter, r *http.Request) {
  14. s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented)
  15. }
  16. // DeleteBucketCorsHandler Delete bucket CORS
  17. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html
  18. func (s3a *S3ApiServer) DeleteBucketCorsHandler(w http.ResponseWriter, r *http.Request) {
  19. s3err.WriteErrorResponse(w, r, http.StatusNoContent)
  20. }
  21. // GetBucketPolicyHandler Get bucket Policy
  22. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicy.html
  23. func (s3a *S3ApiServer) GetBucketPolicyHandler(w http.ResponseWriter, r *http.Request) {
  24. s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchBucketPolicy)
  25. }
  26. // PutBucketPolicyHandler Put bucket Policy
  27. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketPolicy.html
  28. func (s3a *S3ApiServer) PutBucketPolicyHandler(w http.ResponseWriter, r *http.Request) {
  29. s3err.WriteErrorResponse(w, r, s3err.ErrNotImplemented)
  30. }
  31. // DeleteBucketPolicyHandler Delete bucket Policy
  32. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html
  33. func (s3a *S3ApiServer) DeleteBucketPolicyHandler(w http.ResponseWriter, r *http.Request) {
  34. s3err.WriteErrorResponse(w, r, http.StatusNoContent)
  35. }