forked from Kuska-ssb/solar
-
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.
add latest_image and example, update self_images example
- Loading branch information
1 parent
9074460
commit 915d068
Showing
3 changed files
with
27 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use anyhow::Result; | ||
use solar_client::{Client, SolarClient}; | ||
|
||
const SERVER_ADDR: &str = "http://127.0.0.1:3030"; | ||
const PUB_KEY: &str = "@HEqy940T6uB+T+d9Jaa58aNfRzLx9eRWqkZljBmnkmk=.ed25519"; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let client = Client::new(SERVER_ADDR.to_owned())?; | ||
|
||
let latest_image = client.latest_image(PUB_KEY).await?; | ||
println!("{:#?}", latest_image); | ||
// ( | ||
// "@HEqy940T6uB+T+d9Jaa58aNfRzLx9eRWqkZljBmnkmk=.ed25519", | ||
// "&8M2JFEFHlxJ5q8Lmu3P4bDdCHg0SLB27Q321cy9Upx4=.sha256", | ||
// ) | ||
|
||
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
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