github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/ais/s3/const.go (about) 1 // Package s3 provides Amazon S3 compatibility layer 2 /* 3 * Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved. 4 */ 5 package s3 6 7 import "fmt" 8 9 const ( 10 // AWS URL params 11 QparamVersioning = "versioning" 12 QparamLifecycle = "lifecycle" 13 QparamCORS = "cors" 14 QparamPolicy = "policy" 15 QparamACL = "acl" 16 QparamMultiDelete = "delete" 17 QparamMaxKeys = "max-keys" 18 QparamPrefix = "prefix" 19 QparamContinuationToken = "continuation-token" 20 QparamStartAfter = "start-after" 21 QparamDelimiter = "delimiter" 22 23 // multipart 24 QparamMptUploads = "uploads" 25 QparamMptUploadID = "uploadId" 26 QparamMptPartNo = "partNumber" 27 QparamMptMaxUploads = "max-uploads" 28 QparamMptUploadIDMarker = "upload-id-marker" 29 30 QparamAccessKeyID = "AWSAccessKeyId" 31 QparamExpires = "Expires" 32 QparamSignature = "Signature" 33 QparamXID = "x-id" 34 35 HeaderAlgorithm = "X-Amz-Algorithm" 36 HeaderCredentials = "X-Amz-Credential" //nolint:gosec // This is just a header name definition... 37 HeaderDate = "X-Amz-Date" 38 HeaderExpires = "X-Amz-Expires" 39 HeaderSignedHeaders = "X-Amz-SignedHeaders" 40 HeaderSignature = "X-Amz-Signature" 41 42 versioningEnabled = "Enabled" 43 versioningDisabled = "Suspended" 44 45 // Maximum number of parts per upload 46 // https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html 47 MaxPartsPerUpload = 10000 48 49 s3Namespace = "http://s3.amazonaws.com/doc/2006-03-01" 50 s3URL = "https://%s.s3.%s.amazonaws.com/%s?%s" 51 52 AISRegion = "ais" 53 AISServer = "AIStore" 54 ) 55 56 func makeS3URL(region, bucketName, objectName, query string) string { 57 return fmt.Sprintf(s3URL, bucketName, region, objectName, query) 58 }