mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-26 07:55:50 +03:00
[GH-ISSUE #483] Public Interafce redesing #129
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tinyblargon on GitHub (Oct 18, 2025).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/483
Currently we have a lot of public functions, lots of them are functions on types.
But in my opinion we don't have consistent way to interact with any of those functions.
My proposal is to introduce the following structure. Everything flows out of the
Client, we have sub categories likeGuestandQemuGuest, which then have functions to interact with the API.@NemoDacremont commented on GitHub (Oct 19, 2025):
I think this is an interesting way of dividing things that could work well, however I have a few concerns with it.
First, instead of passing the client in every function like now, we'll pass the config of every element, I wonder how much we're gaining on that side.
Second is, I feel like this is a quite big refactor and would be time-consuming. I feel like this isn't worth the investment right now and there are more important things to do
I don't really like testing my projects, but I think this is important in the case of an SDK, especially since it seems there are issues with proxmox v9 (like in terraform provider issues). This is why I think fixing the different tests is more important, and I'll try to continue helping with it.
I also think it would be good to move all the features from the legacy CLI to the new one, and make the new one the default (and maybe remove the legacy code?). I think the current state of the CLI is quite confusing, and I really prefer the new one.
I hope I didn't sound rude, I just wanted to share my thoughts with your proposal
Also, I don't want to create too many PR at the same time to avoid overwhelming you with reviews, would you prefer that I mention you when I would like your feedback ?
@Tinyblargon commented on GitHub (Oct 19, 2025):
@NemoDacremont My biggest concert currently is that it's really difficult for a new user to figure out what to call. Some things are normal functions, some are part of struct, some of an alias type. There isn't a good way to discover the project through your IDEs auto completion.
Might be better to do this at a later time tho, when more behaviors are defined.
Also all the small PRs are preferred, if something holds up one PR there isn't a lot of code waiting and gaining merge conflicts.