Files

35 lines
747 B
Go
Raw Permalink Normal View History

2022-02-17 09:23:17 +01:00
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/idm/pkg/config"
2022-02-17 09:23:17 +01:00
"github.com/urfave/cli/v2"
)
// 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
2022-08-09 07:28:03 +00:00
ResetPassword(cfg),
2022-02-17 09:23:17 +01:00
// infos about this service
Health(cfg),
Version(cfg),
}
}
// Execute is the entry point for the ocis-idm command.
func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cli.App{
Name: "idm",
2022-02-17 09:23:17 +01:00
Usage: "Embedded LDAP service for oCIS",
Commands: GetCommands(cfg),
})
2024-07-24 13:30:42 +02:00
return app.RunContext(cfg.Context, os.Args)
2022-02-17 09:23:17 +01:00
}