cleanup types
This commit is contained in:
@@ -18,8 +18,10 @@ type Pool struct {
|
|||||||
Path string `json:"-"` // typically /pool/poolid from proxmox, only used internally
|
Path string `json:"-"` // typically /pool/poolid from proxmox, only used internally
|
||||||
Groups []Group `json:"groups"`
|
Groups []Group `json:"groups"`
|
||||||
Resources map[string]any `json:"resources"`
|
Resources map[string]any `json:"resources"`
|
||||||
Cluster Cluster `json:"cluster"`
|
|
||||||
Templates Templates `json:"templates"`
|
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
|
// proxmox typically formats as gid-realm for non pve realms
|
||||||
@@ -32,8 +34,7 @@ type Groupname struct {
|
|||||||
|
|
||||||
type Group struct {
|
type Group struct {
|
||||||
Groupname Groupname `json:"groupname"`
|
Groupname Groupname `json:"groupname"`
|
||||||
Handler string `json:"-"`
|
Role string `json:"role"` // role in owner pool
|
||||||
Role string `json:"role"`
|
|
||||||
Users []User `json:"users"`
|
Users []User `json:"users"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,20 +45,12 @@ type Username struct { // ie userid@realm
|
|||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
Username Username `json:"username"`
|
Username Username `json:"username"`
|
||||||
Handler string `json:"-"`
|
|
||||||
CN string `json:"cn"` // aka first name
|
CN string `json:"cn"` // aka first name
|
||||||
SN string `json:"sn"` // aka last name
|
SN string `json:"sn"` // aka last name
|
||||||
Mail string `json:"mail"`
|
Mail string `json:"mail"`
|
||||||
Password string `json:"password"` // only used for POST requests
|
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 {
|
type VMID struct {
|
||||||
Min int `json:"min"`
|
Min int `json:"min"`
|
||||||
MAx int `json:"max"`
|
MAx int `json:"max"`
|
||||||
|
|||||||
Reference in New Issue
Block a user