cli

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(version string, handlers Handlers) *cli.Command

Command creates the urfave/cli command with all commands and flags configured.

func FlagsToConfig

func FlagsToConfig(cfg *config.Config, flags *RunFlags) error

FlagsToConfig modifies cfg from a TOML file with values passed via command line flags. The function validates config after the modification.

Types

type Handlers

type Handlers struct {
	Init   func(envId string, noCwd bool) error
	Run    func(flags *RunFlags) error
	Ls     func() error
	Rm     func(envId string) error
	Update func(checkOnly bool) error
}

Handlers contains callback functions for each command.

type RunFlags

type RunFlags struct {
	EnvId       string
	ConfigPath  string
	NetworkMode string

	Mounts []string

	BeRoot            bool
	TcpPublishedPorts []string
	TcpHostPorts      []string
	UdpPublishedPorts []string
	UdpHostPorts      []string

	// Remaining command line arguments (the command to execute)
	Args []string
}

RunFlags contains parsed command line flags for the 'drop run' command.

Jump to

Keyboard shortcuts

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