create realm configurations from proxmox domain configuration using api token,
update go mod with domain sync fixes from go-proxmox
This commit is contained in:
@@ -5,21 +5,17 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type LDAPConfig struct {
|
||||
LdapURL string `json:"ldapURL"`
|
||||
StartTLS bool `json:"startTLS"`
|
||||
BaseDN string `json:"baseDN"`
|
||||
}
|
||||
|
||||
type PVEConfig struct {
|
||||
URL string `json:"url"`
|
||||
URL string `json:"url"`
|
||||
Token struct {
|
||||
User string `json:"user"`
|
||||
Realm string `json:"realm"`
|
||||
ID string `json:"id"`
|
||||
UUID string `json:"uuid"`
|
||||
} `json:"token"`
|
||||
PAASClientRole string `json:"paas-client-role"`
|
||||
}
|
||||
|
||||
type RealmConfig struct {
|
||||
Handler string `json:"handler"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
ListenPort int `json:"listenPort"`
|
||||
SessionCookieName string `json:"sessionCookieName"`
|
||||
@@ -29,9 +25,7 @@ type Config struct {
|
||||
Secure bool `json:"secure"`
|
||||
MaxAge int `json:"maxAge"`
|
||||
}
|
||||
LDAP LDAPConfig `json:"ldap"`
|
||||
PVE PVEConfig `json:"pve"`
|
||||
Realms map[string]RealmConfig `json:"realms"`
|
||||
PVE PVEConfig `json:"pve"`
|
||||
}
|
||||
|
||||
func GetConfig(configPath string) (Config, error) {
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
package app
|
||||
|
||||
type Backend interface {
|
||||
NewPool(poolname string) (int, error)
|
||||
DelPool(poolname string) (int, error)
|
||||
NewGroup(groupname Groupname) (int, error)
|
||||
DelGroup(groupname Groupname) (int, error)
|
||||
AddGroupToPool(groupname Groupname, poolname string) (int, error)
|
||||
DelGroupFromPool(groupname Groupname, poolname string) (int, error)
|
||||
NewUser(username Username, user User) (int, error)
|
||||
DelUser(username Username) (int, error)
|
||||
AddUserToGroup(username Username, groupname Groupname) (int, error)
|
||||
DelUserFromGroup(username Username, groupname Groupname) (int, error)
|
||||
}
|
||||
|
||||
type Pool struct {
|
||||
PoolID string `json:"poolid"`
|
||||
Path string `json:"-"` // typically /pool/poolid from proxmox, only used internally
|
||||
|
||||
Reference in New Issue
Block a user