add missing commands and unify service / namespace options
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
//go:build !simple
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/graph/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// GraphCommand is the entrypoint for the graph command.
|
||||
func GraphCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "graph",
|
||||
Usage: "Start graph server",
|
||||
Category: "Extensions",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
if err := ParseConfig(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if cfg.Commons != nil {
|
||||
cfg.Graph.Commons = cfg.Commons
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Server(cfg.Graph)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
Subcommands: []*cli.Command{
|
||||
command.PrintVersion(cfg.Graph),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(GraphCommand)
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//go:build !simple
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// GraphExplorerCommand is the entrypoint for the graph-explorer command.
|
||||
func GraphExplorerCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "graph-explorer",
|
||||
Usage: "Start graph-explorer server",
|
||||
Category: "Extensions",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
if err := ParseConfig(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if cfg.Commons != nil {
|
||||
cfg.Graph.Commons = cfg.Commons
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Server(cfg.GraphExplorer)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
Subcommands: []*cli.Command{
|
||||
command.PrintVersion(cfg.GraphExplorer),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(GraphExplorerCommand)
|
||||
}
|
||||
@@ -16,7 +16,7 @@ func StorageAuthMachineCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-auth-machine",
|
||||
Usage: "Start storage auth-machine service",
|
||||
Category: "Extensions",
|
||||
//Flags: flagset.AuthBearerWithConfig(cfg.Storage),
|
||||
//Flags: flagset.AuthMachineWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user