Implement bucket policy handler and with galore of cleanup

This commit is contained in:
Harshavardhana
2015-02-15 17:03:27 -08:00
parent 7d8c34e055
commit eeae64935e
18 changed files with 827 additions and 407 deletions
+12
View File
@@ -59,6 +59,8 @@ const (
RequestTimeTooSkewed
SignatureDoesNotMatch
TooManyBuckets
InvalidPolicyDocument
NoSuchBucketPolicy
)
var errorCodeResponse = map[int]Error{
@@ -167,6 +169,16 @@ var errorCodeResponse = map[int]Error{
Description: "You have attempted to create more buckets than allowed.",
HttpStatusCode: http.StatusBadRequest,
},
InvalidPolicyDocument: {
Code: "InvalidPolicyDocument",
Description: "The content of the form does not meet the conditions specified in the policy document.",
HttpStatusCode: http.StatusBadRequest,
},
NoSuchBucketPolicy: {
Code: "NoSuchBucketPolicy",
Description: "The specified bucket does not have a bucket policy.",
HttpStatusCode: http.StatusNotFound,
},
}
// errorCodeError provides errorCode to Error. It returns empty if