[PR #455] [MERGED] Feat: Basic Client interface implementation #484

Closed
opened 2026-02-28 00:42:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/455
Author: @Tinyblargon
Created: 9/3/2025
Status: Merged
Merged: 9/4/2025
Merged by: @Tinyblargon

Base: masterHead: #454


📝 Commits (10+)

  • d46d8ac refactor: convert RawGuestResource to interface
  • d4fd62a refactor: convert RawConfigPool to interface
  • 12dcc89 refactor: convert RawConfigLXC to interface
  • 9fc9a62 refactor: convert RawConfigQemu to interface
  • 1bf6088 docs: explain raw config interface
  • e0b9803 feat: basic ClientNew implementation
  • 54975a9 docs: client interface
  • 782b748 fix: broken test
  • 1913df1 style: format as single line
  • 9299bad feat: add raw config mocks

📊 Changes

42 files changed (+1256 additions, -181 deletions)

View changed files

docs/assets/client-interface.drawio.svg (+81 -0)
📝 docs/style-guide/sdk.md (+67 -25)
📝 proxmox/client.go (+12 -0)
proxmox/client__api.go (+34 -0)
proxmox/client__api__mock.go (+38 -0)
proxmox/client__api__reusable.go (+160 -0)
proxmox/client__new.go (+30 -0)
proxmox/client__new__mock.go (+56 -0)
📝 proxmox/config__guest__resource.go (+56 -30)
proxmox/config__guest__resource__mock.go (+179 -0)
📝 proxmox/config__guest__resource_test.go (+28 -21)
📝 proxmox/config__lxc__cpu.go (+1 -1)
📝 proxmox/config__lxc__features.go (+2 -4)
📝 proxmox/config__lxc__features_test.go (+3 -2)
📝 proxmox/config__lxc__mount.go (+4 -8)
📝 proxmox/config__lxc__mount_test.go (+5 -3)
📝 proxmox/config__lxc__networks.go (+1 -1)
📝 proxmox/config__lxc__new.go (+56 -30)
proxmox/config__lxc__new__mock.go (+139 -0)
📝 proxmox/config__lxc__new_test.go (+6 -3)

...and 22 more files

📄 Description

Introduces the ClientNew interface.
Rewrites the raw config structs into interfaces to allow for mocking.

Start of #454


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/455 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 9/3/2025 **Status:** ✅ Merged **Merged:** 9/4/2025 **Merged by:** [@Tinyblargon](https://github.com/Tinyblargon) **Base:** `master` ← **Head:** `#454` --- ### 📝 Commits (10+) - [`d46d8ac`](https://github.com/Telmate/proxmox-api-go/commit/d46d8ace6df2558028ecbd8fd6ff7641ff73514b) refactor: convert `RawGuestResource` to interface - [`d4fd62a`](https://github.com/Telmate/proxmox-api-go/commit/d4fd62a9eb1fcd7d6b2754a73be827f83086a61d) refactor: convert `RawConfigPool` to interface - [`12dcc89`](https://github.com/Telmate/proxmox-api-go/commit/12dcc894c1f7f5c4c85cce2609f266bc52e78a54) refactor: convert `RawConfigLXC` to interface - [`9fc9a62`](https://github.com/Telmate/proxmox-api-go/commit/9fc9a62ad378bcbd9f2682e0f03aeacd76ffdf71) refactor: convert `RawConfigQemu` to interface - [`1bf6088`](https://github.com/Telmate/proxmox-api-go/commit/1bf6088e7fb366d16bf47a0eb86bf6aa3390c0d6) docs: explain raw config interface - [`e0b9803`](https://github.com/Telmate/proxmox-api-go/commit/e0b980349fde4821dfca1993070dc22cdfe4f658) feat: basic `ClientNew` implementation - [`54975a9`](https://github.com/Telmate/proxmox-api-go/commit/54975a9a8b2e39ea00188127e04d809547aee0b7) docs: client interface - [`782b748`](https://github.com/Telmate/proxmox-api-go/commit/782b7484b2f608ff8f5601fb129a457d0c4ff624) fix: broken test - [`1913df1`](https://github.com/Telmate/proxmox-api-go/commit/1913df155141e0b0a83fa9bbca9f50312708d82b) style: format as single line - [`9299bad`](https://github.com/Telmate/proxmox-api-go/commit/9299bad0d133d21a73159b2e81cb0c25122f052f) feat: add raw config mocks ### 📊 Changes **42 files changed** (+1256 additions, -181 deletions) <details> <summary>View changed files</summary> ➕ `docs/assets/client-interface.drawio.svg` (+81 -0) 📝 `docs/style-guide/sdk.md` (+67 -25) 📝 `proxmox/client.go` (+12 -0) ➕ `proxmox/client__api.go` (+34 -0) ➕ `proxmox/client__api__mock.go` (+38 -0) ➕ `proxmox/client__api__reusable.go` (+160 -0) ➕ `proxmox/client__new.go` (+30 -0) ➕ `proxmox/client__new__mock.go` (+56 -0) 📝 `proxmox/config__guest__resource.go` (+56 -30) ➕ `proxmox/config__guest__resource__mock.go` (+179 -0) 📝 `proxmox/config__guest__resource_test.go` (+28 -21) 📝 `proxmox/config__lxc__cpu.go` (+1 -1) 📝 `proxmox/config__lxc__features.go` (+2 -4) 📝 `proxmox/config__lxc__features_test.go` (+3 -2) 📝 `proxmox/config__lxc__mount.go` (+4 -8) 📝 `proxmox/config__lxc__mount_test.go` (+5 -3) 📝 `proxmox/config__lxc__networks.go` (+1 -1) 📝 `proxmox/config__lxc__new.go` (+56 -30) ➕ `proxmox/config__lxc__new__mock.go` (+139 -0) 📝 `proxmox/config__lxc__new_test.go` (+6 -3) _...and 22 more files_ </details> ### 📄 Description Introduces the `ClientNew` interface. Rewrites the raw config structs into interfaces to allow for mocking. Start of #454 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:42:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#484
No description provided.