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.
55 lines
1.7 KiB
55 lines
1.7 KiB
![]()
10 years ago
|
/*
|
||
![]()
9 years ago
|
* Minio Cloud Storage, (C) 2015 Minio, Inc.
|
||
![]()
10 years ago
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*/
|
||
|
|
||
![]()
9 years ago
|
package main
|
||
![]()
10 years ago
|
|
||
|
import (
|
||
|
"net/url"
|
||
|
"strconv"
|
||
|
|
||
![]()
9 years ago
|
"github.com/minio/minio/pkg/fs"
|
||
![]()
10 years ago
|
)
|
||
![]()
10 years ago
|
|
||
![]()
10 years ago
|
// parse bucket url queries
|
||
![]()
9 years ago
|
func getBucketResources(values url.Values) (v fs.BucketResourcesMetadata) {
|
||
![]()
9 years ago
|
v.Prefix = values.Get("prefix")
|
||
|
v.Marker = values.Get("marker")
|
||
|
v.Maxkeys, _ = strconv.Atoi(values.Get("max-keys"))
|
||
|
v.Delimiter = values.Get("delimiter")
|
||
|
v.EncodingType = values.Get("encoding-type")
|
||
![]()
10 years ago
|
return
|
||
|
}
|
||
![]()
10 years ago
|
|
||
![]()
9 years ago
|
// part bucket url queries for ?uploads
|
||
![]()
9 years ago
|
func getBucketMultipartResources(values url.Values) (v fs.BucketMultipartResourcesMetadata) {
|
||
![]()
9 years ago
|
v.Prefix = values.Get("prefix")
|
||
|
v.KeyMarker = values.Get("key-marker")
|
||
|
v.MaxUploads, _ = strconv.Atoi(values.Get("max-uploads"))
|
||
|
v.Delimiter = values.Get("delimiter")
|
||
|
v.EncodingType = values.Get("encoding-type")
|
||
|
v.UploadIDMarker = values.Get("upload-id-marker")
|
||
|
return
|
||
|
}
|
||
|
|
||
![]()
9 years ago
|
// parse object url queries
|
||
![]()
9 years ago
|
func getObjectResources(values url.Values) (v fs.ObjectResourcesMetadata) {
|
||
![]()
9 years ago
|
v.UploadID = values.Get("uploadId")
|
||
|
v.PartNumberMarker, _ = strconv.Atoi(values.Get("part-number-marker"))
|
||
|
v.MaxParts, _ = strconv.Atoi(values.Get("max-parts"))
|
||
|
v.EncodingType = values.Get("encoding-type")
|
||
![]()
9 years ago
|
return
|
||
|
}
|