-
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
21 changed files
with
307 additions
and
226 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
// swift-tools-version:4.0 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "S3SignerAWS", | ||
targets: [], | ||
name: "S3", | ||
products: [ | ||
.library(name: "S3", targets: ["S3"]), | ||
.library(name: "S3Signer", targets: ["S3Signer"]), | ||
.library(name: "S3TestTools", targets: ["S3TestTools"]) | ||
], | ||
dependencies: [ | ||
.Package(url: "https://github.com/vapor/crypto.git", majorVersion: 2) | ||
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0-rc.2"), | ||
.package(url: "https://github.com/LiveUI/VaporTestTools.git", .branch("master")) | ||
], | ||
targets: [ | ||
.target(name: "S3", dependencies: [ | ||
"Vapor", | ||
"S3Signer" | ||
] | ||
), | ||
.target(name: "S3Signer", dependencies: [ | ||
"Vapor" | ||
] | ||
), | ||
.target(name: "S3TestTools", dependencies: [ | ||
"Vapor", | ||
"VaporTestTools", | ||
"S3" | ||
] | ||
), | ||
.testTarget(name: "S3Tests", dependencies: [ | ||
"S3" | ||
] | ||
) | ||
] | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
import Foundation | ||
|
||
|
||
class Bbbbb { | ||
|
||
} |
File renamed without changes.
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,34 @@ | ||
import Foundation | ||
|
||
public typealias Seconds = Int | ||
|
||
/// Pre-Sign URL Expiration time | ||
public enum Expiration { | ||
/// 30 minutes | ||
case thirtyMinutes | ||
|
||
/// 60 minutes | ||
case oneHour | ||
|
||
/// 180 minutes | ||
case threeHours | ||
|
||
/// Custom expiration time, in seconds. | ||
case custom(Seconds) | ||
} | ||
|
||
extension Expiration { | ||
/// Expiration Value | ||
internal var value: Seconds { | ||
switch self { | ||
case .thirtyMinutes: | ||
return 60 * 30 | ||
case .oneHour: | ||
return 60 * 60 | ||
case .threeHours: | ||
return 60 * 60 * 3 | ||
case .custom(let exp): | ||
return exp | ||
} | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.