generated from emo-crab/rust-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
f0be07d
commit f059c7a
Showing
19 changed files
with
703 additions
and
427 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
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,24 @@ | ||
use chrono::NaiveDateTime; | ||
use serde::{Deserialize, Serialize}; | ||
use crate::{date_format, DescriptionData}; | ||
use crate::impact::ImpactMetrics; | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
#[serde(rename_all(deserialize = "camelCase"), deny_unknown_fields)] | ||
pub struct CVE { | ||
pub id: String, | ||
pub source_identifier: String, | ||
#[serde(with = "date_format")] | ||
pub published_date: NaiveDateTime, | ||
// 最后修改时间 | ||
#[serde(with = "date_format")] | ||
pub last_modified_date: NaiveDateTime, | ||
pub vuln_status: VulnStatus, | ||
pub descriptions: Vec<DescriptionData>, | ||
pub metrics: ImpactMetrics, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
pub enum VulnStatus { | ||
Analyzed | ||
} |
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
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
Oops, something went wrong.