Files

35 lines
756 B
Go
Raw Permalink Normal View History

2019-12-04 17:15:11 +01:00
package command
import (
"os"
2022-05-04 14:49:59 +02:00
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
"github.com/urfave/cli/v2"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
2019-12-04 17:15:11 +01:00
)
2022-01-03 13:53:27 +01:00
// GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) cli.Commands {
return append([]*cli.Command{
2022-01-03 13:53:27 +01:00
// start this service
Server(cfg),
// interaction with this service
// infos about this service
Health(cfg),
Version(cfg),
}, UnifiedRoles(cfg)...)
2022-01-03 13:53:27 +01:00
}
2019-12-04 17:15:11 +01:00
// Execute is the entry point for the ocis-graph command.
2021-03-15 15:17:29 +00:00
func Execute(cfg *config.Config) error {
2022-01-03 13:53:27 +01:00
app := clihelper.DefaultApp(&cli.App{
Name: "graph",
Usage: "Serve Graph API 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)
2019-12-04 17:15:11 +01:00
}