Skip to main content

Crate ugos_client

Crate ugos_client 

Source
Expand description

UGOS NAS API client library.

Provides typed access to the UGREEN NAS (UGOS) REST API, including authentication (RSA + session tokens) and all service modules (KVM, storage, network, etc.).

§Quick start

use ugos_client::{UgosClient, Credentials};
use ugos_client::api::kvm::KvmApi;

let creds = Credentials {
    username: "admin".into(),
    password: "secret".into(),
};
let tls = ugos_client::TlsPolicy::Pinned(
    ugos_client::tls::probe_fingerprint("192.168.1.10", 9443).await?,
);
let client = UgosClient::connect("192.168.1.10", 9443, creds, &tls).await?;
let vms = client.vm_list().await?;

Re-exports§

pub use auth::Credentials;
pub use auth::Session;
pub use client::UgosClient;
pub use tls::CertFingerprint;
pub use tls::TlsPolicy;

Modules§

api
API modules for UGOS services.
auth
Authentication flow for the UGOS API.
client
Core HTTP client for the UGOS API.
crypto
Request encryption for the endpoints that require it.
error
Error types for the UGOS client library.
tls
Certificate pinning on first use.
types
Shared and domain-specific types for UGOS API responses.