cleanup types

This commit is contained in:
2026-04-04 23:37:49 +00:00
parent 3e3723a208
commit a9b0763c36

View File

@@ -18,8 +18,10 @@ type Pool struct {
Path string `json:"-"` // typically /pool/poolid from proxmox, only used internally
Groups []Group `json:"groups"`
Resources map[string]any `json:"resources"`
Cluster Cluster `json:"cluster"`
Templates Templates `json:"templates"`
AllowedNodes map[string]bool `json:"nodes-allowed"`
VMIDRange VMID `json:"vmid-allowed"`
Backups Backups `json:"backups-allowed"` // measured in numbers
}
// proxmox typically formats as gid-realm for non pve realms
@@ -32,8 +34,7 @@ type Groupname struct {
type Group struct {
Groupname Groupname `json:"groupname"`
Handler string `json:"-"`
Role string `json:"role"`
Role string `json:"role"` // role in owner pool
Users []User `json:"users"`
}
@@ -44,20 +45,12 @@ type Username struct { // ie userid@realm
type User struct {
Username Username `json:"username"`
Handler string `json:"-"`
CN string `json:"cn"` // aka first name
SN string `json:"sn"` // aka last name
Mail string `json:"mail"`
Password string `json:"password"` // only used for POST requests
}
type Cluster struct {
Nodes map[string]bool `json:"nodes"`
VMID VMID `json:"vmid"`
//Pools map[string]bool `json:"pools"`
Backups Backups `json:"backups"`
}
type VMID struct {
Min int `json:"min"`
MAx int `json:"max"`