1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Rust SDK for the mountOS provider API.
//!
//! Wraps the appserv provider API (`/api/v1/*`) with ED25519 JWT authentication.
//! Construct a [`Client`] from a [`Config`] and call typed methods grouped by
//! resource, e.g. `client.accounts.list(..)`.
//!
//! ```no_run
//! use mountos_admin_sdk::{Client, Config};
//!
//! # async fn run() -> Result<(), mountos_admin_sdk::Error> {
//! let client = Client::new(Config {
//! base_url: "https://appserv.example.com".into(),
//! private_key: "<base64 ED25519 key>".into(),
//! ..Default::default()
//! })?;
//!
//! let account = client.accounts.get(1).await?;
//! println!("{}", account.name);
//! # Ok(())
//! # }
//! ```
//!
//! The `private_key` is a base64-encoded ED25519 key - either a 32-byte seed or
//! a 64-byte seed+public-key. JWT tokens are signed locally and cached for ~55
//! minutes (1h TTL with a 5-minute refresh margin).
pub use *;
pub use sign_dashboard_user;
pub use Error;
pub use *;
pub use *;
// Re-exported so callers can build `serde_json::Value` fields (e.g.
// `provider_info`) without taking their own version-matched dependency.
pub use serde_json;