@@ -32,50 +32,6 @@ const DROPBOX_RESULT_STORAGE_PROVIDER: &str = "dropbox";
3232/// The trait methods represent the main stages of the result processing workflow:
3333/// validation, compression, and upload. Each method can be used independently or
3434/// as part of the complete workflow provided by [`Web2ResultInterface::encrypt_and_upload_result`].
35- ///
36- ///
37- /// # Example Implementation
38- ///
39- /// ```rust
40- /// use tee_worker_post_compute::compute::{
41- /// web2_result::Web2ResultInterface,
42- /// computed_file::ComputedFile,
43- /// errors::ReplicateStatusCause,
44- /// };
45- ///
46- /// struct MockResultService;
47- ///
48- /// impl Web2ResultInterface for MockResultService {
49- /// fn encrypt_and_upload_result(&self, computed_file: &ComputedFile) -> Result<(), ReplicateStatusCause> {
50- /// // Mock implementation for testing
51- /// Ok(())
52- /// }
53- /// fn check_result_files_name(&self, task_id: &str, iexec_out_path: &str) -> Result<(), ReplicateStatusCause> {
54- /// // Mock implementation for testing
55- /// Ok(())
56- /// }
57- /// fn zip_iexec_out(&self, iexec_out_path: &str, save_in: &str) -> Result<String, ReplicateStatusCause> {
58- /// // Mock implementation for testing
59- /// Ok(String::from("/iexec_out.zip"))
60- /// }
61- /// fn eventually_encrypt_result(&self, in_data_file_path: &str) -> Result<String, ReplicateStatusCause> {
62- /// // Mock implementation for testing
63- /// Ok(String::from("/iexec_out/result.txt"))
64- /// }
65- /// fn upload_result(&self, computed_file: &ComputedFile, file_to_upload_path: &str) -> Result<String, ReplicateStatusCause> {
66- /// // Mock implementation for testing
67- /// Ok(String::from("https://ipfs.io/ipfs/Qm..."))
68- /// }
69- /// fn upload_to_ipfs_with_iexec_proxy(&self, computed_file: &ComputedFile, base_url: &str, token: &str, file_to_upload_path: &str) -> Result<String, ReplicateStatusCause> {
70- /// // Mock implementation for testing
71- /// Ok(String::from("https://ipfs.io/ipfs/Qm..."))
72- /// }
73- /// fn upload_to_dropbox(&self, computed_file: &ComputedFile, token: &str, file_to_upload_path: &str) -> Result<String, ReplicateStatusCause> {
74- /// // Mock implementation for testing
75- /// Ok(String::from("https://dropbox.com/results/0x123.zip"))
76- /// }
77- /// }
78- /// ```
7935#[ cfg_attr( test, automock) ]
8036pub trait Web2ResultInterface {
8137 fn encrypt_and_upload_result (
@@ -434,12 +390,11 @@ impl Web2ResultInterface for Web2ResultService {
434390 /// # Example
435391 ///
436392 /// ```rust
437- /// use tee_worker_post_compute::compute::{
438- /// web2_result::{Web2ResultInterface, Web2ResultService},
439- /// utils::env_utils::{TeeSessionEnvironmentVariable, get_env_var_or_error},
440- /// };
441393 /// use std::env;
442- /// use base64::{engine::general_purpose, Engine as _};
394+ /// use tee_worker_post_compute::compute::web2_result::{
395+ /// Web2ResultInterface,
396+ /// Web2ResultService
397+ /// };
443398 ///
444399 /// // Set environment variables for encryption
445400 /// unsafe {
0 commit comments