Files

34 lines
729 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/thumbnails/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),
}
}
// Execute is the entry point for the ocis-thumbnails command.
2021-03-04 14:08:44 +01:00
func Execute(cfg *config.Config) error {
2022-01-03 13:53:27 +01:00
app := clihelper.DefaultApp(&cli.App{
Name: "thumbnails",
Usage: "Example usage",
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)
}