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

View File

@@ -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.

View File

@@ -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)
},

View File

@@ -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 {

View File

@@ -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())

View File

@@ -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())

View File

@@ -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),

View File

@@ -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)
},

View File

@@ -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 {

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
}

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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",

View File

@@ -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",

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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",

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)
},

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)
},

View File

@@ -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),
}
}

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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

View File

@@ -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

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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)

View File

@@ -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)

View File

@@ -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")
},

View File

@@ -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")
},

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())

View File

@@ -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)
},

View File

@@ -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)
},

View File

@@ -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())