//go:build !simple // +build !simple package command import ( "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis/pkg/register" "github.com/owncloud/ocis/proxy/pkg/command" "github.com/urfave/cli/v2" ) // 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", Subcommands: []*cli.Command{ command.PrintVersion(cfg.Proxy), }, Before: func(ctx *cli.Context) error { return ParseConfig(ctx, cfg) }, Action: func(c *cli.Context) error { cfg.Proxy.Log = cfg.Log origCmd := command.Server(cfg.Proxy) return handleOriginalAction(c, origCmd) }, } } func init() { register.AddCommand(ProxyCommand) }