Skip to content

Commit

Permalink
fix: [torrust#78] parsing keys from tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Nov 30, 2022
1 parent 35f1e37 commit 8d26faa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/models/tracker_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ pub struct TrackerKey {
pub key: String,
pub valid_until: i64,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct NewTrackerKey {
pub key: String,
pub valid_until: Duration,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Duration {
pub secs: i64,
pub nanos: i64,
}

0 comments on commit 8d26faa

Please sign in to comment.