Compare commits

..
1 Commits
Author SHA1 Message Date
alu a645b9aa16 add quota related types 2026-07-24 22:00:10 +00:00
3 changed files with 8 additions and 8 deletions
+7
View File
@@ -49,3 +49,10 @@ type VMID struct {
Min int `json:"min" mapstructure:"min"` Min int `json:"min" mapstructure:"min"`
Max int `json:"max" mapstructure:"max"` Max int `json:"max" mapstructure:"max"`
} }
type Templates struct {
Instances struct {
LXC map[string]ResourceTemplate `json:"lxc" mapstructure:"lxc"`
QEMU map[string]ResourceTemplate `json:"qemu" mapstructure:"qemu"`
} `json:"instances"`
}
+1 -1
View File
@@ -14,7 +14,7 @@ func (g Groupname) ToString() string {
// Converts input username object to string representation. // Converts input username object to string representation.
// Uses the format uid@realm. // Uses the format uid@realm.
func (u Username) ToString() string { func (u Username) ToString() string {
return fmt.Sprintf("%s@%s", u.UserID, u.Realm) return fmt.Sprintf("%s-%s", u.UserID, u.Realm)
} }
// Parses input groupname string to gid and realm. // Parses input groupname string to gid and realm.
-7
View File
@@ -56,13 +56,6 @@ type ListResource struct {
Category string Category string
} }
type Templates struct {
Instances struct {
LXC map[string]ResourceTemplate `json:"lxc" mapstructure:"lxc"`
QEMU map[string]ResourceTemplate `json:"qemu" mapstructure:"qemu"`
} `json:"instances"`
}
type ResourceTemplate struct { type ResourceTemplate struct {
Value string `json:"value" mapstructure:"value"` Value string `json:"value" mapstructure:"value"`
Resource struct { Resource struct {