[−][src]Struct oss::OSSClient
OSSClient - Alibaba Cloud OSS Client
Reference URL: https://help.aliyun.com/document_detail/31952.html
let oss_client = OSSClient::new("AK", "SK");
Implementations
impl OSSClient
[src]
OSS Client implemention
pub fn new(
endpoint: &str,
access_key_id: &str,
access_key_secret: &str
) -> OSSClient
[src]
endpoint: &str,
access_key_id: &str,
access_key_secret: &str
) -> OSSClient
New OSSClient
Use access_key_id and access_key_secret to create a OSSClient Consider support STS!
pub fn from_file(f: &str) -> XResult<Self>
[src]
New OSSClient from JSON file
pub fn from_json(json: &str) -> XResult<Self>
[src]
New OSSClient from JSON
JSON sample:
{
"endpoint": "",
"accessKeyId": "",
"accessKeySecret": ""
}
pub async fn put_file<'_, '_, '_>(
&'_ self,
bucket_name: &'_ str,
key: &'_ str,
expire_in_seconds: u64,
file: File
) -> XResult<Response>
[src]
&'_ self,
bucket_name: &'_ str,
key: &'_ str,
expire_in_seconds: u64,
file: File
) -> XResult<Response>
Put file will read full file content to memory and send with HTTP protocol
pub async fn delete_file<'_, '_, '_>(
&'_ self,
bucket_name: &'_ str,
key: &'_ str
) -> XResult<Response>
[src]
&'_ self,
bucket_name: &'_ str,
key: &'_ str
) -> XResult<Response>
pub async fn get_file_content<'_, '_, '_>(
&'_ self,
bucket_name: &'_ str,
key: &'_ str
) -> XResult<Option<String>>
[src]
&'_ self,
bucket_name: &'_ str,
key: &'_ str
) -> XResult<Option<String>>
pub async fn get_file_content_bytes<'_, '_, '_>(
&'_ self,
bucket_name: &'_ str,
key: &'_ str
) -> XResult<Option<Vec<u8>>>
[src]
&'_ self,
bucket_name: &'_ str,
key: &'_ str
) -> XResult<Option<Vec<u8>>>
pub async fn put_file_content<'_, '_, '_, '_>(
&'_ self,
bucket_name: &'_ str,
key: &'_ str,
content: &'_ str
) -> XResult<Response>
[src]
&'_ self,
bucket_name: &'_ str,
key: &'_ str,
content: &'_ str
) -> XResult<Response>
pub async fn put_file_content_bytes<'_, '_, '_>(
&'_ self,
bucket_name: &'_ str,
key: &'_ str,
content_bytes: Vec<u8>
) -> XResult<Response>
[src]
&'_ self,
bucket_name: &'_ str,
key: &'_ str,
content_bytes: Vec<u8>
) -> XResult<Response>
pub fn generate_signed_put_url(
&self,
bucket_name: &str,
key: &str,
expire_in_seconds: u64
) -> String
[src]
&self,
bucket_name: &str,
key: &str,
expire_in_seconds: u64
) -> String
pub fn generate_signed_get_url(
&self,
bucket_name: &str,
key: &str,
expire_in_seconds: u64
) -> String
[src]
&self,
bucket_name: &str,
key: &str,
expire_in_seconds: u64
) -> String
pub fn generate_signed_delete_url(
&self,
bucket_name: &str,
key: &str,
expire_in_seconds: u64
) -> String
[src]
&self,
bucket_name: &str,
key: &str,
expire_in_seconds: u64
) -> String
pub fn generate_signed_url(
&self,
verb: &str,
bucket_name: &str,
key: &str,
expire_in_seconds: u64,
is_https: bool
) -> String
[src]
&self,
verb: &str,
bucket_name: &str,
key: &str,
expire_in_seconds: u64,
is_https: bool
) -> String
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for OSSClient
impl Send for OSSClient
impl Sync for OSSClient
impl Unpin for OSSClient
impl UnwindSafe for OSSClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,