{"id":50822469,"url":"https://github.com/client-api/pmg-rust","last_synced_at":"2026-06-13T15:04:11.519Z","repository":{"id":359814728,"uuid":"1247559889","full_name":"client-api/pmg-rust","owner":"client-api","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T15:08:28.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T16:28:15.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/client-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T13:31:58.000Z","updated_at":"2026-05-23T15:08:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/client-api/pmg-rust","commit_stats":null,"previous_names":["client-api/pmg-rust"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/client-api/pmg-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/client-api","download_url":"https://codeload.github.com/client-api/pmg-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34288669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T15:04:08.839Z","updated_at":"2026-06-13T15:04:11.511Z","avatar_url":"https://github.com/client-api.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pmg-rust\n\nRust SDK for the Proxmox Mail Gateway API. Generated\nfrom the upstream `apidoc.js` from Proxmox Mail Gateway via [openapi-generator-cli][gen] with\ncustom Mustache template overrides.\n\n\u003e **Not an official Proxmox project.** Community SDK derived from the\n\u003e upstream `apidoc.js`. Always verify against the upstream API viewer.\n\u003e \u003chttps://pmg.proxmox.com/\u003e.\n\nTargets `reqwest` + `serde`. Requires Rust ≥ 1.75 (2021 edition).\n\n## Install\n\nPublished to [crates.io](https://crates.io/crates/clientapi-pmg) on\nevery GitHub release:\n\n```bash\ncargo add clientapi-pmg\n```\n\nOr pin the version explicitly:\n\n```toml\n# Cargo.toml\n[dependencies]\nclientapi-pmg = \"*\"\n```\n\nThe import path is the snake_case form of the crate name, e.g.\n`use clientapi_pve::apis::nodes_api;`.\n\n## Usage\n\nThe Rust SDK uses module-level functions per tag — there's no Client\nstruct facade because Rust modules don't bind to method receivers.\nInstead, hold a `Configuration` and pass it into each call:\n\n```rust\nuse clientapi_pmg::apis::{configuration::Configuration, qemu_api, nodes_api};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let mut cfg = Configuration::new();\n    cfg.base_path = \"https://pmg1.example.com:8006/api2/json\".into();\n    cfg.api_key = Some(clientapi_pmg::apis::configuration::ApiKey {\n        prefix: None,\n        key: \"PMGAPIToken=user@realm!tokenid=uuid-secret\".into(),\n    });\n\n    let status = qemu_api::qemu_vm_status(\u0026cfg, \"pmg1\", 100).await?;\n    let nodes  = nodes_api::nodes_get_nodes(\u0026cfg).await?;\n    println!(\"{:?}\", status);\n    Ok(())\n}\n```\n\n## Compound configs\n\nPVE encodes many fields as CLI-style shorthand strings\n(`net0=virtio,bridge=vmbr0,firewall=1`). Round-trip helpers are\nemitted for every compound config schema:\n\n```rust\nuse clientapi_pmg::models::PveQemuNetConfig;\n\nlet cfg = PveQemuNetConfig {\n    model: \"virtio\".into(),\n    bridge: Some(\"vmbr0\".into()),\n    firewall: Some(\"1\".into()),\n    ..Default::default()\n};\nlet shorthand = cfg.to_shorthand();\n// → \"virtio,bridge=vmbr0,firewall=1\"\n```\n\n## Indexed families\n\nNumbered properties (`net0..net31`, `mp0..mp255`, …) are exposed on\nevery model as a single `Option\u003cHashMap\u003cu32, ItemType\u003e\u003e` field with\nmanual `Serialize`/`Deserialize` impls that round-trip the prefixed\nwire keys:\n\n```rust\nuse std::collections::HashMap;\n\nlet mut nets: HashMap\u003cu32, models::PveQemuNetField\u003e = HashMap::new();\nnets.insert(0, models::PveQemuNetField::default());\nnets.insert(3, models::PveQemuNetField::default());\n\nlet req = QemuCreateVmRequest {\n    nets: Some(nets),\n    ..Default::default()\n};\n// Wire format: { \"net0\": ..., \"net3\": ... }\n```\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE).\n\n[gen]: https://openapi-generator.tech\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclient-api%2Fpmg-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-rust/lists"}