dtz

Crates.iodtz
lib.rsdtz
version0.3.9
sourcesrc
created_at2024-03-13 13:43:00.362372
updated_at2024-05-10 19:25:06.157409
descriptionA base crate for the DownToZero Cloud API
homepage
repositoryhttps://github.com/DownToZero-Cloud/dtz-sdk-for-rust
max_upload_size
id1171691
size4,799
Jens Walter (JensWalter)

documentation

https://docs.rs/dtz

README

DownToZero Client API

Latest Version

A base crate for the DownToZero Cloud API

Exposed functionality

The dtz-crate only exposes the dtz-config crate which covers the API client and authentication requirments.

All service specific functionality is exposed through features.

Features

  • containers
  • core
  • identity
  • full (contains all features at once)
  • objectstore
  • observability
  • rss2mail

Examples

Retrieving the current Context.

[dependencies]
tokio = { version = "1", features = ["full] }
dtz = { version = "*", features = ["core"] }
#[tokio::main]
use std::str::FromStr;
use uuid::Uuid;

async fn main() {
    let config = dtz::Configuration {
        api_key: Some("some api key".to_string()),
        ..Default::default()
    };
    let ctx_id = "00000000-0000-0000-0000-000000000000";
    let result = dtz::core::apis::default_api::get_context(&config, ctx_id)
        .await
        .unwrap();
    println!("result: {result:?}");
}
Commit count: 125

cargo fmt