Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Leechael committed Oct 16, 2024
1 parent dbd7ae6 commit db753e4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rpc/src/generated.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub use tappd::*;

mod protos_codec_extensions;
#[allow(async_fn_in_trait)]
mod tappd;
mod protos_codec_extensions;
6 changes: 4 additions & 2 deletions src/http_routes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
rpc_service::{AppState, InternalRpcHandler},
rocket_helper::handle_prpc,
rpc_service::{AppState, InternalRpcHandler},
};
use anyhow::Result;
use rocket::{
Expand All @@ -10,7 +10,9 @@ use rocket::{
mtls::Certificate,
post,
response::status::Custom,
routes, Route, State,
routes,
Route,
State,
// serde::json::Json,
};

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use rocket::{
use rpc_service::AppState;

mod config;
mod rpc_call;
mod rocket_helper;
mod http_routes;
mod rocket_helper;
mod rpc_call;
mod rpc_service;

#[derive(Parser)]
Expand Down
16 changes: 9 additions & 7 deletions src/rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ use anyhow::Result;
use tappd_rpc::{
tappd_server::{TappdRpc, TappdServer},
// Container,
DeriveKeyArgs, DeriveKeyResponse, TdxQuoteArgs,
DeriveKeyArgs,
DeriveKeyResponse,
TdxQuoteArgs,
TdxQuoteResponse,
};

use crate::{
rpc_call::RpcCall,
config::Config,
};
use crate::{config::Config, rpc_call::RpcCall};

#[derive(Clone)]
pub struct AppState {
// inner: Arc<AppStateInner>,
}

// struct AppStateInner {
// ca: CaCert,
// ca: CaCert,
// }

impl AppState {
Expand All @@ -44,7 +43,10 @@ impl TappdRpc for InternalRpcHandler {
// let cert = vec![0u8; 64];
Ok(DeriveKeyResponse {
key: String::from("mock_derived_key_pem"),
certificate_chain: vec![String::from("mock_cert_pem"), String::from("mock_ca_cert_pem")],
certificate_chain: vec![
String::from("mock_cert_pem"),
String::from("mock_ca_cert_pem"),
],
})
}

Expand Down

0 comments on commit db753e4

Please # to comment.