aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-18 14:37:26 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-18 14:37:26 -0800
commit0ba79827d71d33b542ec71e4542c2be3ebbb66e7 (patch)
treeec4c7e37fdad3434ebe3b14bd96ce2eb33c50723 /rust/fatcat-api-spec/src
parent42a2474fda8b223eef609e3e022c8647be2d27c5 (diff)
downloadfatcat-0ba79827d71d33b542ec71e4542c2be3ebbb66e7.tar.gz
fatcat-0ba79827d71d33b542ec71e4542c2be3ebbb66e7.zip
rust codegen
Diffstat (limited to 'rust/fatcat-api-spec/src')
-rw-r--r--rust/fatcat-api-spec/src/models.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 5d05b737..1a34dd48 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -1008,6 +1008,7 @@ pub struct WebcaptureEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
+ /// same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Can be the earliest or average of CDX timestamps if that makes sense.
#[serde(rename = "timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<chrono::DateTime<chrono::Utc>>,
@@ -1091,8 +1092,9 @@ pub struct WebcaptureEntityCdx {
#[serde(rename = "surt")]
pub surt: String,
+ /// UTC, 'Z'-terminated, second (or better) precision
#[serde(rename = "timestamp")]
- pub timestamp: String,
+ pub timestamp: chrono::DateTime<chrono::Utc>,
#[serde(rename = "url")]
pub url: String,
@@ -1114,7 +1116,7 @@ pub struct WebcaptureEntityCdx {
}
impl WebcaptureEntityCdx {
- pub fn new(surt: String, timestamp: String, url: String, sha1: String) -> WebcaptureEntityCdx {
+ pub fn new(surt: String, timestamp: chrono::DateTime<chrono::Utc>, url: String, sha1: String) -> WebcaptureEntityCdx {
WebcaptureEntityCdx {
surt: surt,
timestamp: timestamp,