2 个版本
0.0.4 | 2024年7月1日 |
---|---|
0.0.3 | 2024年6月24日 |
0.0.2 |
|
0.0.1 |
|
0.0.0 |
|
#5 in #aliyun
43KB
863 代码行数(不含注释)
AliOss
用法
let oss_client = crate::Client::from_env()?;
let buckets = oss_client.list_buckets().await?;
println!("buckets: {:?}", buckets);
环境配置
ALI_OSS_ACCESS_KEY_ID=xxx
ALI_OSS_ACCESS_KEY_SECRET=xxx
ALI_OSS_BUCKET=xxx
ALI_OSS_LOCATION=oss-cn-hangzhou
ALI_OSS_PATH=/
ALI_OSS_INTERNAL=false
方法
-
list_buckets()
-
put_bucket()
-
get_bucket_info()
-
get_bucket_location()
-
get_bucket_stat()
-
delete_bucket()
-
list_objects(prefix, delimiter)
-
put_object(object_name, byptes)
-
put_object_stream(object_name, stream)
-
get_object(object_name)
-
delete_object(object_name)
-
copy_object(dest_object_name, source_object_name)
-
append_object(object_name, byptes, position)
-
head_object(object_name)
-
get_object_meta(object_name)
-
is_object_exist(object_name)
-
sign_object(object_name, duration_time)
-
put_symlink(symlink_object_name, target_object_name)
-
get_symlink(symlink_object_name)
依赖
~10–21MB
~409K SLoC