Documentation ¶
Index ¶
- Constants
- Variables
- func ContainerEngine() entities.ContainerEngine
- func GetContext() context.Context
- func GetContextWithOptions() context.Context
- func GetExitCode() int
- func HelpTemplate() string
- func IdOrLatestArgs(cmd *cobra.Command, args []string) error
- func ImageEngine() entities.ImageEngine
- func IsRemote() bool
- func NewContainerEngine(cmd *cobra.Command, args []string) (entities.ContainerEngine, error)
- func NewImageEngine(cmd *cobra.Command, args []string) (entities.ImageEngine, error)
- func NewPodmanConfig() entities.PodmanConfig
- func SetExitCode(code int)
- func SubCommandExists(cmd *cobra.Command, args []string) error
- func UsageTemplate() string
- type CliCommand
- type ContextOptionsKey
Constants ¶
const DefaultAPIAddress = "unix:/run/podman/podman.sock"
DefaultAPIAddress is the default address of the REST socket
const DefaultVarlinkAddress = "unix:/run/podman/io.podman"
DefaultVarlinkAddress is the default address of the varlink socket
const ExecErrorCodeGeneric = 125
const (
RootRequired = "RootRequired"
)
Variables ¶
var ( // Commands holds the cobra.Commands to present to the user, including // parent if not a child of "root" Commands []CliCommand )
var (
PodmanOptions entities.PodmanConfig
)
Functions ¶
func ContainerEngine ¶
func ContainerEngine() entities.ContainerEngine
func GetContext ¶ added in v1.9.0
func GetContextWithOptions ¶ added in v1.9.0
func GetExitCode ¶ added in v1.9.0
func GetExitCode() int
func HelpTemplate ¶
func HelpTemplate() string
HelpTemplate returns the help template for podman commands This uses the short and long options. command should not use this.
func IdOrLatestArgs ¶ added in v1.9.0
IdOrLatestArgs used to validate a nameOrId was provided or the "--latest" flag
func ImageEngine ¶
func ImageEngine() entities.ImageEngine
func NewContainerEngine ¶
NewContainerEngine is a wrapper for building an ContainerEngine to be used for PreRunE functions
func NewImageEngine ¶
NewImageEngine is a wrapper for building an ImageEngine to be used for PreRunE functions
func NewPodmanConfig ¶ added in v1.9.0
func NewPodmanConfig() entities.PodmanConfig
NewPodmanConfig creates a PodmanConfig from the environment
func SetExitCode ¶ added in v1.9.0
func SetExitCode(code int)
func UsageTemplate ¶
func UsageTemplate() string
UsageTemplate returns the usage template for podman commands This blocks the displaying of the global options. The main podman command should not use this.
Types ¶
type CliCommand ¶
type ContextOptionsKey ¶ added in v1.9.0
type ContextOptionsKey string
const PodmanOptionsKey ContextOptionsKey = "PodmanOptions"