registry

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAPIAddress = "unix:/run/podman/podman.sock"

DefaultAPIAddress is the default address of the REST socket

View Source
const DefaultVarlinkAddress = "unix:/run/podman/io.podman"

DefaultVarlinkAddress is the default address of the varlink socket

View Source
const ExecErrorCodeGeneric = 125
View Source
const (
	RootRequired = "RootRequired"
)

Variables

View Source
var (

	// Commands holds the cobra.Commands to present to the user, including
	// parent if not a child of "root"
	Commands []CliCommand
)
View Source
var (
	PodmanOptions entities.PodmanConfig
)

Functions

func ContainerEngine

func ContainerEngine() entities.ContainerEngine

func GetContext added in v1.9.0

func GetContext() context.Context

func GetContextWithOptions added in v1.9.0

func GetContextWithOptions() context.Context

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

func IdOrLatestArgs(cmd *cobra.Command, args []string) error

IdOrLatestArgs used to validate a nameOrId was provided or the "--latest" flag

func ImageEngine

func ImageEngine() entities.ImageEngine

func IsRemote added in v1.9.0

func IsRemote() bool

func NewContainerEngine

func NewContainerEngine(cmd *cobra.Command, args []string) (entities.ContainerEngine, error)

NewContainerEngine is a wrapper for building an ContainerEngine to be used for PreRunE functions

func NewImageEngine

func NewImageEngine(cmd *cobra.Command, args []string) (entities.ImageEngine, error)

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 SubCommandExists

func SubCommandExists(cmd *cobra.Command, args []string) error

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 CliCommand struct {
	Mode    []entities.EngineMode
	Command *cobra.Command
	Parent  *cobra.Command
}

type ContextOptionsKey added in v1.9.0

type ContextOptionsKey string
const PodmanOptionsKey ContextOptionsKey = "PodmanOptions"

Jump to

Keyboard shortcuts

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