mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 12:19:37 -06:00
add missing commands and unify service / namespace options
This commit is contained in:
@@ -26,18 +26,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"`
|
||||
Namespace string `ocisConfig:"namespace"`
|
||||
Version string `ocisConfig:"version"`
|
||||
Name string `ocisConfig:"name"`
|
||||
Version string `ocisConfig:"version"`
|
||||
}
|
||||
|
||||
// Tracing defines the available tracing configuration.
|
||||
@@ -207,15 +207,15 @@ func DefaultConfig() *Config {
|
||||
Token: "",
|
||||
},
|
||||
HTTP: HTTP{
|
||||
Addr: "0.0.0.0:9200",
|
||||
Root: "/",
|
||||
TLSCert: path.Join(defaults.BaseDataPath(), "proxy", "server.crt"),
|
||||
TLSKey: path.Join(defaults.BaseDataPath(), "proxy", "server.key"),
|
||||
TLS: true,
|
||||
Addr: "0.0.0.0:9200",
|
||||
Root: "/",
|
||||
Namespace: "com.owncloud.web",
|
||||
TLSCert: path.Join(defaults.BaseDataPath(), "proxy", "server.crt"),
|
||||
TLSKey: path.Join(defaults.BaseDataPath(), "proxy", "server.key"),
|
||||
TLS: true,
|
||||
},
|
||||
Service: Service{
|
||||
Name: "proxy",
|
||||
Namespace: "com.owncloud.web",
|
||||
Name: "proxy",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Type: "jaeger",
|
||||
|
||||
@@ -101,15 +101,9 @@ func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
EnvVars: []string{"PROXY_HTTP_ROOT"},
|
||||
Destination: &cfg.HTTP.Root,
|
||||
},
|
||||
|
||||
// Service
|
||||
{
|
||||
EnvVars: []string{"PROXY_SERVICE_NAMESPACE"},
|
||||
Destination: &cfg.Service.Namespace,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"PROXY_SERVICE_NAME"},
|
||||
Destination: &cfg.Service.Name,
|
||||
EnvVars: []string{"PROXY_HTTP_NAMESPACE"},
|
||||
Destination: &cfg.HTTP.Namespace,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"PROXY_TRANSPORT_TLS_CERT"},
|
||||
@@ -123,6 +117,14 @@ func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
EnvVars: []string{"PROXY_TLS"},
|
||||
Destination: &cfg.HTTP.TLS,
|
||||
},
|
||||
|
||||
// Service
|
||||
{
|
||||
EnvVars: []string{"PROXY_SERVICE_NAME"},
|
||||
Destination: &cfg.Service.Name,
|
||||
},
|
||||
|
||||
// Other
|
||||
{
|
||||
EnvVars: []string{"OCIS_JWT_SECRET", "PROXY_JWT_SECRET"},
|
||||
Destination: &cfg.TokenManager.JWTSecret,
|
||||
|
||||
Reference in New Issue
Block a user