-
Notifications
You must be signed in to change notification settings - Fork 26
/
cli.go
44 lines (39 loc) · 1.93 KB
/
cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package cmd
import (
"errors"
)
var (
ErrNotRunning = errors.New("topaz is not running, use 'topaz start' or 'topaz run' to start")
ErrIsRunning = errors.New("topaz is already running, use 'topaz stop' to stop")
ErrNotServing = errors.New("topaz gRPC endpoint not SERVING")
)
type FormatVersion int
const (
V2 FormatVersion = 2
V3 FormatVersion = 3
)
type CLI struct {
Start StartCmd `cmd:"" help:"start topaz in daemon mode"`
Stop StopCmd `cmd:"" help:"stop topaz instance"`
Restart RestartCmd `cmd:"" help:"restart topaz instance"`
Status StatusCmd `cmd:"" help:"status of topaz daemon process"`
Run RunCmd `cmd:"" help:"run topaz in console mode"`
Manifest ManifestCmd `cmd:"" help:"manifest commands"`
Test TestCmd `cmd:"" help:"test assertions commands"`
Templates TemplateCmd `cmd:"" help:"template commands"`
Console ConsoleCmd `cmd:"" help:"open console in the browser"`
Import ImportCmd `cmd:"" help:"import directory objects"`
Export ExportCmd `cmd:"" help:"export directory objects"`
Backup BackupCmd `cmd:"" help:"backup directory data"`
Restore RestoreCmd `cmd:"" help:"restore directory data"`
Install InstallCmd `cmd:"" help:"install topaz container"`
Configure ConfigureCmd `cmd:"" help:"configure topaz service"`
Certs CertsCmd `cmd:"" help:"cert commands"`
Update UpdateCmd `cmd:"" help:"update topaz container version"`
Uninstall UninstallCmd `cmd:"" help:"uninstall topaz container"`
Load LoadCmd `cmd:"" help:"load manifest from file (DEPRECATED)" hidden:""`
Save SaveCmd `cmd:"" help:"save manifest to file (DEPRECATED)" hidden:""`
Version VersionCmd `cmd:"" help:"version information"`
NoCheck bool `name:"no-check" short:"N" env:"TOPAZ_NO_CHECK" help:"disable local container status check"`
LogLevel int `name:"log" short:"L" type:"counter" default:"0" help:"log level"`
}