unify ocis subcommands

This commit is contained in:
Willy Kloucek
2022-05-16 07:59:18 +02:00
parent 0e7de0faf3
commit 44c909b31d
34 changed files with 88 additions and 44 deletions
+4 -3
View File
@@ -6,15 +6,16 @@ import (
"github.com/owncloud/ocis/v2/extensions/notifications/pkg/command"
"github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
"github.com/urfave/cli/v2"
)
// NatsServerCommand is the entrypoint for the nats server command.
// NotificationsCommand is the entrypoint for the notifications command.
func NotificationsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "notifications",
Usage: "start notifications service",
Name: cfg.Notifications.Service.Name,
Usage: helper.SubcommandDescription(cfg.Notifications.Service.Name),
Category: "extensions",
Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil {