[PR #533] [MERGED] New Interface (User & ApiToken) #533

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/533
Author: @Tinyblargon
Created: 12/26/2025
Status: Merged
Merged: 12/26/2025
Merged by: @Tinyblargon

Base: masterHead: #483


📝 Commits (10+)

  • 1d03f89 feat: API mocking server
  • 66a9e52 feat: wrap errors for debugging
  • 6a19512 test: improve mockServer
  • b88cb44 feat: ApiToken
  • 3909a36 feat: improved retry mechanism
  • a7c06f3 feat: custom string escape encoder
  • af04616 feat: ApiTOken integration tests and fixes
  • ad18bb7 refactor: make reusable for user list
  • 5df9119 feat: New interface for User
  • 22acd4e feat: New client interface

📊 Changes

75 files changed (+5310 additions, -1091 deletions)

View changed files

📝 Makefile (+9 -1)
📝 cli/cobra.go (+3 -1)
cli/command/create/create-token.go (+35 -0)
cli/command/delete/delete-token.go (+16 -0)
📝 cli/command/delete/delete.go (+9 -4)
cli/command/get/get-token.go (+18 -0)
📝 cli/command/get/get.go (+14 -4)
cli/command/list/list-tokens.go (+40 -0)
📝 cli/command/list/list-userpermissions.go (+4 -5)
📝 cli/command/list/list-users.go (+12 -3)
📝 cli/command/member/group/add-users.go (+3 -3)
📝 cli/command/member/group/remove-users.go (+3 -3)
📝 cli/command/member/group/set-users.go (+3 -3)
📝 cli/command/set/set-group.go (+3 -3)
📝 cli/command/set/set-user.go (+16 -16)
cli/command/update/update-token.go (+35 -0)
cli/helpers/parseUserID.go (+22 -0)
internal/body/escape.go (+31 -0)
internal/body/net_url.go (+83 -0)
internal/body/net_url_test.go (+134 -0)

...and 55 more files

📄 Description

Related to #483

  • Add a new interface for User & ApiToken.
  • Added a new testing framework for mocking API calls.
  • Removed the escape hatch for exiting a retry call.
  • Re-implemented retry mechanics as we where never handling API errors correctly.
  • Removed layers of abstraction as building the body of the API call had to go through 3 layers of abstraction.
  • Re-worked integration test for User & ApiToken.

🔄 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/533 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 12/26/2025 **Status:** ✅ Merged **Merged:** 12/26/2025 **Merged by:** [@Tinyblargon](https://github.com/Tinyblargon) **Base:** `master` ← **Head:** `#483` --- ### 📝 Commits (10+) - [`1d03f89`](https://github.com/Telmate/proxmox-api-go/commit/1d03f8918304b6b6915d9004b09c10cbc340d4c1) feat: API mocking server - [`66a9e52`](https://github.com/Telmate/proxmox-api-go/commit/66a9e52b97a1783bf1ca615b43b79b02f83006ae) feat: wrap errors for debugging - [`6a19512`](https://github.com/Telmate/proxmox-api-go/commit/6a1951255e704bc1ab04750120e1d08f400f8d49) test: improve mockServer - [`b88cb44`](https://github.com/Telmate/proxmox-api-go/commit/b88cb44c4f63f920c1026a22e6a21528e6df627c) feat: ApiToken - [`3909a36`](https://github.com/Telmate/proxmox-api-go/commit/3909a36ee578949c380c0bd7d824ee78a927f299) feat: improved retry mechanism - [`a7c06f3`](https://github.com/Telmate/proxmox-api-go/commit/a7c06f3a7b045e35e17743c943fdd59e791b7496) feat: custom string escape encoder - [`af04616`](https://github.com/Telmate/proxmox-api-go/commit/af04616f4d0d260e3b28d02052853267738c63c9) feat: ApiTOken integration tests and fixes - [`ad18bb7`](https://github.com/Telmate/proxmox-api-go/commit/ad18bb7cd6789db47146d68662fed6b5424dde1a) refactor: make reusable for user list - [`5df9119`](https://github.com/Telmate/proxmox-api-go/commit/5df911998740a4a17e2ef01ab56be64ec34b327f) feat: New interface for User - [`22acd4e`](https://github.com/Telmate/proxmox-api-go/commit/22acd4ed4e0475825bcaf751eb720fbb09cd065b) feat: New client interface ### 📊 Changes **75 files changed** (+5310 additions, -1091 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+9 -1) 📝 `cli/cobra.go` (+3 -1) ➕ `cli/command/create/create-token.go` (+35 -0) ➕ `cli/command/delete/delete-token.go` (+16 -0) 📝 `cli/command/delete/delete.go` (+9 -4) ➕ `cli/command/get/get-token.go` (+18 -0) 📝 `cli/command/get/get.go` (+14 -4) ➕ `cli/command/list/list-tokens.go` (+40 -0) 📝 `cli/command/list/list-userpermissions.go` (+4 -5) 📝 `cli/command/list/list-users.go` (+12 -3) 📝 `cli/command/member/group/add-users.go` (+3 -3) 📝 `cli/command/member/group/remove-users.go` (+3 -3) 📝 `cli/command/member/group/set-users.go` (+3 -3) 📝 `cli/command/set/set-group.go` (+3 -3) 📝 `cli/command/set/set-user.go` (+16 -16) ➕ `cli/command/update/update-token.go` (+35 -0) ➕ `cli/helpers/parseUserID.go` (+22 -0) ➕ `internal/body/escape.go` (+31 -0) ➕ `internal/body/net_url.go` (+83 -0) ➕ `internal/body/net_url_test.go` (+134 -0) _...and 55 more files_ </details> ### 📄 Description Related to #483 - Add a new interface for User & ApiToken. - Added a new testing framework for mocking API calls. - Removed the escape hatch for exiting a retry call. - Re-implemented retry mechanics as we where never handling API errors correctly. - Removed layers of abstraction as building the body of the API call had to go through 3 layers of abstraction. - Re-worked integration test for User & ApiToken. --- <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:33 +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#533
No description provided.