construct URL for http requests for bucket operations.
(endPoint, bucketName, objectName string, queryValues url.Values)
| 1230 | |
| 1231 | // construct URL for http requests for bucket operations. |
| 1232 | func makeTestTargetURL(endPoint, bucketName, objectName string, queryValues url.Values) string { |
| 1233 | urlStr := endPoint + SlashSeparator |
| 1234 | if bucketName != "" { |
| 1235 | urlStr = urlStr + bucketName + SlashSeparator |
| 1236 | } |
| 1237 | if objectName != "" { |
| 1238 | urlStr += s3utils.EncodePath(objectName) |
| 1239 | } |
| 1240 | if len(queryValues) > 0 { |
| 1241 | urlStr = urlStr + "?" + queryValues.Encode() |
| 1242 | } |
| 1243 | return urlStr |
| 1244 | } |
| 1245 | |
| 1246 | // return URL for uploading object into the bucket. |
| 1247 | func getPutObjectURL(endPoint, bucketName, objectName string) string { |
no test coverage detected