From d9744ebda7223596926702ada4fd5ebf482bce28 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 7 Jan 2022 13:19:39 +0100 Subject: [PATCH] improve command description --- accounts/pkg/command/add_account.go | 9 +++++---- accounts/pkg/command/health.go | 5 +++-- accounts/pkg/command/inspect_account.go | 3 ++- accounts/pkg/command/list_accounts.go | 9 +++++---- accounts/pkg/command/rebuild_index.go | 7 ++++--- accounts/pkg/command/remove_account.go | 3 ++- accounts/pkg/command/server.go | 7 ++++--- accounts/pkg/command/update_account.go | 1 + accounts/pkg/command/version.go | 5 +++-- glauth/pkg/command/health.go | 5 +++-- glauth/pkg/command/server.go | 6 ++++-- glauth/pkg/command/version.go | 5 +++-- graph-explorer/pkg/command/health.go | 7 ++++--- graph-explorer/pkg/command/server.go | 6 ++++-- graph-explorer/pkg/command/version.go | 5 +++-- graph/pkg/command/health.go | 5 +++-- graph/pkg/command/server.go | 6 ++++-- graph/pkg/command/version.go | 5 +++-- idp/pkg/command/health.go | 5 +++-- idp/pkg/command/server.go | 6 ++++-- idp/pkg/command/version.go | 5 +++-- ocis/pkg/command/accounts.go | 6 +++--- ocis/pkg/command/common.go | 10 +++++++++- ocis/pkg/command/glauth.go | 6 +++--- ocis/pkg/command/graph.go | 6 +++--- ocis/pkg/command/graphexplorer.go | 6 +++--- ocis/pkg/command/idp.go | 6 +++--- ocis/pkg/command/kill.go | 4 ++-- ocis/pkg/command/list.go | 4 ++-- ocis/pkg/command/ocs.go | 6 +++--- ocis/pkg/command/proxy.go | 6 +++--- ocis/pkg/command/run.go | 4 ++-- ocis/pkg/command/server.go | 4 ++-- ocis/pkg/command/settings.go | 6 +++--- ocis/pkg/command/storageappprovider.go | 4 ++-- ocis/pkg/command/storageauthbasic.go | 4 ++-- ocis/pkg/command/storageauthbearer.go | 2 +- ocis/pkg/command/storageauthmachine.go | 4 ++-- ocis/pkg/command/storagefrontend.go | 4 ++-- ocis/pkg/command/storagegateway.go | 4 ++-- ocis/pkg/command/storagegroupprovider.go | 4 ++-- ocis/pkg/command/storagehome.go | 4 ++-- ocis/pkg/command/storagemetadata.go | 4 ++-- ocis/pkg/command/storagepubliclink.go | 4 ++-- ocis/pkg/command/storagesharing.go | 4 ++-- ocis/pkg/command/storageuserprovider.go | 4 ++-- ocis/pkg/command/storageusers.go | 4 ++-- ocis/pkg/command/store.go | 6 +++--- ocis/pkg/command/thumbnails.go | 10 +++------- ocis/pkg/command/version.go | 4 ++-- ocis/pkg/command/web.go | 6 +++--- ocis/pkg/command/webdav.go | 6 +++--- ocs/pkg/command/health.go | 5 +++-- ocs/pkg/command/server.go | 6 ++++-- ocs/pkg/command/version.go | 5 +++-- proxy/pkg/command/health.go | 5 +++-- proxy/pkg/command/server.go | 6 ++++-- proxy/pkg/command/version.go | 5 +++-- settings/pkg/command/server.go | 6 ++++-- settings/pkg/command/version.go | 5 +++-- storage/pkg/command/appprovider.go | 2 +- storage/pkg/command/authbasic.go | 2 +- storage/pkg/command/authbearer.go | 2 +- storage/pkg/command/authmachine.go | 2 +- storage/pkg/command/frontend.go | 2 +- storage/pkg/command/gateway.go | 2 +- storage/pkg/command/groups.go | 2 +- storage/pkg/command/health.go | 5 +++-- storage/pkg/command/sharing.go | 2 +- storage/pkg/command/storagehome.go | 2 +- storage/pkg/command/storagemetadata.go | 4 ++-- storage/pkg/command/storagepubliclink.go | 4 ++-- storage/pkg/command/storageusers.go | 2 +- storage/pkg/command/users.go | 2 +- store/pkg/command/health.go | 5 +++-- store/pkg/command/server.go | 6 ++++-- store/pkg/command/version.go | 5 +++-- thumbnails/pkg/command/health.go | 5 +++-- thumbnails/pkg/command/server.go | 5 +++-- thumbnails/pkg/command/version.go | 5 +++-- web/pkg/command/health.go | 5 +++-- web/pkg/command/server.go | 6 ++++-- web/pkg/command/version.go | 5 +++-- webdav/pkg/command/health.go | 5 +++-- webdav/pkg/command/server.go | 6 ++++-- webdav/pkg/command/version.go | 5 +++-- 86 files changed, 234 insertions(+), 178 deletions(-) diff --git a/accounts/pkg/command/add_account.go b/accounts/pkg/command/add_account.go index 07d18f1a8..1e904c5b8 100644 --- a/accounts/pkg/command/add_account.go +++ b/accounts/pkg/command/add_account.go @@ -16,10 +16,11 @@ func AddAccount(cfg *config.Config) *cli.Command { PasswordProfile: &accounts.PasswordProfile{}, } return &cli.Command{ - Name: "add", - Usage: "Create a new account", - Aliases: []string{"create", "a"}, - Flags: flagset.AddAccountWithConfig(cfg, a), + Name: "add", + Usage: "create a new account", + Category: "account management", + Aliases: []string{"create", "a"}, + Flags: flagset.AddAccountWithConfig(cfg, a), Before: func(c *cli.Context) error { // Write value of username to the flags beneath, as preferred name // and on-premises-sam-account-name is probably confusing for users. diff --git a/accounts/pkg/command/health.go b/accounts/pkg/command/health.go index 2fadae8ef..0e908b60e 100644 --- a/accounts/pkg/command/health.go +++ b/accounts/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/accounts/pkg/command/inspect_account.go b/accounts/pkg/command/inspect_account.go index 7124b0da4..5e2009497 100644 --- a/accounts/pkg/command/inspect_account.go +++ b/accounts/pkg/command/inspect_account.go @@ -18,7 +18,8 @@ import ( func InspectAccount(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "inspect", - Usage: "Show detailed data on an existing account", + Usage: "show detailed data on an existing account", + Category: "account management", ArgsUsage: "id", Flags: flagset.InspectAccountWithConfig(cfg), Action: func(c *cli.Context) error { diff --git a/accounts/pkg/command/list_accounts.go b/accounts/pkg/command/list_accounts.go index bf35626b1..3c15a1275 100644 --- a/accounts/pkg/command/list_accounts.go +++ b/accounts/pkg/command/list_accounts.go @@ -17,10 +17,11 @@ import ( // ListAccounts command lists all accounts func ListAccounts(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "list", - Usage: "List existing accounts", - Aliases: []string{"ls"}, - Flags: flagset.ListAccountsWithConfig(cfg), + Name: "list", + Usage: "list existing accounts", + Category: "account management", + Aliases: []string{"ls"}, + Flags: flagset.ListAccountsWithConfig(cfg), Action: func(c *cli.Context) error { accSvcID := cfg.GRPC.Namespace + "." + cfg.Service.Name accSvc := accounts.NewAccountsService(accSvcID, grpc.NewClient()) diff --git a/accounts/pkg/command/rebuild_index.go b/accounts/pkg/command/rebuild_index.go index b643ec04e..d2eb1d2de 100644 --- a/accounts/pkg/command/rebuild_index.go +++ b/accounts/pkg/command/rebuild_index.go @@ -14,9 +14,10 @@ import ( // RebuildIndex rebuilds the entire configured index. func RebuildIndex(cdf *config.Config) *cli.Command { return &cli.Command{ - Name: "rebuildIndex", - Usage: "Rebuilds the service's index, i.e. deleting and then re-adding all existing documents", - Aliases: []string{"rebuild", "ri"}, + Name: "rebuildIndex", + Usage: "rebuilds the service's index, i.e. deleting and then re-adding all existing documents", + Category: "account management", + Aliases: []string{"rebuild", "ri"}, Action: func(ctx *cli.Context) error { idxSvcID := "com.owncloud.api.accounts" idxSvc := index.NewIndexService(idxSvcID, grpc.NewClient()) diff --git a/accounts/pkg/command/remove_account.go b/accounts/pkg/command/remove_account.go index c51c1abe3..ee18eede4 100644 --- a/accounts/pkg/command/remove_account.go +++ b/accounts/pkg/command/remove_account.go @@ -16,7 +16,8 @@ import ( func RemoveAccount(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "remove", - Usage: "Removes an existing account", + Usage: "removes an existing account", + Category: "account management", ArgsUsage: "id", Aliases: []string{"rm"}, Flags: flagset.RemoveAccountWithConfig(cfg), diff --git a/accounts/pkg/command/server.go b/accounts/pkg/command/server.go index 7c8f3832e..52fd784ee 100644 --- a/accounts/pkg/command/server.go +++ b/accounts/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" "github.com/owncloud/ocis/accounts/pkg/config" @@ -20,9 +21,9 @@ import ( // Server is the entry point for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start ocis accounts service", - Description: "uses an LDAP server as the storage backend", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/accounts/pkg/command/update_account.go b/accounts/pkg/command/update_account.go index 1b9b91ca4..cf2e68950 100644 --- a/accounts/pkg/command/update_account.go +++ b/accounts/pkg/command/update_account.go @@ -21,6 +21,7 @@ func UpdateAccount(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "update", Usage: "Make changes to an existing account", + Category: "account management", ArgsUsage: "id", Flags: flagset.UpdateAccountWithConfig(cfg, a), Before: func(c *cli.Context) error { diff --git a/accounts/pkg/command/version.go b/accounts/pkg/command/version.go index 6d3ec843f..a77668937 100644 --- a/accounts/pkg/command/version.go +++ b/accounts/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/glauth/pkg/command/health.go b/glauth/pkg/command/health.go index 215018b29..ef15ee650 100644 --- a/glauth/pkg/command/health.go +++ b/glauth/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/glauth/pkg/command/server.go b/glauth/pkg/command/server.go index 08f1879e0..75a27f846 100644 --- a/glauth/pkg/command/server.go +++ b/glauth/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" glauthcfg "github.com/glauth/glauth/v2/pkg/config" "github.com/oklog/run" @@ -22,8 +23,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/glauth/pkg/command/version.go b/glauth/pkg/command/version.go index c3d2e4ffd..c8e149daf 100644 --- a/glauth/pkg/command/version.go +++ b/glauth/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/graph-explorer/pkg/command/health.go b/graph-explorer/pkg/command/health.go index 6719e960a..cf0a9a660 100644 --- a/graph-explorer/pkg/command/health.go +++ b/graph-explorer/pkg/command/health.go @@ -13,10 +13,11 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { - return parser.ParseConfig( cfg) + return parser.ParseConfig(cfg) }, Action: func(c *cli.Context) error { logger := logging.Configure(cfg.Service.Name, cfg.Log) diff --git a/graph-explorer/pkg/command/server.go b/graph-explorer/pkg/command/server.go index 7f753b3cc..711ae3a0b 100644 --- a/graph-explorer/pkg/command/server.go +++ b/graph-explorer/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" "github.com/owncloud/ocis/graph-explorer/pkg/config" @@ -18,8 +19,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/graph-explorer/pkg/command/version.go b/graph-explorer/pkg/command/version.go index 400c0bf10..39b1cadb4 100644 --- a/graph-explorer/pkg/command/version.go +++ b/graph-explorer/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/graph/pkg/command/health.go b/graph/pkg/command/health.go index 5e2a31ecb..b40b65a17 100644 --- a/graph/pkg/command/health.go +++ b/graph/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/graph/pkg/command/server.go b/graph/pkg/command/server.go index c246b23e4..38c012a20 100644 --- a/graph/pkg/command/server.go +++ b/graph/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" "github.com/owncloud/ocis/graph/pkg/config" @@ -18,8 +19,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/graph/pkg/command/version.go b/graph/pkg/command/version.go index 8ced4ad48..8e85a27dd 100644 --- a/graph/pkg/command/version.go +++ b/graph/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/idp/pkg/command/health.go b/idp/pkg/command/health.go index a668eaf4c..af3e6ccbc 100644 --- a/idp/pkg/command/health.go +++ b/idp/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/idp/pkg/command/server.go b/idp/pkg/command/server.go index a5be7abcc..c3bdfec70 100644 --- a/idp/pkg/command/server.go +++ b/idp/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" "github.com/owncloud/ocis/idp/pkg/config" @@ -18,8 +19,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/idp/pkg/command/version.go b/idp/pkg/command/version.go index f9cbcd574..22d4f4ce6 100644 --- a/idp/pkg/command/version.go +++ b/idp/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/ocis/pkg/command/accounts.go b/ocis/pkg/command/accounts.go index 672dcd6a3..5671fa9b6 100644 --- a/ocis/pkg/command/accounts.go +++ b/ocis/pkg/command/accounts.go @@ -11,9 +11,9 @@ import ( // AccountsCommand is the entrypoint for the accounts command. func AccountsCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "accounts", - Usage: "Start accounts server", - Category: "Extensions", + Name: cfg.Accounts.Service.Name, + Usage: subcommandDescription(cfg.Accounts.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/common.go b/ocis/pkg/command/common.go index 60af3e22a..77bfa381e 100644 --- a/ocis/pkg/command/common.go +++ b/ocis/pkg/command/common.go @@ -1,6 +1,10 @@ package command -import "github.com/urfave/cli/v2" +import ( + "fmt" + + "github.com/urfave/cli/v2" +) func handleOriginalAction(c *cli.Context, cmd *cli.Command) error { @@ -12,3 +16,7 @@ func handleOriginalAction(c *cli.Context, cmd *cli.Command) error { return cli.HandleAction(cmd.Action, c) } + +func subcommandDescription(serviceName string) string { + return fmt.Sprintf("%s extension commands", serviceName) +} diff --git a/ocis/pkg/command/glauth.go b/ocis/pkg/command/glauth.go index 3e58bbeef..9d7b09b02 100644 --- a/ocis/pkg/command/glauth.go +++ b/ocis/pkg/command/glauth.go @@ -11,9 +11,9 @@ import ( // GLAuthCommand is the entrypoint for the glauth command. func GLAuthCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "glauth", - Usage: "Start glauth server", - Category: "Extensions", + Name: cfg.GLAuth.Service.Name, + Usage: subcommandDescription(cfg.GLAuth.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/graph.go b/ocis/pkg/command/graph.go index a482ef681..0a663e6db 100644 --- a/ocis/pkg/command/graph.go +++ b/ocis/pkg/command/graph.go @@ -11,9 +11,9 @@ import ( // 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", + Name: cfg.Graph.Service.Name, + Usage: subcommandDescription(cfg.Graph.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/graphexplorer.go b/ocis/pkg/command/graphexplorer.go index fa2eee4c3..d88135d0b 100644 --- a/ocis/pkg/command/graphexplorer.go +++ b/ocis/pkg/command/graphexplorer.go @@ -11,9 +11,9 @@ import ( // 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", + Name: cfg.GraphExplorer.Service.Name, + Usage: subcommandDescription(cfg.GraphExplorer.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/idp.go b/ocis/pkg/command/idp.go index d71e57438..8e64daee7 100644 --- a/ocis/pkg/command/idp.go +++ b/ocis/pkg/command/idp.go @@ -11,9 +11,9 @@ import ( // IDPCommand is the entrypoint for the idp command. func IDPCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "idp", - Usage: "Start idp server", - Category: "Extensions", + Name: cfg.IDP.Service.Name, + Usage: subcommandDescription(cfg.IDP.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/kill.go b/ocis/pkg/command/kill.go index 70530f98a..853acdd71 100644 --- a/ocis/pkg/command/kill.go +++ b/ocis/pkg/command/kill.go @@ -16,8 +16,8 @@ import ( func KillCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "kill", - Usage: "Kill an extension by name", - Category: "Runtime", + Usage: "kill an extension by name in the runtime (supervised mode)", + Category: "runtime", Flags: []cli.Flag{ &cli.StringFlag{ Name: "hostname", diff --git a/ocis/pkg/command/list.go b/ocis/pkg/command/list.go index 7d277e8bf..c7fd15587 100644 --- a/ocis/pkg/command/list.go +++ b/ocis/pkg/command/list.go @@ -15,8 +15,8 @@ import ( func ListCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "list", - Usage: "Lists running ocis extensions", - Category: "Runtime", + Usage: "list oCIS extensions running in the runtime (supervised mode)", + Category: "runtime", Flags: []cli.Flag{ &cli.StringFlag{ Name: "hostname", diff --git a/ocis/pkg/command/ocs.go b/ocis/pkg/command/ocs.go index 657bc2969..2570f2a38 100644 --- a/ocis/pkg/command/ocs.go +++ b/ocis/pkg/command/ocs.go @@ -11,9 +11,9 @@ import ( // OCSCommand is the entrypoint for the ocs command. func OCSCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "ocs", - Usage: "Start ocs server", - Category: "Extensions", + Name: cfg.OCS.Service.Name, + Usage: subcommandDescription(cfg.OCS.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/proxy.go b/ocis/pkg/command/proxy.go index d52e667b4..cd59c6090 100644 --- a/ocis/pkg/command/proxy.go +++ b/ocis/pkg/command/proxy.go @@ -11,9 +11,9 @@ import ( // ProxyCommand is the entry point for the proxy command. func ProxyCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "proxy", - Usage: "Start proxy server", - Category: "Extensions", + Name: cfg.Proxy.Service.Name, + Usage: subcommandDescription(cfg.Proxy.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/run.go b/ocis/pkg/command/run.go index 398bb39e1..1cab47a0d 100644 --- a/ocis/pkg/command/run.go +++ b/ocis/pkg/command/run.go @@ -17,8 +17,8 @@ import ( func RunCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "run", - Usage: "Runs an extension", - Category: "Runtime", + Usage: "run an extension by name in the runtime (supervised mode)", + Category: "runtime", Flags: []cli.Flag{ &cli.StringFlag{ Name: "hostname", diff --git a/ocis/pkg/command/server.go b/ocis/pkg/command/server.go index ac24c1c64..00b9c89da 100644 --- a/ocis/pkg/command/server.go +++ b/ocis/pkg/command/server.go @@ -13,8 +13,8 @@ import ( func Server(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "server", - Usage: "Start fullstack server", - Category: "Fullstack", + Usage: "start a fullstack server (runtime and all extensions in supervised mode)", + Category: "fullstack", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/settings.go b/ocis/pkg/command/settings.go index 2803c1398..d489ccc80 100644 --- a/ocis/pkg/command/settings.go +++ b/ocis/pkg/command/settings.go @@ -11,9 +11,9 @@ import ( // SettingsCommand is the entry point for the settings command. func SettingsCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "settings", - Usage: "Start settings server", - Category: "Extensions", + Name: cfg.Settings.Service.Name, + Usage: subcommandDescription(cfg.Settings.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/storageappprovider.go b/ocis/pkg/command/storageappprovider.go index 03d886f3b..48744bff5 100644 --- a/ocis/pkg/command/storageappprovider.go +++ b/ocis/pkg/command/storageappprovider.go @@ -11,8 +11,8 @@ import ( func StorageAppProviderCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-app-provider", - Usage: "Start storage app-provider service", - Category: "Extensions", + Usage: "start storage app-provider service", + Category: "extensions", //Flags: flagset.AppProviderWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storageauthbasic.go b/ocis/pkg/command/storageauthbasic.go index 1bfe109db..3523c40b7 100644 --- a/ocis/pkg/command/storageauthbasic.go +++ b/ocis/pkg/command/storageauthbasic.go @@ -11,8 +11,8 @@ import ( func StorageAuthBasicCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-auth-basic", - Usage: "Start storage auth-basic service", - Category: "Extensions", + Usage: "start storage auth-basic service", + Category: "extensions", //Flags: flagset.AuthBasicWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storageauthbearer.go b/ocis/pkg/command/storageauthbearer.go index 8b87968e0..8486373a8 100644 --- a/ocis/pkg/command/storageauthbearer.go +++ b/ocis/pkg/command/storageauthbearer.go @@ -12,7 +12,7 @@ func StorageAuthBearerCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-auth-bearer", Usage: "Start storage auth-bearer service", - Category: "Extensions", + Category: "extensions", //Flags: flagset.AuthBearerWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storageauthmachine.go b/ocis/pkg/command/storageauthmachine.go index 18b9d8a18..2f3392caf 100644 --- a/ocis/pkg/command/storageauthmachine.go +++ b/ocis/pkg/command/storageauthmachine.go @@ -11,8 +11,8 @@ import ( func StorageAuthMachineCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-auth-machine", - Usage: "Start storage auth-machine service", - Category: "Extensions", + Usage: "start storage auth-machine service", + Category: "extensions", //Flags: flagset.AuthMachineWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storagefrontend.go b/ocis/pkg/command/storagefrontend.go index 5fe8ef78c..9079e268c 100644 --- a/ocis/pkg/command/storagefrontend.go +++ b/ocis/pkg/command/storagefrontend.go @@ -11,8 +11,8 @@ import ( func StorageFrontendCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-frontend", - Usage: "Start storage frontend", - Category: "Extensions", + Usage: "start storage frontend", + Category: "extensions", //Flags: flagset.FrontendWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storagegateway.go b/ocis/pkg/command/storagegateway.go index 937305d81..615490fdd 100644 --- a/ocis/pkg/command/storagegateway.go +++ b/ocis/pkg/command/storagegateway.go @@ -11,8 +11,8 @@ import ( func StorageGatewayCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-gateway", - Usage: "Start storage gateway", - Category: "Extensions", + Usage: "start storage gateway", + Category: "extensions", //Flags: flagset.GatewayWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storagegroupprovider.go b/ocis/pkg/command/storagegroupprovider.go index 6519772a1..ed7907f4e 100644 --- a/ocis/pkg/command/storagegroupprovider.go +++ b/ocis/pkg/command/storagegroupprovider.go @@ -11,8 +11,8 @@ import ( func StorageGroupProviderCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-groupprovider", - Usage: "Start storage groupprovider service", - Category: "Extensions", + Usage: "start storage groupprovider service", + Category: "extensions", //Flags: flagset.GroupsWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storagehome.go b/ocis/pkg/command/storagehome.go index f3db32088..14cf7ad91 100644 --- a/ocis/pkg/command/storagehome.go +++ b/ocis/pkg/command/storagehome.go @@ -11,8 +11,8 @@ import ( func StorageHomeCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-home", - Usage: "Start storage and data provider for /home mount", - Category: "Extensions", + Usage: "start storage and data provider for /home mount", + Category: "extensions", //Flags: flagset.StorageHomeWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storagemetadata.go b/ocis/pkg/command/storagemetadata.go index 59598a245..cab4a7a08 100644 --- a/ocis/pkg/command/storagemetadata.go +++ b/ocis/pkg/command/storagemetadata.go @@ -11,8 +11,8 @@ import ( func StorageMetadataCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-metadata", - Usage: "Start storage and data service for metadata", - Category: "Extensions", + Usage: "start storage and data service for metadata", + Category: "extensions", Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) }, diff --git a/ocis/pkg/command/storagepubliclink.go b/ocis/pkg/command/storagepubliclink.go index 97057ed00..653d7baf6 100644 --- a/ocis/pkg/command/storagepubliclink.go +++ b/ocis/pkg/command/storagepubliclink.go @@ -11,8 +11,8 @@ import ( func StoragePublicLinkCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-public-link", - Usage: "Start storage public link storage", - Category: "Extensions", + Usage: "start storage public link storage", + Category: "extensions", //Flags: flagset.StoragePublicLink(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storagesharing.go b/ocis/pkg/command/storagesharing.go index d5d479c5c..1a2e5f791 100644 --- a/ocis/pkg/command/storagesharing.go +++ b/ocis/pkg/command/storagesharing.go @@ -11,8 +11,8 @@ import ( func StorageSharingCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-sharing", - Usage: "Start storage sharing service", - Category: "Extensions", + Usage: "start storage sharing service", + Category: "extensions", //Flags: flagset.SharingWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storageuserprovider.go b/ocis/pkg/command/storageuserprovider.go index 984d7e86a..611592452 100644 --- a/ocis/pkg/command/storageuserprovider.go +++ b/ocis/pkg/command/storageuserprovider.go @@ -11,8 +11,8 @@ import ( func StorageUserProviderCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-userprovider", - Usage: "Start storage userprovider service", - Category: "Extensions", + Usage: "start storage userprovider service", + Category: "extensions", //Flags: flagset.UsersWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/storageusers.go b/ocis/pkg/command/storageusers.go index fbcd1d40a..a6b57ceff 100644 --- a/ocis/pkg/command/storageusers.go +++ b/ocis/pkg/command/storageusers.go @@ -11,8 +11,8 @@ import ( func StorageUsersCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-users", - Usage: "Start storage and data provider for /users mount", - Category: "Extensions", + Usage: "start storage and data provider for /users mount", + Category: "extensions", //Flags: flagset.StorageUsersWithConfig(cfg.Storage), Before: func(ctx *cli.Context) error { return ParseStorageCommon(ctx, cfg) diff --git a/ocis/pkg/command/store.go b/ocis/pkg/command/store.go index a12412c95..7e10d3628 100644 --- a/ocis/pkg/command/store.go +++ b/ocis/pkg/command/store.go @@ -12,9 +12,9 @@ import ( func StoreCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "store", - Usage: "Start a go-micro store", - Category: "Extensions", + Name: cfg.Store.Service.Name, + Usage: subcommandDescription(cfg.Store.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/thumbnails.go b/ocis/pkg/command/thumbnails.go index 140b6a1c5..f2c2284b9 100644 --- a/ocis/pkg/command/thumbnails.go +++ b/ocis/pkg/command/thumbnails.go @@ -11,16 +11,12 @@ import ( // ThumbnailsCommand is the entrypoint for the thumbnails command. func ThumbnailsCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "thumbnails", - Usage: "Start thumbnails server", - Category: "Extensions", + Name: cfg.Thumbnails.Service.Name, + Usage: subcommandDescription(cfg.Thumbnails.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, - Action: func(c *cli.Context) error { - origCmd := command.Server(cfg.Thumbnails) - return handleOriginalAction(c, origCmd) - }, Subcommands: command.GetCommands(cfg.Thumbnails), } } diff --git a/ocis/pkg/command/version.go b/ocis/pkg/command/version.go index f69340683..4254a46df 100644 --- a/ocis/pkg/command/version.go +++ b/ocis/pkg/command/version.go @@ -17,8 +17,8 @@ import ( func VersionCommand(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "version", - Usage: "Lists running services with version", - Category: "Runtime", + Usage: "print the version of this binary and all running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/ocis/pkg/command/web.go b/ocis/pkg/command/web.go index 6ef8a2095..d5b2a9133 100644 --- a/ocis/pkg/command/web.go +++ b/ocis/pkg/command/web.go @@ -11,9 +11,9 @@ import ( // WebCommand is the entrypoint for the web command. func WebCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "web", - Usage: "Start web server", - Category: "Extensions", + Name: cfg.Web.Service.Name, + Usage: subcommandDescription(cfg.Web.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocis/pkg/command/webdav.go b/ocis/pkg/command/webdav.go index fb171ad14..f09b59a13 100644 --- a/ocis/pkg/command/webdav.go +++ b/ocis/pkg/command/webdav.go @@ -12,9 +12,9 @@ import ( func WebDAVCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "webdav", - Usage: "Start webdav server", - Category: "Extensions", + Name: cfg.WebDAV.Service.Name, + Usage: subcommandDescription(cfg.WebDAV.Service.Name), + Category: "extensions", Before: func(ctx *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocs/pkg/command/health.go b/ocs/pkg/command/health.go index 834390b9e..319efcd39 100644 --- a/ocs/pkg/command/health.go +++ b/ocs/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocs/pkg/command/server.go b/ocs/pkg/command/server.go index 4126133a1..d8d0acfe4 100644 --- a/ocs/pkg/command/server.go +++ b/ocs/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/owncloud/ocis/ocis-pkg/version" "github.com/owncloud/ocis/ocs/pkg/config/parser" @@ -19,8 +20,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/ocs/pkg/command/version.go b/ocs/pkg/command/version.go index 116c081df..e00e7b980 100644 --- a/ocs/pkg/command/version.go +++ b/ocs/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/proxy/pkg/command/health.go b/proxy/pkg/command/health.go index 0d10d16ec..41359d0c7 100644 --- a/proxy/pkg/command/health.go +++ b/proxy/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/proxy/pkg/command/server.go b/proxy/pkg/command/server.go index 9f992d6d7..7f1767ae2 100644 --- a/proxy/pkg/command/server.go +++ b/proxy/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "crypto/tls" + "fmt" "net/http" "time" @@ -36,8 +37,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/proxy/pkg/command/version.go b/proxy/pkg/command/version.go index 7545db5d4..e8b907dca 100644 --- a/proxy/pkg/command/version.go +++ b/proxy/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "Print the version of this binary and the running extension instances", + Category: "Version", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/settings/pkg/command/server.go b/settings/pkg/command/server.go index 9c08299f1..c2c773d0a 100644 --- a/settings/pkg/command/server.go +++ b/settings/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" "github.com/owncloud/ocis/ocis-pkg/version" @@ -19,8 +20,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/settings/pkg/command/version.go b/settings/pkg/command/version.go index 15c390136..20df41a1e 100644 --- a/settings/pkg/command/version.go +++ b/settings/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/storage/pkg/command/appprovider.go b/storage/pkg/command/appprovider.go index 80c8c523b..591fc7813 100644 --- a/storage/pkg/command/appprovider.go +++ b/storage/pkg/command/appprovider.go @@ -22,7 +22,7 @@ import ( func AppProvider(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "app-provider", - Usage: "Start appprovider for providing apps", + Usage: "start appprovider for providing apps", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-app-provider") }, diff --git a/storage/pkg/command/authbasic.go b/storage/pkg/command/authbasic.go index 10268754a..8528cb6c1 100644 --- a/storage/pkg/command/authbasic.go +++ b/storage/pkg/command/authbasic.go @@ -23,7 +23,7 @@ import ( func AuthBasic(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "auth-basic", - Usage: "Start authprovider for basic auth", + Usage: "start authprovider for basic auth", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-auth-basic") }, diff --git a/storage/pkg/command/authbearer.go b/storage/pkg/command/authbearer.go index af60ccbda..aff1c2a5f 100644 --- a/storage/pkg/command/authbearer.go +++ b/storage/pkg/command/authbearer.go @@ -22,7 +22,7 @@ import ( func AuthBearer(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "auth-bearer", - Usage: "Start authprovider for bearer auth", + Usage: "start authprovider for bearer auth", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-auth-bearer") }, diff --git a/storage/pkg/command/authmachine.go b/storage/pkg/command/authmachine.go index eaaa97cbf..46e0fa949 100644 --- a/storage/pkg/command/authmachine.go +++ b/storage/pkg/command/authmachine.go @@ -22,7 +22,7 @@ import ( func AuthMachine(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "auth-machine", - Usage: "Start authprovider for machine auth", + Usage: "start authprovider for machine auth", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-auth-machine") }, diff --git a/storage/pkg/command/frontend.go b/storage/pkg/command/frontend.go index f3b3d9f6f..26d5bbc5e 100644 --- a/storage/pkg/command/frontend.go +++ b/storage/pkg/command/frontend.go @@ -26,7 +26,7 @@ import ( func Frontend(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "frontend", - Usage: "Start frontend service", + Usage: "start frontend service", Before: func(c *cli.Context) error { if err := loadUserAgent(c, cfg); err != nil { return err diff --git a/storage/pkg/command/gateway.go b/storage/pkg/command/gateway.go index 63f158da1..5570c959b 100644 --- a/storage/pkg/command/gateway.go +++ b/storage/pkg/command/gateway.go @@ -30,7 +30,7 @@ import ( func Gateway(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "gateway", - Usage: "Start gateway", + Usage: "start gateway", Before: func(c *cli.Context) error { if err := ParseConfig(c, cfg, "storage-gateway"); err != nil { return err diff --git a/storage/pkg/command/groups.go b/storage/pkg/command/groups.go index 043c96fdc..b71951431 100644 --- a/storage/pkg/command/groups.go +++ b/storage/pkg/command/groups.go @@ -23,7 +23,7 @@ import ( func Groups(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "groups", - Usage: "Start groups service", + Usage: "start groups service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-groups") }, diff --git a/storage/pkg/command/health.go b/storage/pkg/command/health.go index a3c3791a9..2a81dee7c 100644 --- a/storage/pkg/command/health.go +++ b/storage/pkg/command/health.go @@ -11,8 +11,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage") }, diff --git a/storage/pkg/command/sharing.go b/storage/pkg/command/sharing.go index abace4d50..52735f32b 100644 --- a/storage/pkg/command/sharing.go +++ b/storage/pkg/command/sharing.go @@ -25,7 +25,7 @@ import ( func Sharing(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "sharing", - Usage: "Start sharing service", + Usage: "start sharing service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-sharing") }, diff --git a/storage/pkg/command/storagehome.go b/storage/pkg/command/storagehome.go index bbeca4d70..8964e0887 100644 --- a/storage/pkg/command/storagehome.go +++ b/storage/pkg/command/storagehome.go @@ -24,7 +24,7 @@ import ( func StorageHome(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-home", - Usage: "Start storage-home service", + Usage: "start storage-home service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-home") }, diff --git a/storage/pkg/command/storagemetadata.go b/storage/pkg/command/storagemetadata.go index 1c84313a3..cb84b9ac8 100644 --- a/storage/pkg/command/storagemetadata.go +++ b/storage/pkg/command/storagemetadata.go @@ -28,11 +28,11 @@ import ( func StorageMetadata(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-metadata", - Usage: "Start storage-metadata service", + Usage: "start storage-metadata service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-metadata") }, - Category: "Extensions", + Category: "extensions", Action: func(c *cli.Context) error { logger := NewLogger(cfg) tracing.Configure(cfg, logger) diff --git a/storage/pkg/command/storagepubliclink.go b/storage/pkg/command/storagepubliclink.go index edd73c9ad..261539813 100644 --- a/storage/pkg/command/storagepubliclink.go +++ b/storage/pkg/command/storagepubliclink.go @@ -22,11 +22,11 @@ import ( func StoragePublicLink(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-public-link", - Usage: "Start storage-public-link service", + Usage: "start storage-public-link service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-public-link") }, - Category: "Extensions", + Category: "extensions", Action: func(c *cli.Context) error { logger := NewLogger(cfg) tracing.Configure(cfg, logger) diff --git a/storage/pkg/command/storageusers.go b/storage/pkg/command/storageusers.go index 7bb7aa6c0..7a2be81e8 100644 --- a/storage/pkg/command/storageusers.go +++ b/storage/pkg/command/storageusers.go @@ -23,7 +23,7 @@ import ( func StorageUsers(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-users", - Usage: "Start storage-users service", + Usage: "start storage-users service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-userprovider") }, diff --git a/storage/pkg/command/users.go b/storage/pkg/command/users.go index 34aee1d7c..c71a674b7 100644 --- a/storage/pkg/command/users.go +++ b/storage/pkg/command/users.go @@ -23,7 +23,7 @@ import ( func Users(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "users", - Usage: "Start users service", + Usage: "start users service", Before: func(c *cli.Context) error { return ParseConfig(c, cfg, "storage-users") }, diff --git a/store/pkg/command/health.go b/store/pkg/command/health.go index bc0b77b34..7b62857a3 100644 --- a/store/pkg/command/health.go +++ b/store/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/store/pkg/command/server.go b/store/pkg/command/server.go index 77df9d87b..eb0b7f8d6 100644 --- a/store/pkg/command/server.go +++ b/store/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" @@ -19,8 +20,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/store/pkg/command/version.go b/store/pkg/command/version.go index 91554c791..e976ef727 100644 --- a/store/pkg/command/version.go +++ b/store/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/thumbnails/pkg/command/health.go b/thumbnails/pkg/command/health.go index 5b232dc9e..3ac49f6b6 100644 --- a/thumbnails/pkg/command/health.go +++ b/thumbnails/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/thumbnails/pkg/command/server.go b/thumbnails/pkg/command/server.go index c47505705..f44b230d3 100644 --- a/thumbnails/pkg/command/server.go +++ b/thumbnails/pkg/command/server.go @@ -19,8 +19,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/thumbnails/pkg/command/version.go b/thumbnails/pkg/command/version.go index 45030313a..b909db37d 100644 --- a/thumbnails/pkg/command/version.go +++ b/thumbnails/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/web/pkg/command/health.go b/web/pkg/command/health.go index 5ab5887ea..c3c38ec4f 100644 --- a/web/pkg/command/health.go +++ b/web/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/web/pkg/command/server.go b/web/pkg/command/server.go index 016246d1e..f68d16a5d 100644 --- a/web/pkg/command/server.go +++ b/web/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "encoding/json" + "fmt" "io/ioutil" "github.com/oklog/run" @@ -19,8 +20,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/web/pkg/command/version.go b/web/pkg/command/version.go index 7b76bdcfe..783dd284e 100644 --- a/web/pkg/command/version.go +++ b/web/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled()) diff --git a/webdav/pkg/command/health.go b/webdav/pkg/command/health.go index 0a8e62486..f4485c6c1 100644 --- a/webdav/pkg/command/health.go +++ b/webdav/pkg/command/health.go @@ -13,8 +13,9 @@ import ( // Health is the entrypoint for the health command. func Health(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "health", - Usage: "Check health status", + Name: "health", + Usage: "check health status", + Category: "info", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/webdav/pkg/command/server.go b/webdav/pkg/command/server.go index 10dd88abf..3511d326c 100644 --- a/webdav/pkg/command/server.go +++ b/webdav/pkg/command/server.go @@ -2,6 +2,7 @@ package command import ( "context" + "fmt" "github.com/oklog/run" "github.com/owncloud/ocis/ocis-pkg/version" @@ -18,8 +19,9 @@ import ( // Server is the entrypoint for the server command. func Server(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "server", - Usage: "Start integrated server", + Name: "server", + Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name), + Category: "server", Before: func(c *cli.Context) error { return parser.ParseConfig(cfg) }, diff --git a/webdav/pkg/command/version.go b/webdav/pkg/command/version.go index f6649a41a..71b5b0d45 100644 --- a/webdav/pkg/command/version.go +++ b/webdav/pkg/command/version.go @@ -15,8 +15,9 @@ import ( // Version prints the service versions of all running instances. func Version(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "version", - Usage: "Print the versions of the running instances", + Name: "version", + Usage: "print the version of this binary and the running extension instances", + Category: "info", Action: func(c *cli.Context) error { fmt.Println("Version: " + version.String) fmt.Printf("Compiled: %s\n", version.Compiled())