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

View File

@@ -0,0 +1,33 @@
package minioapi
import (
"net/url"
"strconv"
)
type bucketResources struct {
prefix string
marker string
maxkeys int
policy bool
delimiter string
// uploads bool - TODO implemented with multipart support
}
func getBucketResources(values url.Values) (v bucketResources) {
for key, value := range values {
switch true {
case key == "prefix":
v.prefix = value[0]
case key == "marker":
v.marker = value[0]
case key == "maxkeys":
v.maxkeys, _ = strconv.Atoi(value[0])
case key == "policy":
v.policy = true
case key == "delimiter":
v.delimiter = value[0]
}
}
return
}