This repository has been archived on 2021-07-16. You can view files and clone it, but cannot push or open issues or pull requests.
go-abra/cli/app.go

105 lines
2.0 KiB
Go
Raw Normal View History

package cli
import "github.com/urfave/cli/v2"
var appNewCommand = &cli.Command{
Name: "new",
Flags: []cli.Flag{
ServerFlag,
DomainFlag,
AppNameFlag,
PassFlag,
SecretsFlag,
},
}
var appDeployCommand = &cli.Command{
Name: "deploy",
Flags: []cli.Flag{
UpdateFlag,
ForceFlag,
SkipVersionCheckFlag,
NoDomainPollFlag,
},
}
var appUndeployCommand = &cli.Command{
Name: "undeploy",
}
var appBackupCommand = &cli.Command{
Name: "backup",
Flags: []cli.Flag{AllFlag},
}
var appRestoreCommand = &cli.Command{
Name: "restore",
Flags: []cli.Flag{AllFlag},
ArgsUsage: "<service> [<backup file>]",
}
var appListCommand = &cli.Command{
Name: "list",
Aliases: []string{"ls"},
Flags: []cli.Flag{StatusFlag, ServerFlag, TypeFlag},
}
var appCheckCommand = &cli.Command{
Name: "check",
}
var appCpCommand = &cli.Command{
Name: "cp",
ArgsUsage: "<src> <dst>",
}
var appConfigCommand = &cli.Command{
Name: "config",
}
var appLogsCommand = &cli.Command{
Name: "logs",
ArgsUsage: "[<service>]",
}
var appPsCommand = &cli.Command{
Name: "ps",
}
var appRemoveCommand = &cli.Command{
Name: "remove",
Flags: []cli.Flag{VolumesFlag, SecretsFlag},
}
var appRunCommand = &cli.Command{
Name: "run",
Flags: []cli.Flag{
NoTTYFlag,
UserFlag,
},
ArgsUsage: "<service> <args>...",
}
var appRollbackCommand = &cli.Command{
Name: "rollback",
ArgsUsage: "[<version>]",
}
// TODO: Replicating what the bash abra does might be hard
// with the mix of subcommands and flags
var appSecretCommand = &cli.Command{
Name: "secret",
Flags: []cli.Flag{AllFlag, PassFlag},
}
var AppCommand = &cli.Command{
Name: "app",
HideHelp: true,
Subcommands: []*cli.Command{
appNewCommand,
appConfigCommand,
appDeployCommand,
appUndeployCommand,
appBackupCommand,
appRestoreCommand,
appRemoveCommand,
appCheckCommand,
appListCommand,
appPsCommand,
appLogsCommand,
appCpCommand,
appRunCommand,
appRollbackCommand,
appSecretCommand,
},
}