Skip to content

Commit 2eaa753

Browse files
committed
Refactor DateWrappers
1 parent e93e509 commit 2eaa753

File tree

6 files changed

+428
-56
lines changed

6 files changed

+428
-56
lines changed

Sources/TencentSCFEvents/Cloudwatch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public enum Cloudwatch {
7373
self.id = try container.decode(String.self, forKey: .id)
7474
self.source = try container.decode(String.self, forKey: .source)
7575
self.accountId = try container.decode(String.self, forKey: .accountId)
76-
self.time = (try container.decode(ISO8601Coding.self, forKey: .time)).wrappedValue
76+
self.time = (try container.decode(ISO8601DateCoding.self, forKey: .time)).wrappedValue
7777
self.region = try container.decode(AWSRegion.self, forKey: .region)
7878
self.resources = try container.decode([String].self, forKey: .resources)
7979

Sources/TencentSCFEvents/S3.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public enum S3 {
3636
public let eventSource: String
3737
public let awsRegion: AWSRegion
3838

39-
@ISO8601WithFractionalSecondsCoding
40-
public var eventTime: Date
39+
@ISO8601DateWithFractionalSecondsCoding public var eventTime: Date
4140
public let eventName: String
4241
public let userIdentity: UserIdentity
4342
public let requestParameters: RequestParameters

Sources/TencentSCFEvents/SES.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public enum SES {
5656
public let headersTruncated: Bool
5757
public let messageId: String
5858
public let source: String
59-
@ISO8601WithFractionalSecondsCoding public var timestamp: Date
59+
@ISO8601DateWithFractionalSecondsCoding public var timestamp: Date
6060
}
6161

6262
public struct CommonHeaders: Decodable {
@@ -84,7 +84,7 @@ public enum SES {
8484
public let recipients: [String]
8585
public let spamVerdict: Verdict
8686
public let spfVerdict: Verdict
87-
@ISO8601WithFractionalSecondsCoding public var timestamp: Date
87+
@ISO8601DateWithFractionalSecondsCoding public var timestamp: Date
8888
public let virusVerdict: Verdict
8989
}
9090

Sources/TencentSCFEvents/SNS.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public enum SNS {
6565
public let messageAttributes: [String: Attribute]
6666
public let signatureVersion: String
6767

68-
@ISO8601WithFractionalSecondsCoding
68+
@ISO8601DateWithFractionalSecondsCoding
6969
public var timestamp: Date
7070
public let signingCertURL: String
7171
public let message: String

0 commit comments

Comments
 (0)