Path: redb-route/redb.Route.S3/S3Headers.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.S3/S3Headers.cs ---- namespace redb.Route.S3; /// /// Well-known header constants used by the S3 component. /// Follows the redbS3. prefix convention. /// public static class S3Headers { /// Common prefix for all S3 component headers. public const string Prefix = "redbS3."; // ═══════════════════════════════════════════════════════════════════ // COMMON (set by consumer, read by producer) // ═══════════════════════════════════════════════════════════════════ /// Bucket name. public const string BucketName = "redbS3.BucketName"; /// Object key (path within the bucket). public const string Key = "redbS3.Key"; /// Content-Type MIME type of the object. public const string ContentType = "redbS3.ContentType"; /// Content-Length in bytes. public const string ContentLength = "redbS3.ContentLength"; /// Content-MD5 (base64-encoded). public const string ContentMD5 = "redbS3.ContentMD5"; /// Content-Disposition header value. public const string ContentDisposition = "redbS3.ContentDisposition"; /// Content-Encoding header value. public const string ContentEncoding = "redbS3.ContentEncoding"; /// Cache-Control header value. public const string CacheControl = "redbS3.CacheControl"; /// ETag of the object (hex-encoded MD5 on upload, or opaque for multipart). public const string ETag = "redbS3.ETag"; /// Last modified timestamp. public const string LastModified = "redbS3.LastModified"; /// S3 storage class (STANDARD, GLACIER, etc.). public const string StorageClass = "redbS3.StorageClass"; /// Version ID (if bucket versioning is enabled). public const string VersionId = "redbS3.VersionId"; /// Server-side encryption algorithm. public const string ServerSideEncryption = "redbS3.ServerSideEncryption"; /// S3 operation to perform (used to override endpoint operation). public const string Operation = "redbS3.Operation"; // ═══════════════════════════════════════════════════════════════════ // CONSUMER (set on incoming messages) // ═══════════════════════════════════════════════════════════════════ /// Object expiration time (if lifecycle configured). public const string ExpirationTime = "redbS3.ExpirationTime"; /// Replication status (COMPLETE, PENDING, FAILED, REPLICA). public const string ReplicationStatus = "redbS3.ReplicationStatus"; /// Message timestamp (Unix ms). public const string Timestamp = "redbS3.Timestamp"; // ═══════════════════════════════════════════════════════════════════ // PRODUCER INPUT (set by user before sending) // ═══════════════════════════════════════════════════════════════════ /// Destination bucket name (for CopyObject). public const string DestinationBucket = "redbS3.DestinationBucket"; /// Destination object key (for CopyObject). public const string DestinationKey = "redbS3.DestinationKey"; /// Canned ACL preset (Private, PublicRead, etc.). public const string CannedAcl = "redbS3.CannedAcl"; /// Range start byte offset (for GetObjectRange). public const string RangeStart = "redbS3.RangeStart"; /// Range end byte offset (for GetObjectRange). public const string RangeEnd = "redbS3.RangeEnd"; /// Presigned URL expiration in milliseconds. public const string PresignedUrlExpiration = "redbS3.PresignedUrlExpiration"; /// List of keys to delete (for DeleteObjects operation). public const string KeysToDelete = "redbS3.KeysToDelete"; /// Object tags dictionary (for PutObjectTagging). public const string ObjectTags = "redbS3.ObjectTags"; /// Versioning status: "Enabled" or "Suspended" (for PutBucketVersioning). public const string VersioningStatus = "redbS3.VersioningStatus"; /// Number of days for Glacier restore (for RestoreObject). public const string RestoreDays = "redbS3.RestoreDays"; /// Restore tier: Standard, Bulk, Expedited (for RestoreObject). public const string RestoreTier = "redbS3.RestoreTier"; /// Override bucket name dynamically (overrides endpoint bucket). public const string OverrideBucketName = "redbS3.OverrideBucketName"; // ═══════════════════════════════════════════════════════════════════ // METADATA // ═══════════════════════════════════════════════════════════════════ /// /// Prefix for user metadata headers. Example: redbS3.Meta.x-amz-meta-author. /// All headers with this prefix are mapped to S3 object metadata on upload /// and populated from S3 object metadata on download. /// public const string MetadataPrefix = "redbS3.Meta."; // ═══════════════════════════════════════════════════════════════════ // PRODUCER OUTPUT // ═══════════════════════════════════════════════════════════════════ /// Presigned URL (set after CreateDownloadLink/CreateUploadLink). public const string PresignedUrl = "redbS3.PresignedUrl"; /// The produced (resolved) key name after upload. public const string ProducedKey = "redbS3.ProducedKey"; /// The produced (resolved) bucket name after operation. public const string ProducedBucketName = "redbS3.ProducedBucketName"; /// Whether the bucket exists (set after HeadBucket). public const string BucketExists = "redbS3.BucketExists"; /// Returns true if the header key belongs to the S3 component. public static bool IsRedbHeader(string key) => key.StartsWith(Prefix, StringComparison.OrdinalIgnoreCase); }