Files

34 lines
717 B
Go
Raw Permalink Normal View History

package command
import (
"os"
2022-05-04 14:49:59 +02:00
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
2022-06-20 16:49:06 +02:00
"github.com/owncloud/ocis/v2/services/web/pkg/config"
"github.com/urfave/cli/v2"
)
2022-01-03 13:53:27 +01:00
// GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) cli.Commands {
return []*cli.Command{
// start this service
Server(cfg),
// interaction with this service
// infos about this service
Health(cfg),
Version(cfg),
}
}
2020-12-09 14:01:37 +01:00
// Execute is the entry point for the web command.
2021-03-04 14:33:16 +01:00
func Execute(cfg *config.Config) error {
2022-01-03 13:53:27 +01:00
app := clihelper.DefaultApp(&cli.App{
Name: "web",
Usage: "Serve ownCloud Web for oCIS",
2022-01-03 13:53:27 +01:00
Commands: GetCommands(cfg),
})
2024-07-24 13:30:42 +02:00
return app.RunContext(cfg.Context, os.Args)
}