S3handler
A s3 handler library for s3rs and nu-shell s3 plugin Here is the document.
Blocking API is ready
use s3handler = { features = ["blocking"] }
let config = CredentialConfig;
let mut handler = from;
let _ = handler.la;
Async API
Basic CRUD is implemented, other advance features are under developing. use s3handler = { features = ["tokio"] }
Download a file with async api use s3handler = { features = ["tokio-async"] }
// Public resource
let s3_pool = new;
let obj = s3_pool.bucket.object;
async ;
S3 async handler to manipulate objects and buckets. This treat all data as pool and create a canal to bridge two pool. It is easy to management and sync data from folder to S3, S3 to S3, event folder to folder.
+------+
| Pool | (UpPool) modify by `from_*` api
+------+
| ^
Pull | | Push
v |
+------+
| Pool | (DownPool) modify by `toward_*` api
+------+
use DataPool;
// Resource with AWS version 2 auth
let s3_pool = new
.aws_v2;
let bucket = s3_pool.bucket;
// Actually the bucket is a unconnnected canal
assert!;
let canal = bucket.toward.unwrap;
// The canal bridges the two folder and ready to transfer data between bucket and folder
assert!;
canal.sync.await;
let s3_pool = new.aws_v4;
let mut object_list = s3_pool
.bucket
.list
.await
.unwrap;
let obj = object_list.next_object.await.unwrap;