pub async fn s3_settings(&self) -> anyhow::Result<S3Settings> {
        let endpoint = match self.remote_target.s3_endpoint() {
            Some(e) => e.to_string(),
            None => self.get_secret(keys::s3::ENDPOINT).await?,
        };

        let bucket = match self.remote_target.s3_bucket() {
            Some(b) => b.to_string(),
            None => self.get_secret(keys::s3::BUCKET).await?,
        };

        let access_key_id = self.get_secret(keys::s3::ACCESS_KEY).await?;

        let secret_access_key = self.get_secret(keys::s3::SECRET).await?;

        let disable_local = crate::env::env_bool(keys::s3::DISABLE);

        Ok(S3Settings {
            endpoint,
            bucket,
            use_client: self.remote_target != RemoteTarget::Local || !disable_local,
            access_key_id,
            secret_access_key,
        })
    }
/// Load the settings for s3.
Load the settings for s3.
Load the settings for s3 .
pub async fn s3_settings(&self) -> anyhow::Result<S3Settings> {
        let endpoint = match self.remote_target.s3_endpoint() {
            Some(e) => e.to_string(),
            None => self.get_secret(keys::s3::ENDPOINT).await?,
        };
        let bucket = match self.remote_target.s3_bucket() {
            Some(b) => b.to_string(),
            None => self.get_secret(keys::s3::BUCKET).await?,
        };
        let access_key_id = self.get_secret(keys::s3::ACCESS_KEY).await?;
        let secret_access_key = self.get_secret(keys::s3::SECRET).await?;
        let disable_local = crate::env::env_bool(keys::s3::DISABLE);
        Ok(S3Settings {
            endpoint,
            bucket,
            use_client: self.remote_target != RemoteTarget::Local || !disable_local,
            access_key_id,
            secret_access_key,
        })
    }
pub async fn s3_settings ( & self ) -> anyhow :: Result < S3Settings > { let endpoint = match self . remote_target . s3_endpoint ( ) { Some ( e ) => e . to_string ( ) , None => self . get_secret ( keys :: s3 :: ENDPOINT ) . await ? , } ; let bucket = match self . remote_target . s3_bucket ( ) { Some ( b ) => b . to_string ( ) , None => self . get_secret ( keys :: s3 :: BUCKET ) . await ? , } ; let access_key_id = self . get_secret ( keys :: s3 :: ACCESS_KEY ) . await ? ; let secret_access_key = self . get_secret ( keys :: s3 :: SECRET ) . await ? ; let disable_local = crate :: env :: env_bool ( keys :: s3 :: DISABLE ) ; Ok ( S3Settings { endpoint , bucket , use_client : self . remote_target != RemoteTarget :: Local || ! disable_local , access_key_id , secret_access_key , } ) }
Load the settings for s3.
Load the settings for s3 .
&self
&self