cmd

package
v0.20.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRunning = errors.New("topaz is not running, use 'topaz start' or 'topaz run' to start")

Functions

func CheckRunning added in v0.20.17

func CheckRunning(c *cc.CommonCtx) error

func CreateCertsDir added in v0.20.8

func CreateCertsDir() (string, error)

func CreateConfigDir

func CreateConfigDir() (string, error)

func CreateDataDir added in v0.20.8

func CreateDataDir() (string, error)

func WriteConfig

func WriteConfig(w io.Writer, templ string, params *templateParams) error

Types

type BackupCmd

type BackupCmd struct {
	File string `arg:""  default:"backup.tar.gz" help:"absolute file path to make backup to"`
	clients.Config
}

func (*BackupCmd) Run added in v0.0.16

func (cmd *BackupCmd) Run(c *cc.CommonCtx) error

type CLI

type CLI struct {
	Backup    BackupCmd    `cmd:"" help:"backup directory data"`
	Configure ConfigureCmd `cmd:"" help:"configure topaz service"`
	Export    ExportCmd    `cmd:"" help:"export directory objects"`
	Install   InstallCmd   `cmd:"" help:"install topaz"`
	Import    ImportCmd    `cmd:"" help:"import directory objects"`
	Load      LoadCmd      `cmd:"" help:"load a manifest file"`
	Restore   RestoreCmd   `cmd:"" help:"restore directory data"`
	Run       RunCmd       `cmd:"" help:""`
	Save      SaveCmd      `cmd:"" help:"save a manifest file"`
	Start     StartCmd     `cmd:"" help:"start topaz instance"`
	Status    StatusCmd    `cmd:"" help:"display topaz instance status"`
	Stop      StopCmd      `cmd:"" help:"stop topaz instance"`
	Update    UpdateCmd    `cmd:"" help:"update topaz container version"`
	Version   VersionCmd   `cmd:"" help:"version information"`
	Uninstall UninstallCmd `cmd:"" help:"uninstall topaz, removes all locally installed artifacts"`
	NoCheck   bool         `name:"no-check" hidden:"" env:"TOPAZ_NO_CHECK" help:"disable running check"`
}

type ConfigureCmd

type ConfigureCmd struct {
	PolicyName    string `arg:"" required:"" help:"policy name"`
	Resource      string `short:"r" required:"" help:"resource url"`
	Stdout        bool   `short:"p" help:"generated configuration is printed to stdout but not saved"`
	EdgeDirectory bool   `short:"d" help:"enable edge directory" default:"false"`
	SeedMetadata  bool   `short:"s" help:"enable seed metadata" default:"false"`
}

func (ConfigureCmd) Run

func (cmd ConfigureCmd) Run(c *cc.CommonCtx) error

type ExportCmd

type ExportCmd struct {
	Directory string `short:"d" required:"" help:"directory to write .json data"`
	clients.Config
}

func (*ExportCmd) Run added in v0.20.7

func (cmd *ExportCmd) Run(c *cc.CommonCtx) error

type ImportCmd

type ImportCmd struct {
	Directory string `short:"d" required:"" help:"directory containing .json data"`
	clients.Config
}

func (*ImportCmd) Run added in v0.20.0

func (cmd *ImportCmd) Run(c *cc.CommonCtx) error

type InstallCmd

type InstallCmd struct {
	ContainerName    string `optional:""  default:"topaz" help:"container name"`
	ContainerVersion string `optional:""  default:"latest" help:"container version"`
}

func (InstallCmd) Run

func (cmd InstallCmd) Run(c *cc.CommonCtx) error

type LoadCmd

type LoadCmd struct {
	File string `arg:""  default:"manifest.yaml" help:"absolute path to manifest file"`
	clients.Config
}

func (*LoadCmd) Run added in v0.20.0

func (cmd *LoadCmd) Run(c *cc.CommonCtx) error

type RestoreCmd

type RestoreCmd struct {
	File string `arg:""  default:"backup.tar.gz" help:"absolute file path to local backup tarball"`
	clients.Config
}

func (*RestoreCmd) Run added in v0.0.16

func (cmd *RestoreCmd) Run(c *cc.CommonCtx) error

type RunCmd

type RunCmd struct {
	ContainerName    string   `optional:"" default:"topaz" help:"container name"`
	ContainerVersion string   `optional:"" default:"latest" help:"container version" `
	Hostname         string   `optional:"" help:"hostname for docker to set"`
	Env              []string `optional:"" short:"e" help:"additional environment variable names to be passed to container"`
}

func (*RunCmd) Run

func (cmd *RunCmd) Run(c *cc.CommonCtx) error

type SaveCmd

type SaveCmd struct {
	File string `arg:""  default:"manifest.yaml" help:"absolute path to manifest file"`
	clients.Config
}

func (*SaveCmd) Run added in v0.20.7

func (cmd *SaveCmd) Run(c *cc.CommonCtx) error

type StartCmd

type StartCmd struct {
	ContainerName    string   `optional:"" default:"topaz" help:"container name"`
	ContainerVersion string   `optional:"" default:"latest" help:"container version" `
	Hostname         string   `optional:"" help:"hostname for docker to set"`
	Env              []string `optional:"" short:"e" help:"additional environment variable names to be passed to container"`
}

func (*StartCmd) Run

func (cmd *StartCmd) Run(c *cc.CommonCtx) error

type StatusCmd

type StatusCmd struct{}

func (StatusCmd) Run

func (cmd StatusCmd) Run(c *cc.CommonCtx) error

type StopCmd

type StopCmd struct{}

func (StopCmd) Run

func (cmd StopCmd) Run(c *cc.CommonCtx) error

type UninstallCmd

type UninstallCmd struct{}

func (UninstallCmd) Run

func (cmd UninstallCmd) Run(c *cc.CommonCtx) error

type UpdateCmd added in v0.20.19

type UpdateCmd struct {
	ContainerName    string `optional:"" default:"topaz" help:"container name"`
	ContainerVersion string `optional:"" default:"latest" help:"container version" `
	Hostname         string `optional:"" help:"hostname for docker to set"`
}

func (UpdateCmd) Run added in v0.20.19

func (cmd UpdateCmd) Run(c *cc.CommonCtx) error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(c *cc.CommonCtx) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL