cli

package
v0.0.0-...-50ffc52 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotPermitted = errors.New("operation not permitted")

Functions

func Main

func Main(w io.Writer, args []string) error

Main is the main entrypoint to our Grreeting CLI used by the actual main program as a wrapper to faviliate integration testing

func NewBoxCommand

func NewBoxCommand() *cobra.Command

NewBoxCommand returns the root cobra.Command for box.

func NewBuildCommand

func NewBuildCommand() *cobra.Command

NewBuildCommand implements and returns the build command.

func NewDoctorCommand

func NewDoctorCommand() *cobra.Command

NewDoctorCommand implements and returns the version command.

func NewExecCommand

func NewExecCommand() *cobra.Command

NewExecCommand implements and returns the exec command.

func NewImagesCommand

func NewImagesCommand() *cobra.Command

NewImagesCommand implements and returns the images command.

func NewInitCommand

func NewInitCommand() *cobra.Command

NewInitCommand implements and returns init command. init command is called by reexec to apply namespaces.

It is a hidden command and requires root path and container id to run.

func NewPsCommand

func NewPsCommand() *cobra.Command

NewPsCommand implements and returns the ps command.

func NewPullCommand

func NewPullCommand() *cobra.Command

NewPullCommand implements and returns the pull command.

func NewRmCommand

func NewRmCommand() *cobra.Command

NewRmCommand implements and returns the rm command.

func NewRmiCommand

func NewRmiCommand() *cobra.Command

NewRmiCommand implements and returns the rmi command.

func NewRunCommand

func NewRunCommand() *cobra.Command

NewRunCommand implements and returns the run command.

func NewStopCommand

func NewStopCommand() *cobra.Command

NewStopCommand implements and returns the stop command.

func NewVersionCommand

func NewVersionCommand() *cobra.Command

NewVersionCommand implements and returns the version command.

func Run

func Run() int

Run runs the Main entrypoint and returns 1 on error or 0 on success, this is mostly useful to faciliate e2e integration testing of the CLI. It passes `os.Stdout` as the output `io.Writer` and `os.Args[:]` as the args passed to `Main`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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