Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rafiki270 committed Apr 18, 2018
1 parent 80d9b0a commit dad9267
Show file tree
Hide file tree
Showing 21 changed files with 307 additions and 226 deletions.
138 changes: 114 additions & 24 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,147 @@
"object": {
"pins": [
{
"package": "Bits",
"repositoryURL": "https://github.com/vapor/bits.git",
"package": "Console",
"repositoryURL": "https://github.com/vapor/console.git",
"state": {
"branch": null,
"revision": "c32f5e6ae2007dccd21a92b7e33eba842dd80d2f",
"version": "1.1.0"
"revision": "038e30ec9004fb1915d14d964a3facc1ec5c80f4",
"version": "3.0.0"
}
},
{
"package": "CTLS",
"repositoryURL": "https://github.com/vapor/ctls.git",
"package": "Core",
"repositoryURL": "https://github.com/vapor/core.git",
"state": {
"branch": null,
"revision": "fddec6a4643d6e85b6bb6dc54b1b5cdbabd395d2",
"version": "1.1.2"
"revision": "ce64e70a48adf54835d040ba4c4dab431e2cd020",
"version": "3.1.1"
}
},
{
"package": "Core",
"repositoryURL": "https://github.com/vapor/core.git",
"package": "Crypto",
"repositoryURL": "https://github.com/vapor/crypto.git",
"state": {
"branch": null,
"revision": "b8330808f4f6b69941961afe8ad6b015562f7b7c",
"version": "2.1.2"
"revision": "a5598aba7a118c29b224122c16598a1919b9e67d",
"version": "3.0.1"
}
},
{
"package": "Crypto",
"repositoryURL": "https://github.com/vapor/crypto.git",
"package": "DatabaseKit",
"repositoryURL": "https://github.com/vapor/database-kit.git",
"state": {
"branch": null,
"revision": "bf4470b9da79024aab79c85de80374f6c29e3864",
"version": "2.1.1"
"revision": "e594e658cc001e04b8d4ad13881d8714c510f94f",
"version": "1.0.0-rc.2.2.2"
}
},
{
"package": "Debugging",
"repositoryURL": "https://github.com/vapor/debugging.git",
"package": "Engine",
"repositoryURL": "https://github.com/vapor/engine.git",
"state": {
"branch": null,
"revision": "49c5e8f0a7cb5456a8f7c72c6cd9f1553e5885a8",
"version": "1.1.0"
"revision": "2419e37d689b78c9197b2f38cd8f2901cd7dcf9e",
"version": "3.0.0-rc.2.3.1"
}
},
{
"package": "Random",
"repositoryURL": "https://github.com/vapor/random.git",
"package": "Multipart",
"repositoryURL": "https://github.com/vapor/multipart.git",
"state": {
"branch": null,
"revision": "d7c4397d125caba795d14d956efacfe2a27a63d0",
"version": "1.2.0"
"revision": "d7b641af117910e66781022c1c82638216cad62c",
"version": "3.0.0"
}
},
{
"package": "Routing",
"repositoryURL": "https://github.com/vapor/routing.git",
"state": {
"branch": null,
"revision": "2fc1d4de22a54848b35ad17b3e7f7816f19ebf90",
"version": "3.0.0-rc.2"
}
},
{
"package": "Service",
"repositoryURL": "https://github.com/vapor/service.git",
"state": {
"branch": null,
"revision": "281a70b69783891900be31a9e70051b6fe19e146",
"version": "1.0.0"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "3275ff7c9c791a628631c2c51b39fd94346b2492",
"version": "1.4.2"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "ea006b6368dbd9dbfd297deb6ddb3f070b72d043",
"version": "1.0.1"
}
},
{
"package": "swift-nio-ssl-support",
"repositoryURL": "https://github.com/apple/swift-nio-ssl-support.git",
"state": {
"branch": null,
"revision": "c02eec4e0e6d351cd092938cf44195a8e669f555",
"version": "1.0.0"
}
},
{
"package": "swift-nio-zlib-support",
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
"state": {
"branch": null,
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
"version": "1.0.0"
}
},
{
"package": "TemplateKit",
"repositoryURL": "https://github.com/vapor/template-kit.git",
"state": {
"branch": null,
"revision": "497b987a79291c3743fe4ba6f17eadcdf20c1728",
"version": "1.0.0"
}
},
{
"package": "Validation",
"repositoryURL": "https://github.com/vapor/validation.git",
"state": {
"branch": null,
"revision": "ab6c5a352d97c8687b91ed4963aef8e7cfe0795b",
"version": "2.0.0"
}
},
{
"package": "Vapor",
"repositoryURL": "https://github.com/vapor/vapor.git",
"state": {
"branch": null,
"revision": "26b5c4032f236cc78e6fd3a51ac6d8aceb5a3a4f",
"version": "3.0.0-rc.2.4.1"
}
},
{
"package": "VaporTestTools",
"repositoryURL": "https://github.com/LiveUI/VaporTestTools.git",
"state": {
"branch": "master",
"revision": "0791548a30e6a805bf9291b0ad6707c4085cc3ee",
"version": null
}
}
]
Expand Down
33 changes: 30 additions & 3 deletions Package.swift
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"
]
)
]
)
16 changes: 0 additions & 16 deletions Package@swift-4.swift

This file was deleted.

68 changes: 0 additions & 68 deletions Sources/Payload.swift

This file was deleted.

38 changes: 0 additions & 38 deletions Sources/PercentEncoder.swift

This file was deleted.

6 changes: 6 additions & 0 deletions Sources/S3/Dates.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Foundation


class Bbbbb {

}
File renamed without changes.
34 changes: 34 additions & 0 deletions Sources/S3Signer/Expiration.swift
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.
Loading

0 comments on commit dad9267

Please sign in to comment.