improve command description

This commit is contained in:
Willy Kloucek
2022-01-07 13:19:39 +01:00
parent f917691996
commit d9744ebda7
86 changed files with 234 additions and 178 deletions
+5 -4
View File
@@ -16,10 +16,11 @@ func AddAccount(cfg *config.Config) *cli.Command {
PasswordProfile: &accounts.PasswordProfile{}, PasswordProfile: &accounts.PasswordProfile{},
} }
return &cli.Command{ return &cli.Command{
Name: "add", Name: "add",
Usage: "Create a new account", Usage: "create a new account",
Aliases: []string{"create", "a"}, Category: "account management",
Flags: flagset.AddAccountWithConfig(cfg, a), Aliases: []string{"create", "a"},
Flags: flagset.AddAccountWithConfig(cfg, a),
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
// Write value of username to the flags beneath, as preferred name // Write value of username to the flags beneath, as preferred name
// and on-premises-sam-account-name is probably confusing for users. // and on-premises-sam-account-name is probably confusing for users.
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+2 -1
View File
@@ -18,7 +18,8 @@ import (
func InspectAccount(cfg *config.Config) *cli.Command { func InspectAccount(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "inspect", Name: "inspect",
Usage: "Show detailed data on an existing account", Usage: "show detailed data on an existing account",
Category: "account management",
ArgsUsage: "id", ArgsUsage: "id",
Flags: flagset.InspectAccountWithConfig(cfg), Flags: flagset.InspectAccountWithConfig(cfg),
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
+5 -4
View File
@@ -17,10 +17,11 @@ import (
// ListAccounts command lists all accounts // ListAccounts command lists all accounts
func ListAccounts(cfg *config.Config) *cli.Command { func ListAccounts(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "list", Name: "list",
Usage: "List existing accounts", Usage: "list existing accounts",
Aliases: []string{"ls"}, Category: "account management",
Flags: flagset.ListAccountsWithConfig(cfg), Aliases: []string{"ls"},
Flags: flagset.ListAccountsWithConfig(cfg),
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
accSvcID := cfg.GRPC.Namespace + "." + cfg.Service.Name accSvcID := cfg.GRPC.Namespace + "." + cfg.Service.Name
accSvc := accounts.NewAccountsService(accSvcID, grpc.NewClient()) accSvc := accounts.NewAccountsService(accSvcID, grpc.NewClient())
+4 -3
View File
@@ -14,9 +14,10 @@ import (
// RebuildIndex rebuilds the entire configured index. // RebuildIndex rebuilds the entire configured index.
func RebuildIndex(cdf *config.Config) *cli.Command { func RebuildIndex(cdf *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "rebuildIndex", Name: "rebuildIndex",
Usage: "Rebuilds the service's index, i.e. deleting and then re-adding all existing documents", Usage: "rebuilds the service's index, i.e. deleting and then re-adding all existing documents",
Aliases: []string{"rebuild", "ri"}, Category: "account management",
Aliases: []string{"rebuild", "ri"},
Action: func(ctx *cli.Context) error { Action: func(ctx *cli.Context) error {
idxSvcID := "com.owncloud.api.accounts" idxSvcID := "com.owncloud.api.accounts"
idxSvc := index.NewIndexService(idxSvcID, grpc.NewClient()) idxSvc := index.NewIndexService(idxSvcID, grpc.NewClient())
+2 -1
View File
@@ -16,7 +16,8 @@ import (
func RemoveAccount(cfg *config.Config) *cli.Command { func RemoveAccount(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "remove", Name: "remove",
Usage: "Removes an existing account", Usage: "removes an existing account",
Category: "account management",
ArgsUsage: "id", ArgsUsage: "id",
Aliases: []string{"rm"}, Aliases: []string{"rm"},
Flags: flagset.RemoveAccountWithConfig(cfg), Flags: flagset.RemoveAccountWithConfig(cfg),
+4 -3
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
"github.com/owncloud/ocis/accounts/pkg/config" "github.com/owncloud/ocis/accounts/pkg/config"
@@ -20,9 +21,9 @@ import (
// Server is the entry point for the server command. // Server is the entry point for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start ocis accounts service", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Description: "uses an LDAP server as the storage backend", Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+1
View File
@@ -21,6 +21,7 @@ func UpdateAccount(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "update", Name: "update",
Usage: "Make changes to an existing account", Usage: "Make changes to an existing account",
Category: "account management",
ArgsUsage: "id", ArgsUsage: "id",
Flags: flagset.UpdateAccountWithConfig(cfg, a), Flags: flagset.UpdateAccountWithConfig(cfg, a),
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
glauthcfg "github.com/glauth/glauth/v2/pkg/config" glauthcfg "github.com/glauth/glauth/v2/pkg/config"
"github.com/oklog/run" "github.com/oklog/run"
@@ -22,8 +23,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+4 -3
View File
@@ -13,10 +13,11 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig( cfg) return parser.ParseConfig(cfg)
}, },
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
"github.com/owncloud/ocis/graph-explorer/pkg/config" "github.com/owncloud/ocis/graph-explorer/pkg/config"
@@ -18,8 +19,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
"github.com/owncloud/ocis/graph/pkg/config" "github.com/owncloud/ocis/graph/pkg/config"
@@ -18,8 +19,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
"github.com/owncloud/ocis/idp/pkg/config" "github.com/owncloud/ocis/idp/pkg/config"
@@ -18,8 +19,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// AccountsCommand is the entrypoint for the accounts command. // AccountsCommand is the entrypoint for the accounts command.
func AccountsCommand(cfg *config.Config) *cli.Command { func AccountsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "accounts", Name: cfg.Accounts.Service.Name,
Usage: "Start accounts server", Usage: subcommandDescription(cfg.Accounts.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+9 -1
View File
@@ -1,6 +1,10 @@
package command package command
import "github.com/urfave/cli/v2" import (
"fmt"
"github.com/urfave/cli/v2"
)
func handleOriginalAction(c *cli.Context, cmd *cli.Command) error { 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) return cli.HandleAction(cmd.Action, c)
} }
func subcommandDescription(serviceName string) string {
return fmt.Sprintf("%s extension commands", serviceName)
}
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// GLAuthCommand is the entrypoint for the glauth command. // GLAuthCommand is the entrypoint for the glauth command.
func GLAuthCommand(cfg *config.Config) *cli.Command { func GLAuthCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "glauth", Name: cfg.GLAuth.Service.Name,
Usage: "Start glauth server", Usage: subcommandDescription(cfg.GLAuth.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// GraphCommand is the entrypoint for the graph command. // GraphCommand is the entrypoint for the graph command.
func GraphCommand(cfg *config.Config) *cli.Command { func GraphCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "graph", Name: cfg.Graph.Service.Name,
Usage: "Start graph server", Usage: subcommandDescription(cfg.Graph.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// GraphExplorerCommand is the entrypoint for the graph-explorer command. // GraphExplorerCommand is the entrypoint for the graph-explorer command.
func GraphExplorerCommand(cfg *config.Config) *cli.Command { func GraphExplorerCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "graph-explorer", Name: cfg.GraphExplorer.Service.Name,
Usage: "Start graph-explorer server", Usage: subcommandDescription(cfg.GraphExplorer.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// IDPCommand is the entrypoint for the idp command. // IDPCommand is the entrypoint for the idp command.
func IDPCommand(cfg *config.Config) *cli.Command { func IDPCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "idp", Name: cfg.IDP.Service.Name,
Usage: "Start idp server", Usage: subcommandDescription(cfg.IDP.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+2 -2
View File
@@ -16,8 +16,8 @@ import (
func KillCommand(cfg *config.Config) *cli.Command { func KillCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "kill", Name: "kill",
Usage: "Kill an extension by name", Usage: "kill an extension by name in the runtime (supervised mode)",
Category: "Runtime", Category: "runtime",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "hostname", Name: "hostname",
+2 -2
View File
@@ -15,8 +15,8 @@ import (
func ListCommand(cfg *config.Config) *cli.Command { func ListCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "list", Name: "list",
Usage: "Lists running ocis extensions", Usage: "list oCIS extensions running in the runtime (supervised mode)",
Category: "Runtime", Category: "runtime",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "hostname", Name: "hostname",
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// OCSCommand is the entrypoint for the ocs command. // OCSCommand is the entrypoint for the ocs command.
func OCSCommand(cfg *config.Config) *cli.Command { func OCSCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "ocs", Name: cfg.OCS.Service.Name,
Usage: "Start ocs server", Usage: subcommandDescription(cfg.OCS.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// ProxyCommand is the entry point for the proxy command. // ProxyCommand is the entry point for the proxy command.
func ProxyCommand(cfg *config.Config) *cli.Command { func ProxyCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "proxy", Name: cfg.Proxy.Service.Name,
Usage: "Start proxy server", Usage: subcommandDescription(cfg.Proxy.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+2 -2
View File
@@ -17,8 +17,8 @@ import (
func RunCommand(cfg *config.Config) *cli.Command { func RunCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "run", Name: "run",
Usage: "Runs an extension", Usage: "run an extension by name in the runtime (supervised mode)",
Category: "Runtime", Category: "runtime",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "hostname", Name: "hostname",
+2 -2
View File
@@ -13,8 +13,8 @@ import (
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start fullstack server", Usage: "start a fullstack server (runtime and all extensions in supervised mode)",
Category: "Fullstack", Category: "fullstack",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// SettingsCommand is the entry point for the settings command. // SettingsCommand is the entry point for the settings command.
func SettingsCommand(cfg *config.Config) *cli.Command { func SettingsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "settings", Name: cfg.Settings.Service.Name,
Usage: "Start settings server", Usage: subcommandDescription(cfg.Settings.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageAppProviderCommand(cfg *config.Config) *cli.Command { func StorageAppProviderCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-app-provider", Name: "storage-app-provider",
Usage: "Start storage app-provider service", Usage: "start storage app-provider service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.AppProviderWithConfig(cfg.Storage), //Flags: flagset.AppProviderWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageAuthBasicCommand(cfg *config.Config) *cli.Command { func StorageAuthBasicCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-auth-basic", Name: "storage-auth-basic",
Usage: "Start storage auth-basic service", Usage: "start storage auth-basic service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.AuthBasicWithConfig(cfg.Storage), //Flags: flagset.AuthBasicWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+1 -1
View File
@@ -12,7 +12,7 @@ func StorageAuthBearerCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-auth-bearer", Name: "storage-auth-bearer",
Usage: "Start storage auth-bearer service", Usage: "Start storage auth-bearer service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.AuthBearerWithConfig(cfg.Storage), //Flags: flagset.AuthBearerWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageAuthMachineCommand(cfg *config.Config) *cli.Command { func StorageAuthMachineCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-auth-machine", Name: "storage-auth-machine",
Usage: "Start storage auth-machine service", Usage: "start storage auth-machine service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.AuthMachineWithConfig(cfg.Storage), //Flags: flagset.AuthMachineWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageFrontendCommand(cfg *config.Config) *cli.Command { func StorageFrontendCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-frontend", Name: "storage-frontend",
Usage: "Start storage frontend", Usage: "start storage frontend",
Category: "Extensions", Category: "extensions",
//Flags: flagset.FrontendWithConfig(cfg.Storage), //Flags: flagset.FrontendWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageGatewayCommand(cfg *config.Config) *cli.Command { func StorageGatewayCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-gateway", Name: "storage-gateway",
Usage: "Start storage gateway", Usage: "start storage gateway",
Category: "Extensions", Category: "extensions",
//Flags: flagset.GatewayWithConfig(cfg.Storage), //Flags: flagset.GatewayWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageGroupProviderCommand(cfg *config.Config) *cli.Command { func StorageGroupProviderCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-groupprovider", Name: "storage-groupprovider",
Usage: "Start storage groupprovider service", Usage: "start storage groupprovider service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.GroupsWithConfig(cfg.Storage), //Flags: flagset.GroupsWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageHomeCommand(cfg *config.Config) *cli.Command { func StorageHomeCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-home", Name: "storage-home",
Usage: "Start storage and data provider for /home mount", Usage: "start storage and data provider for /home mount",
Category: "Extensions", Category: "extensions",
//Flags: flagset.StorageHomeWithConfig(cfg.Storage), //Flags: flagset.StorageHomeWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageMetadataCommand(cfg *config.Config) *cli.Command { func StorageMetadataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-metadata", Name: "storage-metadata",
Usage: "Start storage and data service for metadata", Usage: "start storage and data service for metadata",
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
}, },
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StoragePublicLinkCommand(cfg *config.Config) *cli.Command { func StoragePublicLinkCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-public-link", Name: "storage-public-link",
Usage: "Start storage public link storage", Usage: "start storage public link storage",
Category: "Extensions", Category: "extensions",
//Flags: flagset.StoragePublicLink(cfg.Storage), //Flags: flagset.StoragePublicLink(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageSharingCommand(cfg *config.Config) *cli.Command { func StorageSharingCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-sharing", Name: "storage-sharing",
Usage: "Start storage sharing service", Usage: "start storage sharing service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.SharingWithConfig(cfg.Storage), //Flags: flagset.SharingWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageUserProviderCommand(cfg *config.Config) *cli.Command { func StorageUserProviderCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-userprovider", Name: "storage-userprovider",
Usage: "Start storage userprovider service", Usage: "start storage userprovider service",
Category: "Extensions", Category: "extensions",
//Flags: flagset.UsersWithConfig(cfg.Storage), //Flags: flagset.UsersWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+2 -2
View File
@@ -11,8 +11,8 @@ import (
func StorageUsersCommand(cfg *config.Config) *cli.Command { func StorageUsersCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-users", Name: "storage-users",
Usage: "Start storage and data provider for /users mount", Usage: "start storage and data provider for /users mount",
Category: "Extensions", Category: "extensions",
//Flags: flagset.StorageUsersWithConfig(cfg.Storage), //Flags: flagset.StorageUsersWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg) return ParseStorageCommon(ctx, cfg)
+3 -3
View File
@@ -12,9 +12,9 @@ import (
func StoreCommand(cfg *config.Config) *cli.Command { func StoreCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "store", Name: cfg.Store.Service.Name,
Usage: "Start a go-micro store", Usage: subcommandDescription(cfg.Store.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -7
View File
@@ -11,16 +11,12 @@ import (
// ThumbnailsCommand is the entrypoint for the thumbnails command. // ThumbnailsCommand is the entrypoint for the thumbnails command.
func ThumbnailsCommand(cfg *config.Config) *cli.Command { func ThumbnailsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "thumbnails", Name: cfg.Thumbnails.Service.Name,
Usage: "Start thumbnails server", Usage: subcommandDescription(cfg.Thumbnails.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
Action: func(c *cli.Context) error {
origCmd := command.Server(cfg.Thumbnails)
return handleOriginalAction(c, origCmd)
},
Subcommands: command.GetCommands(cfg.Thumbnails), Subcommands: command.GetCommands(cfg.Thumbnails),
} }
} }
+2 -2
View File
@@ -17,8 +17,8 @@ import (
func VersionCommand(cfg *config.Config) *cli.Command { func VersionCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Lists running services with version", Usage: "print the version of this binary and all running extension instances",
Category: "Runtime", Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -3
View File
@@ -11,9 +11,9 @@ import (
// WebCommand is the entrypoint for the web command. // WebCommand is the entrypoint for the web command.
func WebCommand(cfg *config.Config) *cli.Command { func WebCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "web", Name: cfg.Web.Service.Name,
Usage: "Start web server", Usage: subcommandDescription(cfg.Web.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -3
View File
@@ -12,9 +12,9 @@ import (
func WebDAVCommand(cfg *config.Config) *cli.Command { func WebDAVCommand(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "webdav", Name: cfg.WebDAV.Service.Name,
Usage: "Start webdav server", Usage: subcommandDescription(cfg.WebDAV.Service.Name),
Category: "Extensions", Category: "extensions",
Before: func(ctx *cli.Context) error { Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/owncloud/ocis/ocis-pkg/version" "github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/ocs/pkg/config/parser" "github.com/owncloud/ocis/ocs/pkg/config/parser"
@@ -19,8 +20,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -3,6 +3,7 @@ package command
import ( import (
"context" "context"
"crypto/tls" "crypto/tls"
"fmt"
"net/http" "net/http"
"time" "time"
@@ -36,8 +37,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "Print the version of this binary and the running extension instances",
Category: "Version",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
"github.com/owncloud/ocis/ocis-pkg/version" "github.com/owncloud/ocis/ocis-pkg/version"
@@ -19,8 +20,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+1 -1
View File
@@ -22,7 +22,7 @@ import (
func AppProvider(cfg *config.Config) *cli.Command { func AppProvider(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "app-provider", Name: "app-provider",
Usage: "Start appprovider for providing apps", Usage: "start appprovider for providing apps",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-app-provider") return ParseConfig(c, cfg, "storage-app-provider")
}, },
+1 -1
View File
@@ -23,7 +23,7 @@ import (
func AuthBasic(cfg *config.Config) *cli.Command { func AuthBasic(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "auth-basic", Name: "auth-basic",
Usage: "Start authprovider for basic auth", Usage: "start authprovider for basic auth",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-auth-basic") return ParseConfig(c, cfg, "storage-auth-basic")
}, },
+1 -1
View File
@@ -22,7 +22,7 @@ import (
func AuthBearer(cfg *config.Config) *cli.Command { func AuthBearer(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "auth-bearer", Name: "auth-bearer",
Usage: "Start authprovider for bearer auth", Usage: "start authprovider for bearer auth",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-auth-bearer") return ParseConfig(c, cfg, "storage-auth-bearer")
}, },
+1 -1
View File
@@ -22,7 +22,7 @@ import (
func AuthMachine(cfg *config.Config) *cli.Command { func AuthMachine(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "auth-machine", Name: "auth-machine",
Usage: "Start authprovider for machine auth", Usage: "start authprovider for machine auth",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-auth-machine") return ParseConfig(c, cfg, "storage-auth-machine")
}, },
+1 -1
View File
@@ -26,7 +26,7 @@ import (
func Frontend(cfg *config.Config) *cli.Command { func Frontend(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "frontend", Name: "frontend",
Usage: "Start frontend service", Usage: "start frontend service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := loadUserAgent(c, cfg); err != nil { if err := loadUserAgent(c, cfg); err != nil {
return err return err
+1 -1
View File
@@ -30,7 +30,7 @@ import (
func Gateway(cfg *config.Config) *cli.Command { func Gateway(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "gateway", Name: "gateway",
Usage: "Start gateway", Usage: "start gateway",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
if err := ParseConfig(c, cfg, "storage-gateway"); err != nil { if err := ParseConfig(c, cfg, "storage-gateway"); err != nil {
return err return err
+1 -1
View File
@@ -23,7 +23,7 @@ import (
func Groups(cfg *config.Config) *cli.Command { func Groups(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "groups", Name: "groups",
Usage: "Start groups service", Usage: "start groups service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-groups") return ParseConfig(c, cfg, "storage-groups")
}, },
+3 -2
View File
@@ -11,8 +11,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage") return ParseConfig(c, cfg, "storage")
}, },
+1 -1
View File
@@ -25,7 +25,7 @@ import (
func Sharing(cfg *config.Config) *cli.Command { func Sharing(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "sharing", Name: "sharing",
Usage: "Start sharing service", Usage: "start sharing service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-sharing") return ParseConfig(c, cfg, "storage-sharing")
}, },
+1 -1
View File
@@ -24,7 +24,7 @@ import (
func StorageHome(cfg *config.Config) *cli.Command { func StorageHome(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-home", Name: "storage-home",
Usage: "Start storage-home service", Usage: "start storage-home service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-home") return ParseConfig(c, cfg, "storage-home")
}, },
+2 -2
View File
@@ -28,11 +28,11 @@ import (
func StorageMetadata(cfg *config.Config) *cli.Command { func StorageMetadata(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-metadata", Name: "storage-metadata",
Usage: "Start storage-metadata service", Usage: "start storage-metadata service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-metadata") return ParseConfig(c, cfg, "storage-metadata")
}, },
Category: "Extensions", Category: "extensions",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
logger := NewLogger(cfg) logger := NewLogger(cfg)
tracing.Configure(cfg, logger) tracing.Configure(cfg, logger)
+2 -2
View File
@@ -22,11 +22,11 @@ import (
func StoragePublicLink(cfg *config.Config) *cli.Command { func StoragePublicLink(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-public-link", Name: "storage-public-link",
Usage: "Start storage-public-link service", Usage: "start storage-public-link service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-public-link") return ParseConfig(c, cfg, "storage-public-link")
}, },
Category: "Extensions", Category: "extensions",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
logger := NewLogger(cfg) logger := NewLogger(cfg)
tracing.Configure(cfg, logger) tracing.Configure(cfg, logger)
+1 -1
View File
@@ -23,7 +23,7 @@ import (
func StorageUsers(cfg *config.Config) *cli.Command { func StorageUsers(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "storage-users", Name: "storage-users",
Usage: "Start storage-users service", Usage: "start storage-users service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-userprovider") return ParseConfig(c, cfg, "storage-userprovider")
}, },
+1 -1
View File
@@ -23,7 +23,7 @@ import (
func Users(cfg *config.Config) *cli.Command { func Users(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "users", Name: "users",
Usage: "Start users service", Usage: "start users service",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return ParseConfig(c, cfg, "storage-users") return ParseConfig(c, cfg, "storage-users")
}, },
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
@@ -19,8 +20,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -19,8 +19,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -3,6 +3,7 @@ package command
import ( import (
"context" "context"
"encoding/json" "encoding/json"
"fmt"
"io/ioutil" "io/ioutil"
"github.com/oklog/run" "github.com/oklog/run"
@@ -19,8 +20,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
+3 -2
View File
@@ -13,8 +13,9 @@ import (
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command { func Health(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "health", Name: "health",
Usage: "Check health status", Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+4 -2
View File
@@ -2,6 +2,7 @@ package command
import ( import (
"context" "context"
"fmt"
"github.com/oklog/run" "github.com/oklog/run"
"github.com/owncloud/ocis/ocis-pkg/version" "github.com/owncloud/ocis/ocis-pkg/version"
@@ -18,8 +19,9 @@ import (
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command { func Server(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "server", Name: "server",
Usage: "Start integrated server", Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error { Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg) return parser.ParseConfig(cfg)
}, },
+3 -2
View File
@@ -15,8 +15,9 @@ import (
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command { func Version(cfg *config.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "version", Name: "version",
Usage: "Print the versions of the running instances", Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String) fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())