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