-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update Checksum functionality to support optional output path
- Loading branch information
Showing
6 changed files
with
69 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,7 +216,7 @@ impl DumpSync { | |
|
||
let _ = Checksum::new( | ||
&file, | ||
&output, | ||
output.as_deref(), | ||
).generated(); | ||
} | ||
|
||
|
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,32 @@ | ||
extern crate colored; | ||
|
||
use colored::*; | ||
|
||
use crate::utils::date::Date; | ||
|
||
pub struct ChecksumAlerts; | ||
|
||
impl ChecksumAlerts { | ||
|
||
pub fn file(file: &str) { | ||
println!("File: {}", file.blue()); | ||
} | ||
|
||
pub fn checksum(file: &str) { | ||
let current_datetime = Date::date_time(); | ||
|
||
println!( | ||
"\r{} The checksum was successfully generated and saved in: {}", | ||
current_datetime.green().bold(), | ||
file.blue() | ||
); | ||
} | ||
|
||
pub fn printable(algo: &str, hash: &str) { | ||
println!( | ||
"{}: {}", | ||
algo.cyan(), hash.yellow() | ||
); | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
pub mod ui_base; | ||
|
||
pub mod scan_alerts; | ||
pub mod share_alerts; | ||
pub mod schema_alerts; | ||
pub mod report_alerts; | ||
pub mod checksum_alerts; | ||
|
||
pub mod normal_alerts; | ||
pub mod errors_alerts; | ||
pub mod success_alerts; |
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