aiven_rs

Crates.ioaiven_rs
lib.rsaiven_rs
version0.4.1
sourcesrc
created_at2020-04-17 19:02:34.814956
updated_at2021-01-11 03:25:37.670854
descriptionThis is a rust sdk to interact with aiven-cloud apis.
homepagehttps://github.com/ansrivas/aiven-rs
repositoryhttps://github.com/ansrivas/aiven-rs
max_upload_size
id231278
size484,687
Ankur Srivastava (ansrivas)

documentation

https://docs.rs/aiven-rs

README

aiven-rs

An async rust-sdk for Aiven

rust aiven

Linux Crates.io Docs.rs codecov


Resources

Getting Started

// tokio = "1.0"
// aiven_rs = "0.4.0"

use aiven_rs::{cloud::types::ResClouds, AivenClient};

#[tokio::main]
async fn main() {
  env_logger::init();
  // use std::env;
  //
  // let token = env::var("AIVEN_TOKEN").expect("Please set env variable to read AIVEN_TOKEN");
  // let client = AivenClient::from_token("https://api.aiven.io", "v1", &token);

  let client = AivenClient::new("https://api.aiven.io", "v1");
  let cloud_api = client.cloud();
  let output: ResClouds = cloud_api.list_all().await.unwrap();
  for cloud in &output.clouds {
    println!("{:?}", cloud.cloud_name);
  }
}

Running the examples:

RUST_LOG=aiven_rs=debug cargo run --example clouds

License

This project is licensed under

Commit count: 85

cargo fmt