-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
199 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// Object.swift | ||
// S3 | ||
// | ||
// Created by Ondrej Rafaj on 12/05/2018. | ||
// | ||
|
||
import Foundation | ||
import Vapor | ||
|
||
|
||
/// S3 object | ||
public struct Object: Content { | ||
|
||
/// The object's key / file name | ||
let fileName: String | ||
|
||
/// STANDARD | STANDARD_IA | ONEZONE_IA | REDUCED_REDUNDANCY | GLACIER | ||
public let storageClass: String? | ||
|
||
/// The entity tag is an MD5 hash of the object. ETag reflects only changes to the contents of an object, not its metadata | ||
public let etag: String | ||
|
||
/// Owner | ||
public let owner: Owner? | ||
|
||
/// Size in bytes of the object | ||
public let size: Int? | ||
|
||
/// Date and time the object was last modified | ||
public let lastModified: Date | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case fileName = "Key" | ||
case storageClass = "StorageClass" | ||
case etag = "ETag" | ||
case owner = "Owner" | ||
case size = "Size" | ||
case lastModified = "LastModified" | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters