[][src]Struct oss::OSSClient

pub struct OSSClient<'a> {
    pub endpoint: &'a str,
    pub access_key_id: &'a str,
    pub access_key_secret: &'a str,
}

OSSClient - Alibaba Cloud OSS Client

Reference URL: https://help.aliyun.com/document_detail/31952.html

Fields

endpoint: &'a straccess_key_id: &'a straccess_key_secret: &'a str

Methods

impl<'a> OSSClient<'a>[src]

pub fn new(
    endpoint: &'a str,
    access_key_id: &'a str,
    access_key_secret: &'a str
) -> OSSClient<'a>
[src]

New OSSClient

Use access_key_id and access_key_secret to create a OSSClient Consider support STS!

pub fn put_file(
    &self,
    bucket_name: &str,
    key: &str,
    expire_in_seconds: u64,
    file: File
) -> XResult<Response>
[src]

pub fn delete_file(&self, bucket_name: &str, key: &str) -> XResult<Response>[src]

pub fn get_file_content(
    &self,
    bucket_name: &str,
    key: &str
) -> XResult<Option<String>>
[src]

pub fn put_file_content(
    &self,
    bucket_name: &str,
    key: &str,
    content: &str
) -> XResult<Response>
[src]

pub fn generate_signed_put_url(
    &self,
    bucket_name: &str,
    key: &str,
    expire_in_seconds: u64
) -> String
[src]

pub fn generate_signed_get_url(
    &self,
    bucket_name: &str,
    key: &str,
    expire_in_seconds: u64
) -> String
[src]

pub fn generate_signed_delete_url(
    &self,
    bucket_name: &str,
    key: &str,
    expire_in_seconds: u64
) -> String
[src]

pub fn generate_signed_url(
    &self,
    verb: &str,
    bucket_name: &str,
    key: &str,
    expire_in_seconds: u64,
    is_https: bool
) -> String
[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for OSSClient<'a>

impl<'a> Send for OSSClient<'a>

impl<'a> Sync for OSSClient<'a>

impl<'a> Unpin for OSSClient<'a>

impl<'a> UnwindSafe for OSSClient<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err