mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 13:08:26 -05:00
Get rid of duplicated Reva config struct
Consolidate all services to use the Reva config struct for the shared package. This works because all services (except 'notifications', 'thumbnails' and 'webdav') where using the same config keys and environment variables for setting the reva gateway.
This commit is contained in:
committed by
Ralf Haferkamp
parent
0f507e7aab
commit
e373e48383
@@ -4,6 +4,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/v2/services/auth-basic/pkg/config"
|
||||
)
|
||||
|
||||
@@ -30,7 +31,7 @@ func DefaultConfig() *config.Config {
|
||||
Service: config.Service{
|
||||
Name: "auth-basic",
|
||||
},
|
||||
Reva: &config.Reva{
|
||||
Reva: &shared.Reva{
|
||||
Address: "127.0.0.1:9142",
|
||||
},
|
||||
AuthProvider: "ldap",
|
||||
@@ -104,11 +105,11 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
}
|
||||
|
||||
if cfg.Reva == nil && cfg.Commons != nil && cfg.Commons.Reva != nil {
|
||||
cfg.Reva = &config.Reva{
|
||||
cfg.Reva = &shared.Reva{
|
||||
Address: cfg.Commons.Reva.Address,
|
||||
}
|
||||
} else if cfg.Reva == nil {
|
||||
cfg.Reva = &config.Reva{}
|
||||
cfg.Reva = &shared.Reva{}
|
||||
}
|
||||
|
||||
if cfg.TokenManager == nil && cfg.Commons != nil && cfg.Commons.TokenManager != nil {
|
||||
|
||||
Reference in New Issue
Block a user