mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-19 02:40:16 -06:00
30 lines
630 B
Go
30 lines
630 B
Go
package command
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
|
|
"github.com/owncloud/ocis/v2/services/antivirus/pkg/config"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// GetCommands provides all commands for this service
|
|
func GetCommands(cfg *config.Config) cli.Commands {
|
|
return []*cli.Command{
|
|
Server(cfg),
|
|
Health(cfg),
|
|
Version(cfg),
|
|
}
|
|
}
|
|
|
|
// Execute is the entry point for the antivirus command.
|
|
func Execute(cfg *config.Config) error {
|
|
app := clihelper.DefaultApp(&cli.App{
|
|
Name: "antivirus",
|
|
Usage: "Serve ownCloud antivirus for oCIS",
|
|
Commands: GetCommands(cfg),
|
|
})
|
|
|
|
return app.Run(os.Args)
|
|
}
|