constants.go 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 16MiB per object after which
  23. // putObject behaves internally as multipart.
  24. const minPartSize = 1024 * 1024 * 16
  25. // maxPartsCount - maximum number of parts for a single multipart session.
  26. const maxPartsCount = 10000
  27. // maxPartSize - maximum part size 5GiB for a single multipart upload
  28. // operation.
  29. const maxPartSize = 1024 * 1024 * 1024 * 5
  30. // maxSinglePutObjectSize - maximum size 5GiB of object per PUT
  31. // operation.
  32. const maxSinglePutObjectSize = 1024 * 1024 * 1024 * 5
  33. // maxMultipartPutObjectSize - maximum size 5TiB of object for
  34. // Multipart operation.
  35. const maxMultipartPutObjectSize = 1024 * 1024 * 1024 * 1024 * 5
  36. // unsignedPayload - value to be set to X-Amz-Content-Sha256 header when
  37. // we don't want to sign the request payload
  38. const unsignedPayload = "UNSIGNED-PAYLOAD"
  39. // Total number of parallel workers used for multipart operation.
  40. const totalWorkers = 4
  41. // Signature related constants.
  42. const (
  43. signV4Algorithm = "AWS4-HMAC-SHA256"
  44. iso8601DateFormat = "20060102T150405Z"
  45. )
  46. const (
  47. // Storage class header.
  48. amzStorageClass = "X-Amz-Storage-Class"
  49. // Website redirect location header
  50. amzWebsiteRedirectLocation = "X-Amz-Website-Redirect-Location"
  51. // Object Tagging headers
  52. amzTaggingHeader = "X-Amz-Tagging"
  53. amzTaggingHeaderDirective = "X-Amz-Tagging-Directive"
  54. amzVersionID = "X-Amz-Version-Id"
  55. amzTaggingCount = "X-Amz-Tagging-Count"
  56. amzExpiration = "X-Amz-Expiration"
  57. amzRestore = "X-Amz-Restore"
  58. amzReplicationStatus = "X-Amz-Replication-Status"
  59. amzDeleteMarker = "X-Amz-Delete-Marker"
  60. // Object legal hold header
  61. amzLegalHoldHeader = "X-Amz-Object-Lock-Legal-Hold"
  62. // Object retention header
  63. amzLockMode = "X-Amz-Object-Lock-Mode"
  64. amzLockRetainUntil = "X-Amz-Object-Lock-Retain-Until-Date"
  65. amzBypassGovernance = "X-Amz-Bypass-Governance-Retention"
  66. // Replication status
  67. amzBucketReplicationStatus = "X-Amz-Replication-Status"
  68. // Minio specific Replication/lifecycle transition extension
  69. minIOBucketSourceMTime = "X-Minio-Source-Mtime"
  70. minIOBucketSourceETag = "X-Minio-Source-Etag"
  71. minIOBucketReplicationDeleteMarker = "X-Minio-Source-DeleteMarker"
  72. minIOBucketReplicationProxyRequest = "X-Minio-Source-Proxy-Request"
  73. minIOBucketReplicationRequest = "X-Minio-Source-Replication-Request"
  74. // Header indicates last tag update time on source
  75. minIOBucketReplicationTaggingTimestamp = "X-Minio-Source-Replication-Tagging-Timestamp"
  76. // Header indicates last retention update time on source
  77. minIOBucketReplicationObjectRetentionTimestamp = "X-Minio-Source-Replication-Retention-Timestamp"
  78. // Header indicates last legalhold update time on source
  79. minIOBucketReplicationObjectLegalHoldTimestamp = "X-Minio-Source-Replication-LegalHold-Timestamp"
  80. minIOForceDelete = "x-minio-force-delete"
  81. )