| Crates.io | armature-gcp |
| lib.rs | armature-gcp |
| version | 0.1.0 |
| created_at | 2025-12-26 19:30:45.223802+00 |
| updated_at | 2025-12-26 19:30:45.223802+00 |
| description | Google Cloud Platform services integration for Armature - dynamically loadable and DI-ready |
| homepage | https://pegasusheavy.github.io/armature |
| repository | https://github.com/pegasusheavy/armature |
| max_upload_size | |
| id | 2006119 |
| size | 107,018 |
Google Cloud Platform services integration for the Armature framework.
[dependencies]
armature-gcp = "0.1"
use armature_gcp::{StorageClient, FirestoreClient, PubSubClient};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Cloud Storage
let storage = StorageClient::new().await?;
storage.upload("bucket", "object", bytes).await?;
// Firestore
let firestore = FirestoreClient::new("project-id").await?;
firestore.set("collection", "doc", data).await?;
// Pub/Sub
let pubsub = PubSubClient::new("project-id").await?;
pubsub.publish("topic", message).await?;
Ok(())
}
Credentials are loaded from:
GOOGLE_APPLICATION_CREDENTIALS environment variableMIT OR Apache-2.0