Struct unftp_sbe_gcs::CloudStorage
source · pub struct CloudStorage { /* private fields */ }
Expand description
A StorageBackend
that uses Cloud storage from Google.
cloned for each controlchan!
Implementations§
source§impl CloudStorage
impl CloudStorage
sourcepub fn new<Str, AuthHow>(bucket: Str, auth: AuthHow) -> Selfwhere
Str: Into<String>,
AuthHow: Into<AuthMethod>,
pub fn new<Str, AuthHow>(bucket: Str, auth: AuthHow) -> Selfwhere
Str: Into<String>,
AuthHow: Into<AuthMethod>,
Creates a new Google Cloud Storage backend connected to the specified GCS bucket
. The auth
parameter specifies how libunftp will authenticate with GCS.
sourcepub fn with_bucket_root<Str, AuthHow>(
bucket: Str,
root: PathBuf,
auth: AuthHow
) -> Selfwhere
Str: Into<String>,
AuthHow: Into<AuthMethod>,
pub fn with_bucket_root<Str, AuthHow>(
bucket: Str,
root: PathBuf,
auth: AuthHow
) -> Selfwhere
Str: Into<String>,
AuthHow: Into<AuthMethod>,
Creates a new Google Cloud Storage backend connected to the specified GCS bucket
. The auth
parameter specifies how libunftp will authenticate with GCS. Files will be placed and
looked for in the specified root
directory/prefix inside the bucket.
sourcepub fn with_api_base<Str, AuthHow>(
base_url: Str,
bucket: Str,
root: PathBuf,
auth: AuthHow
) -> Selfwhere
Str: Into<String>,
AuthHow: Into<AuthMethod>,
pub fn with_api_base<Str, AuthHow>(
base_url: Str,
bucket: Str,
root: PathBuf,
auth: AuthHow
) -> Selfwhere
Str: Into<String>,
AuthHow: Into<AuthMethod>,
Creates a new Google Cloud Storage backend connected to the specified GCS bucket
using GCS API
base_url
for JSON API requests. Files will be placed and looked for in the specified
root
directory inside the bucket. The auth
parameter specifies how libunftp will
authenticate.
Trait Implementations§
source§impl Clone for CloudStorage
impl Clone for CloudStorage
source§fn clone(&self) -> CloudStorage
fn clone(&self) -> CloudStorage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CloudStorage
impl Debug for CloudStorage
source§impl<User: UserDetail> StorageBackend<User> for CloudStorage
impl<User: UserDetail> StorageBackend<User> for CloudStorage
§type Metadata = ObjectMetadata
type Metadata = ObjectMetadata
source§fn supported_features(&self) -> u32
fn supported_features(&self) -> u32
source§fn metadata<'life0, 'life1, 'async_trait, P>(
&'life0 self,
_user: &'life1 User,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::Metadata, Error>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send + Debug,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn metadata<'life0, 'life1, 'async_trait, P>(
&'life0 self,
_user: &'life1 User,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::Metadata, Error>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send + Debug,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Metadata
for the given file.