Listen bucket notification for multiple prefixes/suffixes (#2911)

* Listen bucket notification for multiple prefixes/suffixes

* After review fixes
This commit is contained in:
Mateusz Gajewski
2016-10-12 20:02:15 +02:00
committed by Harshavardhana
parent 6199aa0707
commit 73982c8cb6
5 changed files with 74 additions and 19 deletions

View File

@@ -1402,10 +1402,11 @@ func getGetBucketNotificationURL(endPoint, bucketName string) string {
}
// return URL for listen bucket notification.
func getListenBucketNotificationURL(endPoint, bucketName, prefix, suffix string, events []string) string {
func getListenBucketNotificationURL(endPoint, bucketName string, prefixes, suffixes, events []string) string {
queryValue := url.Values{}
queryValue.Set("prefix", prefix)
queryValue.Set("suffix", suffix)
queryValue["prefix"] = prefixes
queryValue["suffix"] = suffixes
queryValue["events"] = events
return makeTestTargetURL(endPoint, bucketName, "", queryValue)
}