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:
Ralf Haferkamp
2022-10-12 15:48:54 +02:00
committed by Ralf Haferkamp
parent 0f507e7aab
commit e373e48383
71 changed files with 130 additions and 206 deletions

View File

@@ -1,6 +1,7 @@
package defaults
import (
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/services/storage-publiclink/pkg/config"
)
@@ -27,7 +28,7 @@ func DefaultConfig() *config.Config {
Service: config.Service{
Name: "storage-publiclink",
},
Reva: &config.Reva{
Reva: &shared.Reva{
Address: "127.0.0.1:9142",
},
StorageProvider: config.StorageProvider{
@@ -61,11 +62,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 {