pub struct OssFileApi {
pub api: CrudApi,
}Expand description
OSS FILE API
Fields§
§api: CrudApiImplementations§
Source§impl OssFileApi
impl OssFileApi
Sourcepub async fn upload_file(
&self,
bucket: &str,
file_path: &str,
file_name: &str,
current_user_id: u64,
) -> Result<Ro<Value>, ApiError>
pub async fn upload_file( &self, bucket: &str, file_path: &str, file_name: &str, current_user_id: u64, ) -> Result<Ro<Value>, ApiError>
Sourcepub async fn upload_file_content(
&self,
bucket: &str,
file_name: &str,
data: Vec<u8>,
current_user_id: u64,
) -> Result<Ro<Value>, ApiError>
pub async fn upload_file_content( &self, bucket: &str, file_name: &str, data: Vec<u8>, current_user_id: u64, ) -> Result<Ro<Value>, ApiError>
Methods from Deref<Target = CrudApi>§
Sourcepub async fn get(
&self,
path: &str,
current_user_id: u64,
) -> Result<Ro<Value>, ApiError>
pub async fn get( &self, path: &str, current_user_id: u64, ) -> Result<Ro<Value>, ApiError>
执行GET请求的通用方法
Sourcepub async fn get_bytes(
&self,
path: &str,
current_user_id: u64,
) -> Result<Vec<u8>, ApiError>
pub async fn get_bytes( &self, path: &str, current_user_id: u64, ) -> Result<Vec<u8>, ApiError>
执行GET请求的通用方法,返回bytes
Sourcepub async fn post<B>(
&self,
path: &str,
body: &B,
current_user_id: u64,
) -> Result<Ro<Value>, ApiError>
pub async fn post<B>( &self, path: &str, body: &B, current_user_id: u64, ) -> Result<Ro<Value>, ApiError>
执行POST请求的通用方法
Sourcepub async fn put<B>(
&self,
path: &str,
body: &B,
current_user_id: u64,
) -> Result<Ro<Value>, ApiError>
pub async fn put<B>( &self, path: &str, body: &B, current_user_id: u64, ) -> Result<Ro<Value>, ApiError>
执行PUT请求的通用方法
Trait Implementations§
Source§impl Debug for OssFileApi
impl Debug for OssFileApi
Source§impl Deref for OssFileApi
impl Deref for OssFileApi
Auto Trait Implementations§
impl Freeze for OssFileApi
impl RefUnwindSafe for OssFileApi
impl Send for OssFileApi
impl Sync for OssFileApi
impl Unpin for OssFileApi
impl UnwindSafe for OssFileApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more