common

package
v3.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 31 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ChangeCmds is the list of valid Change commands to passed to the Commit call
	ChangeCmds = []string{"CMD", "ENTRYPOINT", "ENV", "EXPOSE", "LABEL", "ONBUILD", "STOPSIGNAL", "USER", "VOLUME", "WORKDIR"}
	// LogLevels supported by podman
	LogLevels = []string{"trace", "debug", "info", "warn", "warning", "error", "fatal", "panic"}
)
View Source
var (
	// DefaultHealthCheckInterval default value
	DefaultHealthCheckInterval = "30s"
	// DefaultHealthCheckRetries default value
	DefaultHealthCheckRetries uint = 3
	// DefaultHealthCheckStartPeriod default value
	DefaultHealthCheckStartPeriod = "0s"
	// DefaultHealthCheckTimeout default value
	DefaultHealthCheckTimeout = "30s"
	// DefaultImageVolume default value
	DefaultImageVolume = "bind"
)

Functions

func AutocompleteCgroupManager

func AutocompleteCgroupManager(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCgroupManager - Autocomplete cgroup manager options. -> "cgroupfs", "systemd"

func AutocompleteCgroupMode

func AutocompleteCgroupMode(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCgroupMode - Autocomplete cgroup mode options. -> "enabled", "disabled", "no-conmon", "split"

func AutocompleteChangeInstructions

func AutocompleteChangeInstructions(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteChangeInstructions - Autocomplete change instructions options for commit and import. -> "CMD", "ENTRYPOINT", "ENV", "EXPOSE", "LABEL", "ONBUILD", "STOPSIGNAL", "USER", "VOLUME", "WORKDIR"

func AutocompleteCheckpointCompressType added in v3.3.0

func AutocompleteCheckpointCompressType(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCheckpointCompressType - Autocomplete checkpoint compress type options. -> "gzip", "none", "zstd"

func AutocompleteCommitCommand

func AutocompleteCommitCommand(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCommitCommand - Autocomplete podman commit command args.

func AutocompleteContainerOneArg

func AutocompleteContainerOneArg(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainerOneArg - Autocomplete containers as fist arg.

func AutocompleteContainers

func AutocompleteContainers(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainers - Autocomplete all container names.

func AutocompleteContainersAndImages

func AutocompleteContainersAndImages(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersAndImages - Autocomplete container names and pod names.

func AutocompleteContainersAndPods

func AutocompleteContainersAndPods(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersAndPods - Autocomplete container names and pod names.

func AutocompleteContainersCreated

func AutocompleteContainersCreated(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersCreated - Autocomplete only created container names.

func AutocompleteContainersExited

func AutocompleteContainersExited(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersExited - Autocomplete only exited container names.

func AutocompleteContainersPaused

func AutocompleteContainersPaused(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersPaused - Autocomplete only paused container names.

func AutocompleteContainersRunning

func AutocompleteContainersRunning(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersRunning - Autocomplete only running container names.

func AutocompleteContainersStartable

func AutocompleteContainersStartable(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteContainersStartable - Autocomplete only created and exited container names.

func AutocompleteCpCommand

func AutocompleteCpCommand(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCpCommand - Autocomplete podman cp command args.

func AutocompleteCreateAttach

func AutocompleteCreateAttach(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCreateAttach - Autocomplete create --attach options. -> "stdin", "stdout", "stderr"

func AutocompleteCreateRun

func AutocompleteCreateRun(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteCreateRun - Autocomplete only the fist argument as image and then do file completion.

func AutocompleteDefaultOneArg

func AutocompleteDefaultOneArg(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteDefaultOneArg - Autocomplete path only for the first argument.

func AutocompleteDetachKeys

func AutocompleteDetachKeys(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteDetachKeys - Autocomplete detach-keys options. -> "ctrl-"

func AutocompleteEventBackend

func AutocompleteEventBackend(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteEventBackend - Autocomplete event backend options. -> "file", "journald", "none"

func AutocompleteEventFilter

func AutocompleteEventFilter(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteEventFilter - Autocomplete event filter flag options. -> "container=", "event=", "image=", "pod=", "volume=", "type="

func AutocompleteExecCommand

func AutocompleteExecCommand(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteExecCommand - Autocomplete podman exec command args.

func AutocompleteForKube added in v3.2.0

func AutocompleteForKube(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteForKube - Autocomplete all Podman objects supported by kube generate.

func AutocompleteFormat added in v3.2.0

func AutocompleteFormat(o interface{}) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteFormat - Autocomplete json or a given struct to use for a go template. The input can be nil, In this case only json will be autocompleted. This function will only work for structs other types are not supported. When "{{." is typed the field and method names of the given struct will be completed. This also works recursive for nested structs.

func AutocompleteImageFilters

func AutocompleteImageFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteImageFilters - Autocomplete image ls --filter options.

func AutocompleteImageFormat

func AutocompleteImageFormat(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteImageFormat - Autocomplete image format options. -> "oci", "docker"

func AutocompleteImageSaveFormat

func AutocompleteImageSaveFormat(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteImageSaveFormat - Autocomplete image save format options. -> "oci-archive", "oci-dir", "docker-dir"

func AutocompleteImageSort

func AutocompleteImageSort(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteImageSort - Autocomplete images sort options. -> "created", "id", "repository", "size", "tag"

func AutocompleteImageVolume

func AutocompleteImageVolume(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteImageVolume - Autocomplete image volume options. -> "bind", "tmpfs", "ignore"

func AutocompleteImages

func AutocompleteImages(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteImages - Autocomplete images.

func AutocompleteInspect

func AutocompleteInspect(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteInspect - Autocomplete podman inspect.

func AutocompleteInspectType

func AutocompleteInspectType(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteInspectType - Autocomplete inspect type options. -> "container", "image", "all"

func AutocompleteLogDriver

func AutocompleteLogDriver(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteLogDriver - Autocomplete log-driver options. -> "journald", "none", "k8s-file"

func AutocompleteLogLevel

func AutocompleteLogLevel(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteLogLevel - Autocomplete log level options. -> "trace", "debug", "info", "warn", "error", "fatal", "panic"

func AutocompleteLogOpt

func AutocompleteLogOpt(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteLogOpt - Autocomplete log-opt options. -> "path=", "tag="

func AutocompleteManifestFormat

func AutocompleteManifestFormat(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteManifestFormat - Autocomplete manifest format options. -> "oci", "v2s2"

func AutocompleteMountFlag

func AutocompleteMountFlag(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteMountFlag - Autocomplete mount flag options. -> "type=bind,", "type=volume,", "type=tmpfs,"

func AutocompleteNamespace

func AutocompleteNamespace(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNamespace - Autocomplete namespace options. -> host,container:[name],ns:path,private

func AutocompleteNetworkConnectCmd

func AutocompleteNetworkConnectCmd(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNetworkConnectCmd - Autocomplete podman network connect/disconnect command args.

func AutocompleteNetworkDriver

func AutocompleteNetworkDriver(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNetworkDriver - Autocomplete network driver option. -> "bridge"

func AutocompleteNetworkFilters

func AutocompleteNetworkFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNetworkFilters - Autocomplete network ls --filter options.

func AutocompleteNetworkFlag

func AutocompleteNetworkFlag(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNetworkFlag - Autocomplete network flag options.

func AutocompleteNetworks

func AutocompleteNetworks(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNetworks - Autocomplete networks.

func AutocompletePodPsFilters

func AutocompletePodPsFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePodPsFilters - Autocomplete pod ps filter options.

func AutocompletePodPsSort

func AutocompletePodPsSort(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePodPsSort - Autocomplete images sort options. -> "created", "id", "name", "status", "number"

func AutocompletePodShareNamespace

func AutocompletePodShareNamespace(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePodShareNamespace - Autocomplete pod create --share flag option. -> "ipc", "net", "pid", "user", "uts", "cgroup", "none"

func AutocompletePods

func AutocompletePods(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePods - Autocomplete all pod names.

func AutocompletePodsRunning

func AutocompletePodsRunning(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePodsRunning - Autocomplete only running pod names. It considers degraded as running.

func AutocompletePruneFilters added in v3.2.1

func AutocompletePruneFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePruneFilters - Autocomplete container/image prune --filter options.

func AutocompletePsFilters

func AutocompletePsFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePsFilters - Autocomplete ps filter options.

func AutocompletePsSort

func AutocompletePsSort(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePsSort - Autocomplete images sort options. -> "command", "created", "id", "image", "names", "runningfor", "size", "status"

func AutocompletePullOption

func AutocompletePullOption(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompletePullOption - Autocomplete pull options for create and run command. -> "always", "missing", "never"

func AutocompleteRegistries

func AutocompleteRegistries(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteRegistries - Autocomplete registries.

func AutocompleteRestartOption

func AutocompleteRestartOption(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteRestartOption - Autocomplete restart options for create and run command. -> "always", "no", "on-failure", "unless-stopped"

func AutocompleteRunlabelCommand

func AutocompleteRunlabelCommand(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteRunlabelCommand - Autocomplete podman container runlabel command args.

func AutocompleteSDNotify

func AutocompleteSDNotify(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteSDNotify - Autocomplete sdnotify options. -> "container", "conmon", "ignore"

func AutocompleteScp added in v3.4.0

func AutocompleteScp(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteScp returns a list of connections, images, or both, depending on the amount of arguments

func AutocompleteSecretCreate added in v3.1.0

func AutocompleteSecretCreate(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func AutocompleteSecrets added in v3.1.0

func AutocompleteSecrets(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteSecrets - Autocomplete secrets.

func AutocompleteSecurityOption

func AutocompleteSecurityOption(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteSecurityOption - Autocomplete security options options.

func AutocompleteStopSignal

func AutocompleteStopSignal(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteStopSignal - Autocomplete stop signal options. -> "SIGHUP", "SIGINT", "SIGKILL", "SIGTERM"

func AutocompleteSystemConnections

func AutocompleteSystemConnections(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteSystemConnections - Autocomplete system connections.

func AutocompleteSystemdFlag

func AutocompleteSystemdFlag(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteSystemdFlag - Autocomplete systemd flag options. -> "true", "false", "always"

func AutocompleteSystemdRestartOptions

func AutocompleteSystemdRestartOptions(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteSystemdRestartOptions - Autocomplete systemd restart options. -> "no", "on-success", "on-failure", "on-abnormal", "on-watchdog", "on-abort", "always"

func AutocompleteTopCmd

func AutocompleteTopCmd(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteTopCmd - Autocomplete podman top/pod top command args.

func AutocompleteTrustType

func AutocompleteTrustType(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteTrustType - Autocomplete trust type options. -> "signedBy", "accept", "reject"

func AutocompleteUserFlag

func AutocompleteUserFlag(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteUserFlag - Autocomplete user flag based on the names and groups (includes ids after first char) in /etc/passwd and /etc/group files. -> user:group

func AutocompleteUserNamespace

func AutocompleteUserNamespace(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteUserNamespace - Autocomplete namespace options. -> same as AutocompleteNamespace with "auto", "keep-id" added

func AutocompleteVolumeFilters

func AutocompleteVolumeFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteVolumeFilters - Autocomplete volume ls --filter options.

func AutocompleteVolumeFlag

func AutocompleteVolumeFlag(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteVolumeFlag - Autocomplete volume flag options. -> volumes and paths

func AutocompleteVolumes

func AutocompleteVolumes(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteVolumes - Autocomplete volumes.

func AutocompleteWaitCondition

func AutocompleteWaitCondition(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteWaitCondition - Autocomplete wait condition options. -> "unknown", "configured", "created", "running", "stopped", "paused", "exited", "removing"

func ChangesToJSON

func ChangesToJSON(diffs *entities.DiffReport) error

func ChangesToTable

func ChangesToTable(diffs *entities.DiffReport) error

func ContainerCreateToContainerCLIOpts

func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *config.Config) (*entities.ContainerCreateOptions, []string, error)

ContainerCreateToContainerCLIOpts converts a compat input struct to cliopts so it can be converted to a specgen spec.

func DefineCreateFlags

func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, isInfra bool)

func DefineNetFlags

func DefineNetFlags(cmd *cobra.Command)

func NetFlagsToNetOptions

func NetFlagsToNetOptions(opts *entities.NetOptions, flags pflag.FlagSet, netnsFromConfig bool) (*entities.NetOptions, error)

NetFlagsToNetOptions parses the network flags for the given cmd. The netnsFromConfig bool is used to indicate if the --network flag should always be parsed regardless if it was set on the cli.

Types

type ChangesReportJSON

type ChangesReportJSON struct {
	Changed []string `json:"changed,omitempty"`
	Added   []string `json:"added,omitempty"`
	Deleted []string `json:"deleted,omitempty"`
}

Jump to

Keyboard shortcuts

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