1package gofakes3
2
3import "time"
4
5const (
6	// From https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html:
7	//	"The name for a key is a sequence of Unicode characters whose UTF-8
8	//	encoding is at most 1024 bytes long."
9	KeySizeLimit = 1024
10
11	// From https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html:
12	//	Within the PUT request header, the user-defined metadata is limited to 2
13	// 	KB in size. The size of user-defined metadata is measured by taking the
14	// 	sum of the number of bytes in the UTF-8 encoding of each key and value.
15	//
16	// As this does not specify KB or KiB, KB is used in gofakes3. The reason
17	// for this is if gofakes3 is used for testing, and your tests show that
18	// 2KiB works, but Amazon uses 2KB...  that's a much worse time to discover
19	// the disparity!
20	DefaultMetadataSizeLimit = 2000
21
22	// Like DefaultMetadataSizeLimit, the docs don't specify MB or MiB, so we
23	// will accept 5MB for now. The Go client SDK rejects 5MB with the error
24	// "part size must be at least 5242880 bytes", which is a hint that it
25	// has been interpreted as MiB at least _somewhere_, but we should remain
26	// liberal in what we accept in the face of ambiguity.
27	DefaultUploadPartSize = 5 * 1000 * 1000
28
29	DefaultSkewLimit = 15 * time.Minute
30
31	MaxUploadsLimit       = 1000
32	DefaultMaxUploads     = 1000
33	MaxUploadPartsLimit   = 1000
34	DefaultMaxUploadParts = 1000
35
36	MaxBucketKeys        = 1000
37	DefaultMaxBucketKeys = 1000
38
39	MaxBucketVersionKeys        = 1000
40	DefaultMaxBucketVersionKeys = 1000
41
42	// From the docs: "Part numbers can be any number from 1 to 10,000, inclusive."
43	MaxUploadPartNumber = 10000
44
45	copySourceHeader = "X-Amz-Copy-Source"
46)
47