mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 17:00:57 -06:00
allow configuring default reva address
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -67,6 +67,7 @@ type Config struct {
|
||||
GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
|
||||
GRPCServiceTLS *shared.GRPCServiceTLS `yaml:"grpc_service_tls"`
|
||||
HTTPServiceTLS shared.HTTPServiceTLS `yaml:"http_service_tls"`
|
||||
Reva *shared.Reva `yaml:"reva"`
|
||||
|
||||
Mode Mode // DEPRECATED
|
||||
File string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
activitylog "github.com/owncloud/ocis/v2/services/activitylog/pkg/config/defaults"
|
||||
antivirus "github.com/owncloud/ocis/v2/services/antivirus/pkg/config/defaults"
|
||||
appProvider "github.com/owncloud/ocis/v2/services/app-provider/pkg/config/defaults"
|
||||
@@ -52,6 +53,9 @@ func DefaultConfig() *Config {
|
||||
Port: "9250",
|
||||
Host: "localhost",
|
||||
},
|
||||
Reva: &shared.Reva{
|
||||
Address: "com.owncloud.api.gateway",
|
||||
},
|
||||
|
||||
Activitylog: activitylog.DefaultConfig(),
|
||||
Antivirus: antivirus.DefaultConfig(),
|
||||
|
||||
@@ -58,7 +58,9 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
if cfg.GRPCServiceTLS == nil {
|
||||
cfg.GRPCServiceTLS = &shared.GRPCServiceTLS{}
|
||||
}
|
||||
|
||||
if cfg.Reva == nil {
|
||||
cfg.Reva = &shared.Reva{}
|
||||
}
|
||||
}
|
||||
|
||||
// EnsureCommons copies applicable parts of the oCIS config into the commons part
|
||||
@@ -111,6 +113,8 @@ func EnsureCommons(cfg *config.Config) {
|
||||
if cfg.OcisURL != "" {
|
||||
cfg.Commons.OcisURL = cfg.OcisURL
|
||||
}
|
||||
|
||||
cfg.Commons.Reva = structs.CopyOrZeroValue(cfg.Reva)
|
||||
}
|
||||
|
||||
// Validate checks that all required configs are set. If a required config value
|
||||
|
||||
Reference in New Issue
Block a user