-
Notifications
You must be signed in to change notification settings - Fork 2
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
592ef6f
commit fa1b3f8
Showing
4 changed files
with
30 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use actix_web::{rt, Result}; | ||
|
||
pub struct DockerhubCommand { | ||
json: String, | ||
} | ||
|
||
impl DockerhubCommand { | ||
pub fn new(json: String) -> Self { | ||
Self { json } | ||
} | ||
} | ||
|
||
impl crate::console::commands::CallableTrait for DockerhubCommand { | ||
fn call(&self) -> Result<(), Box<dyn std::error::Error>> { | ||
rt::System::new().block_on(async { | ||
println!("{}", self.json); | ||
|
||
Ok(()) | ||
}) | ||
} | ||
} |
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,5 +1,7 @@ | ||
mod json; | ||
mod casbin; | ||
mod dockerhub; | ||
|
||
pub use json::*; | ||
pub use casbin::*; | ||
pub use dockerhub::*; |
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