make storage metadata config similar to other services

This commit is contained in:
David Christofas
2022-04-21 14:13:03 +02:00
parent 5013d71dac
commit d303bb6f55
9 changed files with 424 additions and 87 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
package command
import (
"github.com/owncloud/ocis/extensions/storage/pkg/command"
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/urfave/cli/v2"
@@ -13,11 +13,11 @@ func StorageMetadataCommand(cfg *config.Config) *cli.Command {
Name: "storage-metadata",
Usage: "start storage and data service for metadata",
Category: "extensions",
Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg)
},
// Before: func(ctx *cli.Context) error {
// return ParseStorageCommon(ctx, cfg)
// },
Action: func(c *cli.Context) error {
origCmd := command.StorageMetadata(cfg.Storage)
origCmd := command.StorageMetadata(cfg.StorageMetadata)
return handleOriginalAction(c, origCmd)
},
}
+2 -1
View File
@@ -35,6 +35,7 @@ import (
proxy "github.com/owncloud/ocis/extensions/proxy/pkg/command"
settings "github.com/owncloud/ocis/extensions/settings/pkg/command"
sharing "github.com/owncloud/ocis/extensions/sharing/pkg/command"
storagemetadata "github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
storage "github.com/owncloud/ocis/extensions/storage/pkg/command"
store "github.com/owncloud/ocis/extensions/store/pkg/command"
thumbnails "github.com/owncloud/ocis/extensions/thumbnails/pkg/command"
@@ -101,7 +102,7 @@ func NewService(options ...Option) (*Service, error) {
s.ServicesRegistry["settings"] = settings.NewSutureService
s.ServicesRegistry["nats"] = nats.NewSutureService
s.ServicesRegistry["storage-metadata"] = storage.NewStorageMetadata
s.ServicesRegistry["storage-metadata"] = storagemetadata.NewStorageMetadata
s.ServicesRegistry["glauth"] = glauth.NewSutureService
s.ServicesRegistry["graph"] = graph.NewSutureService
s.ServicesRegistry["graph-explorer"] = graphExplorer.NewSutureService