Expand description
本包提供腾讯云对象存储(cos)基本接口封装.
基本用法:
use std::path::PathBuf;
use qcos::client::Client;
use mime;
#[tokio::main]
async fn main() {
let client = Client::new("secrect-id", "secrect-key", "qcloudtest-xxx", "ap-guangzhou");
/// 上传文件
let res = client.put_object(&PathBuf::from("Cargo.toml"), "Cargo.toml", Some(mime::TEXT_PLAIN_UTF_8), None).await;
/// 删除文件
let res = client.delete_object("Cargo.toml").await;
}
Modules§
- acl
- 访问控制列表(ACL)
- bucket
- bucket相关接口 方法见
crate::client::Client
#impl-Client - client
- 接口客户端,所有的操作都基于该对象
- objects
- object操作相关 方法见
crate::client::Client
#impl-Client-2 - request
- 请求封装
- service
- 查询bucket列表 方法见
crate::client::Client
#impl-Client-3 - signer
- 接口签名