constants.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Minio Go Library for Amazon S3 Compatible Cloud Storage
  3. * Copyright 2015-2017 Minio, Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package minio
  18. /// Multipart upload defaults.
  19. // absMinPartSize - absolute minimum part size (5 MiB) below which
  20. // a part in a multipart upload may not be uploaded.
  21. const absMinPartSize = 1024 * 1024 * 5
  22. // minPartSize - minimum part size 64MiB per object after which
  23. // putObject behaves internally as multipart.
  24. const minPartSize = 1024 * 1024 * 64
  25. // copyPartSize - default (and maximum) part size to copy in a
  26. // copy-object request (5GiB)
  27. const copyPartSize = 1024 * 1024 * 1024 * 5
  28. // maxPartsCount - maximum number of parts for a single multipart session.
  29. const maxPartsCount = 10000
  30. // maxPartSize - maximum part size 5GiB for a single multipart upload
  31. // operation.
  32. const maxPartSize = 1024 * 1024 * 1024 * 5
  33. // maxSinglePutObjectSize - maximum size 5GiB of object per PUT
  34. // operation.
  35. const maxSinglePutObjectSize = 1024 * 1024 * 1024 * 5
  36. // maxMultipartPutObjectSize - maximum size 5TiB of object for
  37. // Multipart operation.
  38. const maxMultipartPutObjectSize = 1024 * 1024 * 1024 * 1024 * 5
  39. // unsignedPayload - value to be set to X-Amz-Content-Sha256 header when
  40. // we don't want to sign the request payload
  41. const unsignedPayload = "UNSIGNED-PAYLOAD"
  42. // Total number of parallel workers used for multipart operation.
  43. const totalWorkers = 4
  44. // Signature related constants.
  45. const (
  46. signV4Algorithm = "AWS4-HMAC-SHA256"
  47. iso8601DateFormat = "20060102T150405Z"
  48. )
  49. // Encryption headers stored along with the object.
  50. const (
  51. amzHeaderIV = "X-Amz-Meta-X-Amz-Iv"
  52. amzHeaderKey = "X-Amz-Meta-X-Amz-Key"
  53. amzHeaderMatDesc = "X-Amz-Meta-X-Amz-Matdesc"
  54. )
  55. // Storage class header constant.
  56. const amzStorageClass = "X-Amz-Storage-Class"