Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions rustcloud/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,3 @@ serde_json = "1.0.118"
sha2 = "0.10.9"

tokio = { version = "1.37.0", features = ["full", "test-util"] }


[dev-dependencies]
rustcloud = { path = '.' }

[[language]]
name = "rust"
file-types = ["rs"]
comment-tokens = ["//", "///", "//!"]
indent = { tab-width = 2, unit = " " }
language-servers = [ "rust-analyzer"]
1 change: 0 additions & 1 deletion rustcloud/src/aws/aws_apis/compute/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod aws_ec2;
pub mod aws_ecs;
pub mod aws_eks;
pub mod aws_paas;
2 changes: 0 additions & 2 deletions rustcloud/src/aws/aws_apis/database/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
pub mod aws_dynamodb;
pub mod aws_nosqlindexed;
pub mod aws_rbmds;
9 changes: 6 additions & 3 deletions rustcloud/src/gcp/gcp_apis/storage/gcp_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ impl GoogleStorage {
.send()
.await?;

let status = resp.status().as_u16();
let body = resp.text().await.unwrap_or_default();
let mut response: HashMap<String, Value> = HashMap::new();
response.insert(
"status".to_string(),
Value::Number(resp.status().as_u16().into()),
Value::Number(status.into()),
);
response.insert("body".to_string(), Value::String(body));

Expand All @@ -149,12 +150,13 @@ impl GoogleStorage {
.send()
.await?;

let status = resp.status().as_u16();
let body = resp.text().await.unwrap_or_default();

let mut response = HashMap::new();
response.insert(
"status".to_string(),
Value::Number(resp.status().as_u16().into()),
Value::Number(status.into()),
);
response.insert("body".to_string(), Value::String(body));

Expand Down Expand Up @@ -243,12 +245,13 @@ impl GoogleStorage {
.send()
.await?;

let status = resp.status().as_u16();
let body = resp.text().await.unwrap_or_default();

let mut response = HashMap::new();
response.insert(
"status".to_string(),
Value::Number(resp.status().as_u16().into()),
Value::Number(status.into()),
);
response.insert("body".to_string(), Value::String(body));

Expand Down
3 changes: 1 addition & 2 deletions rustcloud/src/gcp/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pub mod gcp_apis;
// pub m
pub mod types;
pub mod types;
10 changes: 10 additions & 0 deletions rustcloud/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub mod aws;
pub mod azure;
pub mod digiocean;
pub mod errors;
pub mod gcp;
pub mod traits;
pub mod types;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pub mod aws alone won't resolve nested paths like aws::aws_apis::compute::aws_ec2. Need src/aws/mod.rs and src/aws/aws_apis/mod.rs declaring all sub-modules, otherwise this won't compile.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

digiocean, azure sub-modules and gcp::gcp_apis::artificial_intelligence::vertex are missing — they were in main.rs but not carried over here.

#[cfg(test)]
mod tests;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests use crate:: paths worth verifying all imports still resolve correctly now that crate root is lib.rs instead of main.rs.

96 changes: 1 addition & 95 deletions rustcloud/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,97 +1,3 @@
mod tests;
pub mod errors;
pub mod types {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All sub-module declarations removed but the mod.rs files to replace them are not added in this PR. This will fail to compile until those are added.

pub mod llm;
}
pub mod traits {
pub mod llm_provider;
pub mod token_provider;
}
pub mod azure{
pub mod azure_apis{
pub mod auth{
pub mod azure_auth;
}
pub mod storage{
pub mod azure_blob;
}
}
}
pub mod aws {
pub mod aws_apis {
pub mod compute {
pub mod aws_ec2;
pub mod aws_ecs;
pub mod aws_eks;
}
pub mod database {
pub mod aws_dynamodb;
}
pub mod management {
pub mod aws_monitoring;
}
pub mod network {
pub mod aws_dns;
pub mod aws_loadbalancer;
}
pub mod security {
pub mod aws_iam;
pub mod aws_keymanagement;
}
pub mod storage {
pub mod aws_archival_storage;
pub mod aws_block_storage;
pub mod aws_storage_bucket;
}
}
}

pub mod gcp {
pub mod gcp_apis {
pub mod app_services {
pub mod gcp_notification_service;
}
pub mod artificial_intelligence {
pub mod gcp_automl;
}
pub mod compute {
pub mod gcp_compute_engine;
pub mod gcp_kubernetes;
}
pub mod database {
pub mod gcp_bigtable;
pub mod gcp_bigquery;
}
pub mod network {
pub mod gcp_dns;
pub mod gcp_loadbalancer;
}
pub mod storage {
pub mod gcp_storage;
}
pub mod auth {
pub mod gcp_auth;
}
}
pub mod types;
}

pub mod digiocean {
pub mod digiocean_apis {
pub mod compute {
pub mod digiocean_droplet;
}
pub mod dns {
pub mod digiocean_dns;
}
pub mod network {
pub mod digiocean_loadbalancer;
}
pub mod storage {
pub mod digiocean_storage;
}
}
}
fn main() {
println!("Hello, world!");
println!("RustCloud library crate");
}
1 change: 1 addition & 0 deletions rustcloud/src/traits/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod llm_provider;
pub mod token_provider;