llm_shield_cloud_gcp/
storage_stub.rs

1//! Stub implementation for GCP Cloud Storage.
2//!
3//! NOTE: This is a temporary stub due to breaking changes in google-cloud SDK.
4//! Full implementation requires updating to the latest SDK APIs.
5
6use async_trait::async_trait;
7use llm_shield_cloud::error::{CloudError, Result};
8use llm_shield_cloud::storage::{CloudStorage, GetObjectOptions, ObjectMetadata, PutObjectOptions};
9
10/// Stub implementation for GCP Cloud Storage.
11pub struct GcpCloudStorage;
12
13impl GcpCloudStorage {
14    /// Creates a new GCP Cloud Storage client (stub).
15    pub async fn new(_bucket: impl Into<String>) -> Result<Self> {
16        Ok(Self)
17    }
18}
19
20#[async_trait]
21impl CloudStorage for GcpCloudStorage {
22    async fn get_object(&self, _key: &str) -> Result<Vec<u8>> {
23        Err(CloudError::OperationFailed(
24            "GCP Cloud Storage not implemented - SDK API breaking changes".to_string(),
25        ))
26    }
27
28    async fn put_object(&self, _key: &str, _data: &[u8]) -> Result<()> {
29        Err(CloudError::OperationFailed(
30            "GCP Cloud Storage not implemented - SDK API breaking changes".to_string(),
31        ))
32    }
33
34    async fn delete_object(&self, _key: &str) -> Result<()> {
35        Err(CloudError::OperationFailed(
36            "GCP Cloud Storage not implemented - SDK API breaking changes".to_string(),
37        ))
38    }
39
40    async fn list_objects(&self, _prefix: &str) -> Result<Vec<String>> {
41        Err(CloudError::OperationFailed(
42            "GCP Cloud Storage not implemented - SDK API breaking changes".to_string(),
43        ))
44    }
45
46    async fn get_object_metadata(&self, _key: &str) -> Result<ObjectMetadata> {
47        Err(CloudError::OperationFailed(
48            "GCP Cloud Storage not implemented - SDK API breaking changes".to_string(),
49        ))
50    }
51
52    fn provider_name(&self) -> &str {
53        "gcs"
54    }
55}