api: verify Location constraint for make bucket. (#1342)

This commit is contained in:
karthic rao
2016-04-21 06:05:38 +05:30
committed by Harshavardhana
parent c3d0a3d51e
commit cb1116725b
5 changed files with 123 additions and 27 deletions
+11
View File
@@ -16,11 +16,22 @@
package main
import (
"encoding/xml"
)
// ObjectIdentifier carries key name for the object to delete.
type ObjectIdentifier struct {
ObjectName string `xml:"Key"`
}
// createBucketConfiguration container for bucket configuration request from client.
// Used for parsing the location from the request body for MakeBucketbucket.
type createBucketLocationConfiguration struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CreateBucketConfiguration" json:"-"`
Location string `xml:"LocationConstraint"`
}
// DeleteObjectsRequest - xml carrying the object key names which needs to be deleted.
type DeleteObjectsRequest struct {
// Element to enable quiet mode for the request