bisohns / waihona Goto Github PK
View Code? Open in Web Editor NEWRust crate for performing cloud storage CRUD actions across major cloud providers e.g aws
Home Page: https://crates.io/crates/waihona
License: MIT License
Rust crate for performing cloud storage CRUD actions across major cloud providers e.g aws
Home Page: https://crates.io/crates/waihona
License: MIT License
Instead of
trait Example<T>
where T: Debug {
fn example(&self) -> T
}
We can use associative types that look cleaner
trait Example {
type Item: Debug;
fn example(&self) -> Self::Item
}
Feels a lot cleaner and well defined
Implement features, where each cloud provider is a feature, this will prevent user from installing unnecessary libraries e.g installing gcp libraries when only aws is needed
Use aws wrapper as a guide
https://github.com/google-apis-rs/google-cloud-rs/blob/master/google-cloud/src/tests/storage.rs
https://docs.rs/google-storage1/2.0.4+20210330/google_storage1/api/struct.ObjectListCall.html
https://docs.rs/yup-oauth2/5.1.0/yup_oauth2/
https://doc.rust-lang.org/book/ch12-05-working-with-environment-variables.html
https://github.com/dermesser/async-google-apis/blob/master/example_crates/gcs_example/src/main.rs
let containers = self.client
.as_blob_service_client()
.list_containers()
.execute().await;
containers
.unwrap()
.incomplete_vector
.iter()
.find(|item| item.name == bucket_name)
.is_some()
might fail if containers > 5000 as incomplete_vector
will not be the full list of containers
let mut _token = None;
let mut _found = false;
loop {
let containers = self.client
.as_blob_service_client()
.list_containers()
// there should be a method in the list builder that we can pass token back to
.next_token(_token)
.execute().await;
let container_vec = containers.unwrap().incomplete_vector;
_found = container_vec.iter().any(|item| item.name == bucket_name);
if _found || container_vec.is_complete() {
break;
} else {
// obtain the token for the next batch of 5000
_token = container_vec.token().expect("").clone().to_owned();
}
};
_found
Documentation must explain a few key things
Examples for using the various api's e.g get_blob, copy_blob, read, e.t.c
Show import of various traits in order to be able to use trait methods
Show supported cloudproviders and their structs on readme
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.