add missing commands and unify service / namespace options

This commit is contained in:
Willy Kloucek
2022-01-03 07:49:23 +01:00
parent de87f3160d
commit 6206fe2398
66 changed files with 515 additions and 218 deletions
+21 -21
View File
@@ -19,11 +19,18 @@ type Debug struct {
// HTTP defines the available http configuration.
type HTTP struct {
Addr string `ocisConfig:"addr"`
Root string `ocisConfig:"root"`
TLSCert string `ocisConfig:"tls_cert"`
TLSKey string `ocisConfig:"tls_key"`
TLS bool `ocisConfig:"tls"`
Addr string `ocisConfig:"addr"`
Root string `ocisConfig:"root"`
Namespace string `ocisConfig:"namespace"`
TLSCert string `ocisConfig:"tls_cert"`
TLSKey string `ocisConfig:"tls_key"`
TLS bool `ocisConfig:"tls"`
}
// Service defines the available service configuration.
type Service struct {
Name string `ocisConfig:"name"`
Version string `ocisConfig:"version"`
}
// Ldap defines the available LDAP configuration.
@@ -41,13 +48,6 @@ type Ldap struct {
Filter string `ocisConfig:"filter"`
}
// Service defines the available service configuration.
type Service struct {
Name string `ocisConfig:"name"`
Namespace string `ocisConfig:"namespace"`
Version string `ocisConfig:"version"`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `ocisConfig:"enabled"`
@@ -125,11 +125,15 @@ func DefaultConfig() *Config {
Addr: "127.0.0.1:9134",
},
HTTP: HTTP{
Addr: "127.0.0.1:9130",
Root: "/",
TLSCert: path.Join(defaults.BaseDataPath(), "idp", "server.crt"),
TLSKey: path.Join(defaults.BaseDataPath(), "idp", "server.key"),
TLS: false,
Addr: "127.0.0.1:9130",
Root: "/",
Namespace: "com.owncloud.web",
TLSCert: path.Join(defaults.BaseDataPath(), "idp", "server.crt"),
TLSKey: path.Join(defaults.BaseDataPath(), "idp", "server.key"),
TLS: false,
},
Service: Service{
Name: "idp",
},
Tracing: Tracing{
Type: "jaeger",
@@ -184,9 +188,5 @@ func DefaultConfig() *Config {
UUIDAttributeType: "text",
Filter: "(objectClass=posixaccount)",
},
Service: Service{
Name: "idp",
Namespace: "com.owncloud.web",
},
}
}
+2 -2
View File
@@ -89,10 +89,10 @@ func structMappings(cfg *Config) []shared.EnvBinding {
},
{
EnvVars: []string{"IDP_HTTP_NAMESPACE"},
Destination: &cfg.Service.Namespace,
Destination: &cfg.HTTP.Namespace,
},
{
EnvVars: []string{"IDP_NAME"},
EnvVars: []string{"IDP_SERVICE_NAME"},
Destination: &cfg.Service.Name,
},
{