MCPcopy Create free account
hub / github.com/BitVM/BitVM / DataStoreDriver

Interface DataStoreDriver

bridge/src/client/data_store/base.rs:4–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3#[async_trait]
4pub trait DataStoreDriver {
5 async fn list_objects(&self, file_path: Option<&str>) -> Result<Vec<String>, String>;
6 async fn fetch_object(
7 &self,
8 file_name: &str,
9 file_path: Option<&str>,
10 ) -> Result<String, String>;
11 async fn upload_object(
12 &self,
13 file_name: &str,
14 contents: &str,
15 file_path: Option<&str>,
16 ) -> Result<usize, String>;
17 async fn fetch_compressed_object(
18 &self,
19 file_name: &str,
20 file_path: Option<&str>,
21 ) -> Result<(Vec<u8>, usize), String>;
22 async fn upload_compressed_object(
23 &self,
24 file_name: &str,
25 contents: &Vec<u8>,
26 file_path: Option<&str>,
27 ) -> Result<usize, String>;
28}

Callers

nothing calls this directly

Implementers 5

sftp.rsbridge/src/client/data_store/sftp.rs
aws_s3.rsbridge/src/client/data_store/aws_s3.rs
local_file.rsbridge/src/client/data_store/local_fil
ftp.rsbridge/src/client/data_store/ftp/ftp.r
ftps.rsbridge/src/client/data_store/ftp/ftps.

Calls

no outgoing calls

Tested by

no test coverage detected