github.com/minio/minio-go/v6@v6.0.57/constants.go (about)

     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  
    18  package 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.
    24  const absMinPartSize = 1024 * 1024 * 5
    25  
    26  // minPartSize - minimum part size 128MiB per object after which
    27  // putObject behaves internally as multipart.
    28  const minPartSize = 1024 * 1024 * 128
    29  
    30  // maxPartsCount - maximum number of parts for a single multipart session.
    31  const maxPartsCount = 10000
    32  
    33  // maxPartSize - maximum part size 5GiB for a single multipart upload
    34  // operation.
    35  const maxPartSize = 1024 * 1024 * 1024 * 5
    36  
    37  // maxSinglePutObjectSize - maximum size 5GiB of object per PUT
    38  // operation.
    39  const maxSinglePutObjectSize = 1024 * 1024 * 1024 * 5
    40  
    41  // maxMultipartPutObjectSize - maximum size 5TiB of object for
    42  // Multipart operation.
    43  const 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
    47  const unsignedPayload = "UNSIGNED-PAYLOAD"
    48  
    49  // Total number of parallel workers used for multipart operation.
    50  const totalWorkers = 4
    51  
    52  // Signature related constants.
    53  const (
    54  	signV4Algorithm   = "AWS4-HMAC-SHA256"
    55  	iso8601DateFormat = "20060102T150405Z"
    56  )
    57  
    58  const (
    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  	// Object legal hold header
    70  	amzLegalHoldHeader = "X-Amz-Object-Lock-Legal-Hold"
    71  
    72  	// Object retention header
    73  	amzLockMode         = "X-Amz-Object-Lock-Mode"
    74  	amzLockRetainUntil  = "X-Amz-Object-Lock-Retain-Until-Date"
    75  	amzBypassGovernance = "X-Amz-Bypass-Governance-Retention"
    76  )