Documentation ¶
Index ¶
- Constants
- Variables
- func AddCLICommand(name string, cmd *cli.Command, cmdSuggestion prompt.Suggest, ...)
- func ArchiveState(flag string, inContainer bool) string
- func CLIContextGet(ctx context.Context, key CLIContextKey) interface{}
- func CLIContextSave(ctx context.Context, key CLIContextKey, data interface{}) context.Context
- func Cflag(name string) cli.Flag
- func CompleteBool(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteContinueAfter(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteDir(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteFile(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteIPCMode(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteImage(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteNetwork(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteOutputFormat(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteProgress(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteRuntime(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteTBool(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func CompleteVolume(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
- func ConfirmNetwork(logger *log.Entry, client *docker.Client, network string) bool
- func CopyMetaArtifacts(logger *log.Entry, names []string, artifactLocation, targetLocation string) bool
- func DoArchiveState(logger *log.Entry, client *docker.Client, ...) error
- func FullFlagName(name string) string
- func GetCommands() []*cli.Command
- func GetContainerOverrides(xc *app.ExecutionContext, ctx *cli.Context) (*config.ContainerOverrides, error)
- func GetContainerRunOptions(ctx *cli.Context) (*config.ContainerRunOptions, error)
- func GetContinueAfter(ctx *cli.Context) (*config.ContinueAfter, error)
- func GetContinueAfterModeNames(continueAfter string) []string
- func GetDefaultHTTPProbe() config.HTTPProbeCmd
- func GetDockerClientConfig(ctx *cli.Context) *config.DockerClient
- func GetHTTPProbeOptions(xc *app.ExecutionContext, ctx *cli.Context, doProbe bool) config.HTTPProbeOptions
- func GetHTTPProbes(ctx *cli.Context) ([]config.HTTPProbeCmd, error)
- func GlobalFlags() []cli.Flag
- func HTTPProbeFlags() []cli.Flag
- func HTTPProbeFlagsBasic() []cli.Flag
- func IsInContainer(flag bool) (bool, bool)
- func IsOneSpace(value string) bool
- func IsTrueStr(value string) bool
- func ParseCheckTags(values []string) (map[string]string, error)
- func ParseDockerExposeOpt(values []string) (map[docker.Port]struct{}, error)
- func ParseEnvFile(filePath string) ([]string, error)
- func ParseExec(value string) ([]string, error)
- func ParseHTTPProbeExecFile(filePath string) ([]string, error)
- func ParseHTTPProbeUploads(values []string) ([]config.HTTPProbeCmd, error)
- func ParseHTTPProbes(values []string) ([]config.HTTPProbeCmd, error)
- func ParseHTTPProbesFile(filePath string) ([]config.HTTPProbeCmd, error)
- func ParseHTTPProbesPorts(portList string) ([]uint16, error)
- func ParseImageOverrides(value string) map[string]bool
- func ParseKVParams(values []string) []config.CBOBuildArg
- func ParseLinesWithCommentsFile(filePath string) ([]string, error)
- func ParseParamsFromFile(ctx *cli.Context, xc *app.ExecutionContext, filePath string, ...)
- func ParsePathPerms(raw string) (string, *fsutil.AccessInfo, error)
- func ParsePaths(values []string) map[string]*fsutil.AccessInfo
- func ParsePathsCreportFile(filePath string) (map[string]*fsutil.AccessInfo, error)
- func ParsePathsFile(filePath string) (map[string]*fsutil.AccessInfo, error)
- func ParsePortBindings(values []string) (map[docker.Port][]docker.PortBinding, error)
- func ParseTokenMap(values []string) (map[string]string, error)
- func ParseTokenSet(values []string) (map[string]struct{}, error)
- func ParseTokenSetFile(filePath string) (map[string]struct{}, error)
- func ParseVolumeMounts(values []string) (map[string]config.VolumeMount, error)
- func ParseVolumeMountsAsList(values []string) ([]config.VolumeMount, error)
- func RemoveContinueAfterMode(continueAfter, mode string) string
- func ResolveAutoRuntime(val string) string
- func RunHostExecProbes(printState bool, xc *app.ExecutionContext, hostExecProbes []string)
- func UpdateImageRef(logger *log.Entry, ref, override string) string
- func ValidateFiles(names []string) ([]string, map[string]error)
- type CLIContextKey
- type CompleteValue
- type CurrentCommandState
- type FlagSuggestions
- type GenericParams
- type InteractiveApp
Constants ¶
View Source
const ( FlagCommandReport = "report" FlagCheckVersion = "check-version" FlagDebug = "debug" FlagVerbose = "verbose" FlagQuietCLIMode = "quiet" FlagLogLevel = "log-level" FlagLog = "log" FlagLogFormat = "log-format" FlagAPIVersion = "crt-api-version" FlagUseTLS = "tls" FlagVerifyTLS = "tls-verify" FlagTLSCertPath = "tls-cert-path" FlagHost = "host" FlagCRTConnection = "crt-connection" FlagCRTContext = "crt-context" FlagStatePath = "state-path" FlagInContainer = "in-container" FlagArchiveState = "archive-state" FlagNoColor = "no-color" FlagOutputFormat = "output-format" FlagCRTIOInactivityTimeout = "crt-io-inactivity-timeout" FlagCRTSaveInactivityTimeout = "crt-save-inactivity-timeout" FlagCRTCopyInactivityTimeout = "crt-copy-inactivity-timeout" )
Global flag names
View Source
const ( OutputFormatJSON = "json" OutputFormatText = "text" )
View Source
const ( FlagCommandReportUsage = "command report location (enabled by default; set it to \"off\" to disable it)" FlagCheckVersionUsage = "check if the current version is outdated" FlagDebugUsage = "enable debug logs" FlagVerboseUsage = "enable info logs" FlagQuietCLIModeUsage = "Quiet CLI execution mode" FlagLogLevelUsage = "set the logging level ('trace', 'debug', 'info', 'warn' (default), 'error', 'fatal', 'panic')" FlagLogUsage = "log file to store logs" FlagLogFormatUsage = "set the format used by logs ('text' (default), or 'json')" FlagOutputFormatUsage = "set the output format to use ('text' (default), or 'json')" FlagUseTLSUsage = "use TLS" FlagVerifyTLSUsage = "verify TLS" FlagTLSCertPathUsage = "path to TLS cert files" FlagAPIVersionUsage = "Container runtime API version" FlagHostUsage = "Docker host address or socket (prefix with 'tcp://' or 'unix://')" FlagCRTConnectionUsage = "Container runtime connection (for non-Docker runtimes / for Docker user --host)" FlagCRTContextUsage = "Container runtime context name if supported (for Docker similar to setting '--context' or DOCKER_CONTEXT)" FlagStatePathUsage = "app state base path" FlagInContainerUsage = "app is running in a container" FlagArchiveStateUsage = "" /* 194-byte string literal not displayed */ FlagNoColorUsage = "disable color output" FlagCRTIOInactivityTimeoutUsage = "CRT I/O general inactivity timeout" FlagCRTSaveInactivityTimeoutUsage = "CRT save image operation inactivity timeout (overrides the general I/O timeout)" FlagCRTCopyInactivityTimeoutUsage = "CRT copy from container operation inactivity timeout (overrides the general I/O timeout)" )
Global flag usage info
View Source
const ( FlagCommandParamsFile = "command-params-file" FlagTarget = "target" FlagPull = "pull" FlagDockerConfigPath = "docker-config-path" FlagRegistryAccount = "registry-account" FlagRegistrySecret = "registry-secret" FlagShowPullLogs = "show-plogs" //Compose-related flags FlagComposeFile = "compose-file" FlagTargetComposeSvc = "target-compose-svc" FlagTargetComposeSvcImage = "target-compose-svc-image" FlagComposeSvcStartWait = "compose-svc-start-wait" FlagComposeSvcNoPorts = "target-compose-svc-no-ports" FlagDepExcludeComposeSvcAll = "dep-exclude-compose-svc-all" FlagDepIncludeComposeSvc = "dep-include-compose-svc" FlagDepExcludeComposeSvc = "dep-exclude-compose-svc" FlagDepIncludeComposeSvcDeps = "dep-include-compose-svc-deps" FlagDepIncludeTargetComposeSvcDeps = "dep-include-target-compose-svc-deps" FlagComposeNet = "compose-net" FlagComposeEnvNoHost = "compose-env-nohost" FlagComposeEnvFile = "compose-env-file" FlagComposeWorkdir = "compose-workdir" FlagComposeProjectName = "compose-project-name" FlagPrestartComposeSvc = "prestart-compose-svc" FlagPoststartComposeSvc = "poststart-compose-svc" FlagPrestartComposeWaitExit = "prestart-compose-wait-exit" FlagContainerProbeComposeSvc = "container-probe-compose-svc" //Kubernetes-related flags FlagTargetKubeWorkload = "target-kube-workload" // <kind>/<name> e.g: deployment/foo, job/bar FlagTargetKubeWorkloadNamespace = "target-kube-workload-namespace" FlagTargetKubeWorkloadContainer = "target-kube-workload-container" FlagTargetKubeWorkloadImage = "target-kube-workload-image" FlagKubeManifestFile = "kube-manifest-file" FlagKubeKubeconfigFile = "kube-kubeconfig-file" FlagRemoveFileArtifacts = "remove-file-artifacts" FlagCopyMetaArtifacts = "copy-meta-artifacts" FlagHTTPProbe = "http-probe" FlagHTTPProbeOff = "http-probe-off" //alternative way to disable http probing FlagHTTPProbeClientTimeout = "http-probe-client-timeout" FlagHTTPProbeClientTimeoutCrawl = "http-probe-client-timeout-crawl" FlagHTTPProbeCmd = "http-probe-cmd" FlagHTTPProbeCmdFile = "http-probe-cmd-file" FlagHTTPProbeCmdUpload = "http-probe-cmd-upload" FlagHTTPProbeStartWait = "http-probe-start-wait" FlagHTTPProbeRetryOff = "http-probe-retry-off" FlagHTTPProbeRetryCount = "http-probe-retry-count" FlagHTTPProbeRetryWait = "http-probe-retry-wait" FlagHTTPProbePorts = "http-probe-ports" FlagHTTPProbeFull = "http-probe-full" FlagHTTPProbeExitOnFailure = "http-probe-exit-on-failure" FlagHTTPProbeExitOnFailureCount = "http-probe-exit-on-failure-count" FlagHTTPProbeFailOnStatus5xx = "http-probe-fail-on-status-5xx" FlagHTTPProbeConcurrency = "http-probe-concurrency" FlagHTTPProbeCrawl = "http-probe-crawl" FlagHTTPCrawlMaxDepth = "http-crawl-max-depth" FlagHTTPCrawlMaxPageCount = "http-crawl-max-page-count" FlagHTTPCrawlConcurrency = "http-crawl-concurrency" FlagHTTPMaxConcurrentCrawlers = "http-max-concurrent-crawlers" FlagHTTPProbeAPISpec = "http-probe-apispec" FlagHTTPProbeAPISpecFile = "http-probe-apispec-file" FlagHTTPProbeProxyEndpoint = "http-probe-proxy-endpoint" FlagHTTPProbeProxyPort = "http-probe-proxy-port" FlagHostExec = "host-exec" FlagHostExecFile = "host-exec-file" FlagPublishPort = "publish-port" FlagPublishExposedPorts = "publish-exposed-ports" FlagRunTargetAsUser = "run-target-as-user" FlagShowContainerLogs = "show-clogs" FlagEnableMondelLogs = "enable-mondel" //Mon(itor) Data Event Log FlagUseLocalMounts = "use-local-mounts" FlagUseSensorVolume = "use-sensor-volume" FlagContinueAfter = "continue-after" //RunTime Analysis Options FlagRTAOnbuildBaseImage = "rta-onbuild-base-image" FlagRTASourcePT = "rta-source-ptrace" //Sensor IPC Options (for build and profile commands) FlagSensorIPCEndpoint = "sensor-ipc-endpoint" FlagSensorIPCMode = "sensor-ipc-mode" FlagExec = "exec" FlagExecFile = "exec-file" //Container Run Options (for build, profile and run commands) FlagCRORuntime = "cro-runtime" FlagCROHostConfigFile = "cro-host-config-file" FlagCROSysctl = "cro-sysctl" FlagCROShmSize = "cro-shm-size" //Original Container Runtime Options (without cro- prefix) FlagUser = "user" FlagEntrypoint = "entrypoint" FlagCmd = "cmd" FlagWorkdir = "workdir" FlagEnv = "env" FlagEnvFile = "env-file" FlagLabel = "label" FlagVolume = "volume" FlagExpose = "expose" FlagLink = "link" FlagNetwork = "network" FlagHostname = "hostname" FlagEtcHostsMap = "etc-hosts-map" FlagContainerDNS = "container-dns" FlagContainerDNSSearch = "container-dns-search" FlagMount = "mount" FlagDeleteFatImage = "delete-generated-fat-image" )
Shared command flag names
View Source
const ( FlagCommandParamsFileUsage = "JSON file with all command parameters" FlagTargetUsage = "Target container image (name or ID)" FlagPullUsage = "Try pulling target if it's not available locally" FlagDockerConfigPathUsage = "Docker config path (used to fetch registry credentials)" FlagRegistryAccountUsage = "Target registry account used when pulling images from private registries" FlagRegistrySecretUsage = "Target registry secret used when pulling images from private registries" FlagShowPullLogsUsage = "Show image pull logs" //Compose-related flags FlagComposeFileUsage = "Load container info from selected compose file(s)" FlagTargetComposeSvcUsage = "Target service from compose file" FlagTargetComposeSvcImageUsage = "" /* 159-byte string literal not displayed */ FlagComposeSvcStartWaitUsage = "Number of seconds to wait before starting each compose service" FlagComposeSvcNoPortsUsage = "Do not publish ports for target service from compose file" FlagDepExcludeComposeSvcAllUsage = "Do not start any compose services as target dependencies" FlagDepIncludeComposeSvcUsage = "Include specific compose service as a target dependency (only selected services will be started)" FlagDepExcludeComposeSvcUsage = "Exclude specific service from the compose services that will be started as target dependencies" FlagDepIncludeComposeSvcDepsUsage = "Include all dependencies for the selected compose service (excluding the service itself) as target dependencies" FlagDepIncludeTargetComposeSvcDepsUsage = "Include all dependencies for the target compose service (excluding the service itself) as target dependencies" FlagComposeNetUsage = "Attach target to the selected compose network(s) otherwise all networks will be attached" FlagComposeEnvNoHostUsage = "Don't include the env vars from the host to compose" FlagComposeEnvFileUsage = "Load compose env vars from file (host env vars override the values loaded from this file)" FlagComposeWorkdirUsage = "Set custom work directory for compose" FlagContainerProbeComposeSvcUsage = "Container test/probe service from compose file" FlagComposeProjectNameUsage = "Use custom project name for compose" FlagPrestartComposeSvcUsage = "Run selected compose service(s) before any other compose services or target container" FlagPoststartComposeSvcUsage = "Run selected compose service(s) after the target container is running (need a new continue after mode too)" FlagPrestartComposeWaitExitUsage = "Wait for selected prestart compose services to exit before starting other compose services or target container" //Kubernetes-related flags FlagTargetKubeWorkloadUsage = "" /* 189-byte string literal not displayed */ FlagTargetKubeWorkloadNamespaceUsage = "" /* 138-byte string literal not displayed */ FlagTargetKubeWorkloadContainerUsage = "[Experimental] Target container in the Kubernetes workload's pod template spec" FlagTargetKubeWorkloadImageUsage = "" /* 139-byte string literal not displayed */ FlagKubeManifestFileUsage = "[Experimental] Kubernetes manifest(s) to apply before run" FlagKubeKubeconfigFileUsage = "[Experimental] Path to the kubeconfig file" FlagRemoveFileArtifactsUsage = "remove file artifacts when command is done" FlagCopyMetaArtifactsUsage = "copy metadata artifacts to the selected location when command is done" FlagHTTPProbeUsage = "Enable or disable HTTP probing" FlagHTTPProbeOffUsage = "Alternative way to disable HTTP probing" FlagHTTPProbeClientTimeoutUsage = "Probe network client timeout in seconds (defaults to 30 seconds)" FlagHTTPProbeClientTimeoutCrawlUsage = "" /* 134-byte string literal not displayed */ FlagHTTPProbeCmdUsage = "User defined HTTP probe(s) as [[[[\"crawl\":]PROTO:]METHOD:]PATH]" FlagHTTPProbeCmdUploadUsage = "User defined HTTP probe(s) to submit form data as [[[[[PROTO:]FORM_FILE_NAME:]FORM_FIELD_NAME:]FILE_OR_GENERATE_TYPE:]PATH]" FlagHTTPProbeCmdFileUsage = "File with user defined HTTP probes" FlagHTTPProbeStartWaitUsage = "Number of seconds to wait before starting HTTP probing" FlagHTTPProbeRetryOffUsage = "Disable retries for probes (alternative way to disable probes)" FlagHTTPProbeRetryCountUsage = "Number of retries for each HTTP probe (set to -1 to disable probe retries)" FlagHTTPProbeRetryWaitUsage = "Number of seconds to wait before retrying HTTP probe (doubles when target is not ready)" FlagHTTPProbePortsUsage = "Explicit list of ports to probe (in the order you want them to be probed)" FlagHTTPProbeFullUsage = "Do full HTTP probe for all selected ports (if false, finish after first successful scan)" FlagHTTPProbeExitOnFailureUsage = "Exit when all HTTP probe commands fail" FlagHTTPProbeExitOnFailureCountUsage = "Exit when selected number of probe call failures happens" FlagHTTPProbeFailOnStatus5xxUsage = "Treat 5xx HTTP status codes as errors during HTTP probing" FlagHTTPProbeConcurrencyUsage = "Max number of concurrent requests executing HTTP probes" FlagHTTPProbeCrawlUsage = "Enable crawling for the default HTTP probe command" FlagHTTPCrawlMaxDepthUsage = "Max depth to use for the HTTP probe crawler" FlagHTTPCrawlMaxPageCountUsage = "Max number of pages to visit for the HTTP probe crawler" FlagHTTPCrawlConcurrencyUsage = "Number of concurrent workers when crawling an HTTP target" FlagHTTPMaxConcurrentCrawlersUsage = "Number of concurrent crawlers in the HTTP probe" FlagHTTPProbeAPISpecUsage = "Run HTTP probes for API spec" FlagHTTPProbeAPISpecFileUsage = "Run HTTP probes for API spec from file" FlagHTTPProbeProxyEndpointUsage = "Endpoint to proxy HTTP probes" FlagHTTPProbeProxyPortUsage = "Port to proxy HTTP probes (used with HTTP probe proxy endpoint)" FlagHostExecUsage = "Host commands to execute (aka host commands probes)" FlagHostExecFileUsage = "Host commands to execute loaded from file (aka host commands probes)" FlagPublishPortUsage = "" /* 130-byte string literal not displayed */ FlagPublishExposedPortsUsage = "Map all exposed ports to the same host ports" FlagRunTargetAsUserUsage = "Run target app as USER" FlagShowContainerLogsUsage = "Show container logs" FlagEnableMondelLogsUsage = "Enable data event log for sensor monitors" FlagUseLocalMountsUsage = "Mount local paths for target container artifact input and output" FlagUseSensorVolumeUsage = "Sensor volume name to use" FlagContinueAfterUsage = "Select continue mode: enter | signal | probe | timeout-number-in-seconds | container.probe" FlagRTAOnbuildBaseImageUsage = "Enable runtime analysis for onbuild base images" FlagRTASourcePTUsage = "Enable PTRACE runtime analysis source" FlagSensorIPCEndpointUsage = "Override sensor IPC endpoint" FlagSensorIPCModeUsage = "Select sensor IPC mode: proxy | direct" FlagExecUsage = "A shell script snippet to run via Docker exec" FlagExecFileUsage = "A shell script file to run via Docker exec" //Container Run Options (for build, profile and run commands) FlagCRORuntimeUsage = "Runtime to use with the created containers" FlagCROHostConfigFileUsage = "Base Docker host configuration file (JSON format) to use when running the container" FlagCROSysctlUsage = "Set namespaced kernel parameters in the created container" FlagCROShmSizeUsage = "Shared memory size for /dev/shm in the created container" FlagUserUsage = "Override USER analyzing image at runtime" FlagEntrypointUsage = "" /* 175-byte string literal not displayed */ FlagCmdUsage = "" /* 154-byte string literal not displayed */ FlagWorkdirUsage = "" /* 166-byte string literal not displayed */ FlagEnvUsage = "" /* 167-byte string literal not displayed */ FlagEnvFileUsage = "" /* 175-byte string literal not displayed */ FlagLabelUsage = "" /* 180-byte string literal not displayed */ FlagVolumeUsage = "" /* 160-byte string literal not displayed */ FlagExposeUsage = "" /* 184-byte string literal not displayed */ FlagLinkUsage = "Add link to another container analyzing image at runtime" FlagNetworkUsage = "Override default container network settings analyzing image at runtime" FlagHostnameUsage = "Override default container hostname analyzing image at runtime" FlagEtcHostsMapUsage = "Add a host to IP mapping to /etc/hosts analyzing image at runtime" FlagContainerDNSUsage = "Add a dns server analyzing image at runtime" FlagContainerDNSSearchUsage = "Add a dns search domain for unqualified hostnames analyzing image at runtime" FlagMountUsage = "Mount volume analyzing image" FlagDeleteFatImageUsage = "Delete generated fat image requires --dockerfile flag" // TUI Related flags FlagTUI = "tui" FlagTUIUsage = "Enable terminal user interface mode" )
Shared command flag usage info
View Source
const ( FlagRuntime = "runtime" FlagRuntimeUsage = "Runtime environment type" )
Container runtime command flag names and usage descriptions
View Source
const ( InputStateEmpty = "empty" InputStateGlobalFlag = "global.flag" InputStateGlobalFlagValue = "global.flag.value" InputStateCommand = "command" InputStateCommandFlag = "command.flag" InputStateCommandFlagValue = "command.flag.value" )
View Source
const ( ECTCommon = 0x01000000 ECTBuild = 0x02000000 ECTXray = 0x07000000 ECTRun = 0x08000000 ECTMerge = 0x09000000 )
TODO: spread these code types across all command definition, so it's not all defined here Exit Code Types
View Source
const ( ECCOther = iota + 1 ECCImageNotFound ECCNoDockerConnectInfo ECCBadNetworkName )
Build command exit codes
View Source
const (
AppName = "mint"
)
View Source
const (
DefaultStateArchiveVolumeName = "mint-state"
)
View Source
const (
FlagShowProgress = "show-progress"
)
Update command flag names
View Source
const (
FlagShowProgressUsage = "show progress when the release package is downloaded"
)
Update command flag usage info
View Source
const (
ImagesStateRootPath = "images"
)
Variables ¶
View Source
var ( ErrNoGlobalParams = errors.New("No global params") ErrBadParamValue = errors.New("Bad param value") )
View Source
var AllImageOverrides = map[string]bool{ "entrypoint": true, "cmd": true, "workdir": true, "env": true, "expose": true, "volume": true, "label": true, }
View Source
var CommandFlagSuggestions = map[string]*FlagSuggestions{}
View Source
var CommandSuggestions = []prompt.Suggest{
{Text: "exit", Description: "Exit app"},
}
View Source
var CommonFlags = map[string]cli.Flag{ FlagCommandParamsFile: &cli.StringFlag{ Name: FlagCommandParamsFile, Value: "", Usage: FlagCommandParamsFileUsage, EnvVars: []string{"DSLIM_COMMAND_PARAMS_FILE"}, }, FlagTarget: &cli.StringFlag{ Name: FlagTarget, Value: "", Usage: FlagTargetUsage, EnvVars: []string{"DSLIM_TARGET"}, }, FlagPull: &cli.BoolFlag{ Name: FlagPull, Value: true, Usage: FlagPullUsage, EnvVars: []string{"DSLIM_PULL"}, }, FlagDockerConfigPath: &cli.StringFlag{ Name: FlagDockerConfigPath, Usage: FlagDockerConfigPathUsage, EnvVars: []string{"DSLIM_DOCKER_CONFIG_PATH"}, }, FlagRegistryAccount: &cli.StringFlag{ Name: FlagRegistryAccount, Usage: FlagRegistryAccountUsage, EnvVars: []string{"DSLIM_REGISTRY_ACCOUNT"}, }, FlagRegistrySecret: &cli.StringFlag{ Name: FlagRegistrySecret, Usage: FlagRegistrySecretUsage, EnvVars: []string{"DSLIM_REGISTRY_SECRET"}, }, FlagShowPullLogs: &cli.BoolFlag{ Name: FlagShowPullLogs, Usage: FlagShowPullLogsUsage, EnvVars: []string{"DSLIM_PLOG"}, }, FlagComposeFile: &cli.StringSliceFlag{ Name: FlagComposeFile, Value: cli.NewStringSlice(), Usage: FlagComposeFileUsage, EnvVars: []string{"DSLIM_COMPOSE_FILE"}, }, FlagTargetComposeSvc: &cli.StringFlag{ Name: FlagTargetComposeSvc, Value: "", Usage: FlagTargetComposeSvcUsage, EnvVars: []string{"DSLIM_TARGET_COMPOSE_SVC"}, }, FlagTargetComposeSvcImage: &cli.StringFlag{ Name: FlagTargetComposeSvcImage, Value: "", Usage: FlagTargetComposeSvcImageUsage, EnvVars: []string{"DSLIM_TARGET_COMPOSE_SVC_IMAGE"}, }, FlagComposeSvcStartWait: &cli.IntFlag{ Name: FlagComposeSvcStartWait, Value: 0, Usage: FlagComposeSvcStartWaitUsage, EnvVars: []string{"DSLIM_COMPOSE_SVC_START_WAIT"}, }, FlagComposeSvcNoPorts: &cli.BoolFlag{ Name: FlagComposeSvcNoPorts, Usage: FlagComposeSvcNoPortsUsage, EnvVars: []string{"DSLIM_COMPOSE_SVC_NO_PORTS"}, }, FlagDepExcludeComposeSvcAll: &cli.BoolFlag{ Name: FlagDepExcludeComposeSvcAll, Usage: FlagDepExcludeComposeSvcAllUsage, EnvVars: []string{"DSLIM_DEP_INCLUDE_COMPOSE_SVC_ALL"}, }, FlagDepIncludeComposeSvcDeps: &cli.StringFlag{ Name: FlagDepIncludeComposeSvcDeps, Value: "", Usage: FlagDepIncludeComposeSvcDepsUsage, EnvVars: []string{"DSLIM_DEP_INCLUDE_COMPOSE_SVC_DEPS"}, }, FlagDepIncludeComposeSvc: &cli.StringSliceFlag{ Name: FlagDepIncludeComposeSvc, Value: cli.NewStringSlice(), Usage: FlagDepIncludeComposeSvcUsage, EnvVars: []string{"DSLIM_DEP_INCLUDE_COMPOSE_SVC"}, }, FlagDepExcludeComposeSvc: &cli.StringSliceFlag{ Name: FlagDepExcludeComposeSvc, Value: cli.NewStringSlice(), Usage: FlagDepExcludeComposeSvcUsage, EnvVars: []string{"DSLIM_DEP_EXCLUDE_COMPOSE_SVC"}, }, FlagComposeNet: &cli.StringSliceFlag{ Name: FlagComposeNet, Value: cli.NewStringSlice(), Usage: FlagComposeNetUsage, EnvVars: []string{"DSLIM_COMPOSE_NET"}, }, FlagDepIncludeTargetComposeSvcDeps: &cli.BoolFlag{ Name: FlagDepIncludeTargetComposeSvcDeps, Usage: FlagDepIncludeTargetComposeSvcDepsUsage, EnvVars: []string{"DSLIM_DEP_INCLUDE_TARGET_COMPOSE_SVC_DEPS"}, }, FlagComposeEnvNoHost: &cli.BoolFlag{ Name: FlagComposeEnvNoHost, Usage: FlagComposeEnvNoHostUsage, EnvVars: []string{"DSLIM_COMPOSE_ENV_NOHOST"}, }, FlagComposeEnvFile: &cli.StringFlag{ Name: FlagComposeEnvFile, Value: "", Usage: FlagComposeEnvFileUsage, EnvVars: []string{"DSLIM_COMPOSE_ENV_FILE"}, }, FlagComposeProjectName: &cli.StringFlag{ Name: FlagComposeProjectName, Value: "", Usage: FlagComposeProjectNameUsage, EnvVars: []string{"DSLIM_COMPOSE_PROJECT_NAME"}, }, FlagComposeWorkdir: &cli.StringFlag{ Name: FlagComposeWorkdir, Value: "", Usage: FlagComposeWorkdirUsage, EnvVars: []string{"DSLIM_COMPOSE_WORKDIR"}, }, FlagContainerProbeComposeSvc: &cli.StringFlag{ Name: FlagContainerProbeComposeSvc, Value: "", Usage: FlagContainerProbeComposeSvcUsage, EnvVars: []string{"DSLIM_CONTAINER_PROBE_COMPOSE_SVC"}, }, FlagPrestartComposeSvc: &cli.StringSliceFlag{ Name: FlagPrestartComposeSvc, Value: cli.NewStringSlice(), Usage: FlagPrestartComposeSvcUsage, EnvVars: []string{"DSLIM_PRESTART_COMPOSE_SVC"}, }, FlagPrestartComposeWaitExit: &cli.BoolFlag{ Name: FlagPrestartComposeWaitExit, Usage: FlagPrestartComposeWaitExitUsage, EnvVars: []string{"DSLIM_PRESTART_COMPOSE_WAIT"}, }, FlagPoststartComposeSvc: &cli.StringSliceFlag{ Name: FlagPoststartComposeSvc, Value: cli.NewStringSlice(), Usage: FlagPoststartComposeSvcUsage, EnvVars: []string{"DSLIM_POSTSTART_COMPOSE_SVC"}, }, FlagTargetKubeWorkload: &cli.StringFlag{ Name: FlagTargetKubeWorkload, Value: "", Usage: FlagTargetKubeWorkloadUsage, EnvVars: []string{"DSLIM_TARGET_KUBE_WORKLOAD"}, }, FlagTargetKubeWorkloadNamespace: &cli.StringFlag{ Name: FlagTargetKubeWorkloadNamespace, Value: "", Usage: FlagTargetKubeWorkloadNamespaceUsage, EnvVars: []string{"DSLIM_TARGET_KUBE_WORKLOAD_NAMESPACE"}, }, FlagTargetKubeWorkloadContainer: &cli.StringFlag{ Name: FlagTargetKubeWorkloadContainer, Value: "", Usage: FlagTargetKubeWorkloadContainerUsage, EnvVars: []string{"DSLIM_TARGET_KUBE_WORKLOAD_CONTAINER"}, }, FlagTargetKubeWorkloadImage: &cli.StringFlag{ Name: FlagTargetKubeWorkloadImage, Value: "", Usage: FlagTargetKubeWorkloadImageUsage, EnvVars: []string{"DSLIM_TARGET_KUBE_WORKLOAD_IMAGE"}, }, FlagKubeManifestFile: &cli.StringSliceFlag{ Name: FlagKubeManifestFile, Value: cli.NewStringSlice(), Usage: FlagKubeManifestFileUsage, EnvVars: []string{"DSLIM_KUBE_MANIFEST_FILE"}, }, FlagKubeKubeconfigFile: &cli.StringFlag{ Name: FlagKubeKubeconfigFile, Value: clientcmd.RecommendedHomeFile, Usage: FlagKubeKubeconfigFileUsage, EnvVars: []string{ "DSLIM_KUBE_KUBECONFIG_FILE", "KUBECONFIG", }, }, FlagRemoveFileArtifacts: &cli.BoolFlag{ Name: FlagRemoveFileArtifacts, Usage: FlagRemoveFileArtifactsUsage, EnvVars: []string{"DSLIM_RM_FILE_ARTIFACTS"}, }, FlagCopyMetaArtifacts: &cli.StringFlag{ Name: FlagCopyMetaArtifacts, Usage: FlagCopyMetaArtifactsUsage, EnvVars: []string{"DSLIM_CP_META_ARTIFACTS"}, }, FlagHTTPProbe: &cli.BoolFlag{ Name: FlagHTTPProbe, Value: true, Usage: FlagHTTPProbeUsage, EnvVars: []string{"DSLIM_HTTP_PROBE"}, }, FlagHTTPProbeOff: &cli.BoolFlag{ Name: FlagHTTPProbeOff, Usage: FlagHTTPProbeOffUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_OFF"}, }, FlagHTTPProbeClientTimeout: &cli.IntFlag{ Name: FlagHTTPProbeClientTimeout, Value: 0, Usage: FlagHTTPProbeClientTimeoutUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_CLIENT_TIMEOUT"}, }, FlagHTTPProbeClientTimeoutCrawl: &cli.IntFlag{ Name: FlagHTTPProbeClientTimeoutCrawl, Value: 0, Usage: FlagHTTPProbeClientTimeoutCrawlUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_CLIENT_TIMEOUT_CRAWL"}, }, FlagHTTPProbeCmd: &cli.StringSliceFlag{ Name: FlagHTTPProbeCmd, Value: cli.NewStringSlice(), Usage: FlagHTTPProbeCmdUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_CMD"}, }, FlagHTTPProbeCmdUpload: &cli.StringSliceFlag{ Name: FlagHTTPProbeCmdUpload, Value: cli.NewStringSlice(), Usage: FlagHTTPProbeCmdUploadUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_CMD_UPLOAD"}, }, FlagHTTPProbeCmdFile: &cli.StringFlag{ Name: FlagHTTPProbeCmdFile, Value: "", Usage: FlagHTTPProbeCmdFileUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_CMD_FILE"}, }, FlagHTTPProbeAPISpec: &cli.StringSliceFlag{ Name: FlagHTTPProbeAPISpec, Value: cli.NewStringSlice(), Usage: FlagHTTPProbeAPISpecUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_API_SPEC"}, }, FlagHTTPProbeAPISpecFile: &cli.StringSliceFlag{ Name: FlagHTTPProbeAPISpecFile, Value: cli.NewStringSlice(), Usage: FlagHTTPProbeAPISpecFileUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_API_SPEC_FILE"}, }, FlagHTTPProbeStartWait: &cli.IntFlag{ Name: FlagHTTPProbeStartWait, Value: 0, Usage: FlagHTTPProbeStartWaitUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_START_WAIT"}, }, FlagHTTPProbeRetryOff: &cli.BoolFlag{ Name: FlagHTTPProbeRetryOff, Usage: FlagHTTPProbeRetryOffUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_RETRY_OFF"}, }, FlagHTTPProbeRetryCount: &cli.IntFlag{ Name: FlagHTTPProbeRetryCount, Value: 5, Usage: FlagHTTPProbeRetryCountUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_RETRY_COUNT"}, }, FlagHTTPProbeRetryWait: &cli.IntFlag{ Name: FlagHTTPProbeRetryWait, Value: 8, Usage: FlagHTTPProbeRetryWaitUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_RETRY_WAIT"}, }, FlagHTTPProbePorts: &cli.StringFlag{ Name: FlagHTTPProbePorts, Value: "", Usage: FlagHTTPProbePortsUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_PORTS"}, }, FlagHTTPProbeFull: &cli.BoolFlag{ Name: FlagHTTPProbeFull, Value: true, Usage: FlagHTTPProbeFullUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_FULL"}, }, FlagHTTPProbeExitOnFailure: &cli.BoolFlag{ Name: FlagHTTPProbeExitOnFailure, Value: true, Usage: FlagHTTPProbeExitOnFailureUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_EXIT_ON_FAILURE"}, }, FlagHTTPProbeExitOnFailureCount: &cli.IntFlag{ Name: FlagHTTPProbeExitOnFailureCount, Value: 0, Usage: FlagHTTPProbeExitOnFailureCountUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_EXIT_ON_FAILURE_COUNT"}, }, FlagHTTPProbeFailOnStatus5xx: &cli.BoolFlag{ Name: FlagHTTPProbeFailOnStatus5xx, Usage: FlagHTTPProbeFailOnStatus5xxUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_FAIL_ON_5XX"}, }, FlagHTTPProbeConcurrency: &cli.IntFlag{ Name: FlagHTTPProbeConcurrency, Value: 5, Usage: FlagHTTPProbeConcurrencyUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_CONCURRENCY"}, }, FlagHTTPProbeCrawl: &cli.BoolFlag{ Name: FlagHTTPProbeCrawl, Value: true, Usage: FlagHTTPProbeCrawl, EnvVars: []string{"DSLIM_HTTP_PROBE_CRAWL"}, }, FlagHTTPCrawlMaxDepth: &cli.IntFlag{ Name: FlagHTTPCrawlMaxDepth, Value: 3, Usage: FlagHTTPCrawlMaxDepthUsage, EnvVars: []string{"DSLIM_HTTP_CRAWL_MAX_DEPTH"}, }, FlagHTTPCrawlMaxPageCount: &cli.IntFlag{ Name: FlagHTTPCrawlMaxPageCount, Value: 1000, Usage: FlagHTTPCrawlMaxPageCountUsage, EnvVars: []string{"DSLIM_HTTP_CRAWL_MAX_PAGE_COUNT"}, }, FlagHTTPCrawlConcurrency: &cli.IntFlag{ Name: FlagHTTPCrawlConcurrency, Value: 10, Usage: FlagHTTPCrawlConcurrencyUsage, EnvVars: []string{"DSLIM_HTTP_CRAWL_CONCURRENCY"}, }, FlagHTTPMaxConcurrentCrawlers: &cli.IntFlag{ Name: FlagHTTPMaxConcurrentCrawlers, Value: 1, Usage: FlagHTTPMaxConcurrentCrawlersUsage, EnvVars: []string{"DSLIM_HTTP_MAX_CONCURRENT_CRAWLERS"}, }, FlagHTTPProbeProxyEndpoint: &cli.StringFlag{ Name: FlagHTTPProbeProxyEndpoint, Value: "", Usage: FlagHTTPProbeProxyEndpointUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_PROXY_ENDPOINT"}, }, FlagHTTPProbeProxyPort: &cli.IntFlag{ Name: FlagHTTPProbeProxyPort, Value: 0, Usage: FlagHTTPProbeProxyPortUsage, EnvVars: []string{"DSLIM_HTTP_PROBE_PROXY_PORT"}, }, FlagHostExec: &cli.StringSliceFlag{ Name: FlagHostExec, Value: cli.NewStringSlice(), Usage: FlagHostExecUsage, EnvVars: []string{"DSLIM_HOST_EXEC"}, }, FlagHostExecFile: &cli.StringFlag{ Name: FlagHostExecFile, Value: "", Usage: FlagHostExecFileUsage, EnvVars: []string{"DSLIM_HOST_EXEC_FILE"}, }, FlagPublishPort: &cli.StringSliceFlag{ Name: FlagPublishPort, Value: cli.NewStringSlice(), Usage: FlagPublishPortUsage, EnvVars: []string{"DSLIM_PUBLISH_PORT"}, }, FlagPublishExposedPorts: &cli.BoolFlag{ Name: FlagPublishExposedPorts, Usage: FlagPublishExposedPortsUsage, EnvVars: []string{"DSLIM_PUBLISH_EXPOSED"}, }, FlagRunTargetAsUser: &cli.BoolFlag{ Name: FlagRunTargetAsUser, Value: true, Usage: FlagRunTargetAsUserUsage, EnvVars: []string{"DSLIM_RUN_TAS_USER"}, }, FlagShowContainerLogs: &cli.BoolFlag{ Name: FlagShowContainerLogs, Usage: FlagShowContainerLogsUsage, EnvVars: []string{"DSLIM_SHOW_CLOGS"}, }, FlagEnableMondelLogs: &cli.BoolFlag{ Name: FlagEnableMondelLogs, Usage: FlagEnableMondelLogsUsage, EnvVars: []string{"DSLIM_ENABLE_MONDEL"}, }, FlagSensorIPCMode: &cli.StringFlag{ Name: FlagSensorIPCMode, Value: "", Usage: FlagSensorIPCModeUsage, EnvVars: []string{"DSLIM_SENSOR_IPC_MODE"}, }, FlagSensorIPCEndpoint: &cli.StringFlag{ Name: FlagSensorIPCEndpoint, Value: "", Usage: FlagSensorIPCEndpointUsage, EnvVars: []string{"DSLIM_SENSOR_IPC_ENDPOINT"}, }, FlagExec: &cli.StringFlag{ Name: FlagExec, Value: "", Usage: FlagExecUsage, EnvVars: []string{"DSLIM_RC_EXE"}, }, FlagExecFile: &cli.StringFlag{ Name: FlagExecFile, Value: "", Usage: FlagExecFileUsage, EnvVars: []string{"DSLIM_RC_EXE_FILE"}, }, FlagUseLocalMounts: &cli.BoolFlag{ Name: FlagUseLocalMounts, Usage: FlagUseLocalMountsUsage, EnvVars: []string{"DSLIM_USE_LOCAL_MOUNTS"}, }, FlagUseSensorVolume: &cli.StringFlag{ Name: FlagUseSensorVolume, Value: "", Usage: FlagUseSensorVolumeUsage, EnvVars: []string{"DSLIM_USE_SENSOR_VOLUME"}, }, FlagContinueAfter: &cli.StringFlag{ Name: FlagContinueAfter, Value: config.CAMProbe, Usage: FlagContinueAfterUsage, EnvVars: []string{"DSLIM_CONTINUE_AFTER"}, }, FlagCRORuntime: &cli.StringFlag{ Name: FlagCRORuntime, Value: "", Usage: FlagCRORuntimeUsage, EnvVars: []string{"DSLIM_CRO_RUNTIME"}, }, FlagCROHostConfigFile: &cli.StringFlag{ Name: FlagCROHostConfigFile, Value: "", Usage: FlagCROHostConfigFileUsage, EnvVars: []string{"DSLIM_CRO_HOST_CONFIG_FILE"}, }, FlagCROSysctl: &cli.StringSliceFlag{ Name: FlagCROSysctl, Value: cli.NewStringSlice(), Usage: FlagCROSysctlUsage, EnvVars: []string{"DSLIM_CRO_SYSCTL"}, }, FlagCROShmSize: &cli.Int64Flag{ Name: FlagCROShmSize, Value: -1, Usage: FlagCROShmSizeUsage, EnvVars: []string{"DSLIM_CRO_SHM_SIZE"}, }, FlagUser: &cli.StringFlag{ Name: FlagUser, Value: "", Usage: FlagUserUsage, EnvVars: []string{"DSLIM_RC_USER"}, }, FlagEntrypoint: &cli.StringFlag{ Name: FlagEntrypoint, Value: "", Usage: FlagEntrypointUsage, EnvVars: []string{"DSLIM_RC_ENTRYPOINT"}, }, FlagCmd: &cli.StringFlag{ Name: FlagCmd, Value: "", Usage: FlagCmdUsage, EnvVars: []string{"DSLIM_RC_CMD"}, }, FlagWorkdir: &cli.StringFlag{ Name: FlagWorkdir, Value: "", Usage: FlagWorkdirUsage, EnvVars: []string{"DSLIM_RC_WORKDIR"}, }, FlagEnv: &cli.StringSliceFlag{ Name: FlagEnv, Value: cli.NewStringSlice(), Usage: FlagEnvUsage, EnvVars: []string{"DSLIM_RC_ENV"}, }, FlagEnvFile: &cli.StringFlag{ Name: FlagEnvFile, Value: "", Usage: FlagEnvFileUsage, EnvVars: []string{"DSLIM_RC_ENV_FILE"}, }, FlagLabel: &cli.StringSliceFlag{ Name: FlagLabel, Value: cli.NewStringSlice(), Usage: FlagLabelUsage, EnvVars: []string{"DSLIM_RC_LABEL"}, }, FlagVolume: &cli.StringSliceFlag{ Name: FlagVolume, Value: cli.NewStringSlice(), Usage: FlagVolumeUsage, EnvVars: []string{"DSLIM_RC_VOLUME"}, }, FlagLink: &cli.StringSliceFlag{ Name: FlagLink, Value: cli.NewStringSlice(), Usage: FlagLinkUsage, EnvVars: []string{"DSLIM_RC_LINK"}, }, FlagEtcHostsMap: &cli.StringSliceFlag{ Name: FlagEtcHostsMap, Value: cli.NewStringSlice(), Usage: FlagEtcHostsMapUsage, EnvVars: []string{"DSLIM_RC_ETC_HOSTS_MAP"}, }, FlagContainerDNS: &cli.StringSliceFlag{ Name: FlagContainerDNS, Value: cli.NewStringSlice(), Usage: FlagContainerDNSUsage, EnvVars: []string{"DSLIM_RC_DNS"}, }, FlagContainerDNSSearch: &cli.StringSliceFlag{ Name: FlagContainerDNSSearch, Value: cli.NewStringSlice(), Usage: FlagContainerDNSSearchUsage, EnvVars: []string{"DSLIM_RC_DNS_SEARCH"}, }, FlagHostname: &cli.StringFlag{ Name: FlagHostname, Value: "", Usage: FlagHostnameUsage, EnvVars: []string{"DSLIM_RC_HOSTNAME"}, }, FlagNetwork: &cli.StringFlag{ Name: FlagNetwork, Value: "", Usage: FlagNetworkUsage, EnvVars: []string{"DSLIM_RC_NET"}, }, FlagExpose: &cli.StringSliceFlag{ Name: FlagExpose, Value: cli.NewStringSlice(), Usage: FlagExposeUsage, EnvVars: []string{"DSLIM_RC_EXPOSE"}, }, FlagMount: &cli.StringSliceFlag{ Name: FlagMount, Value: cli.NewStringSlice(), Usage: FlagMountUsage, EnvVars: []string{"DSLIM_MOUNT"}, }, FlagDeleteFatImage: &cli.BoolFlag{ Name: FlagDeleteFatImage, Usage: FlagDeleteFatImageUsage, EnvVars: []string{"DSLIM_DELETE_FAT"}, }, FlagRTAOnbuildBaseImage: &cli.BoolFlag{ Name: FlagRTAOnbuildBaseImage, Usage: FlagRTAOnbuildBaseImageUsage, EnvVars: []string{"DSLIM_RTA_ONBUILD_BI"}, }, FlagRTASourcePT: &cli.BoolFlag{ Name: FlagRTASourcePT, Value: true, Usage: FlagRTASourcePTUsage, EnvVars: []string{"DSLIM_RTA_SRC_PT"}, }, FlagRuntime: &cli.StringFlag{ Name: FlagRuntime, Value: crt.AutoRuntime, Usage: FlagRuntimeUsage, EnvVars: []string{"DSLIM_CRT_NAME"}, }, FlagTUI: &cli.BoolFlag{ Name: FlagTUI, Usage: FlagTUIUsage, EnvVars: []string{"DSLIM_TUI"}, }, }
View Source
var GlobalFlagSuggestions = []prompt.Suggest{ {Text: FullFlagName(FlagStatePath), Description: FlagStatePathUsage}, {Text: FullFlagName(FlagCommandReport), Description: FlagCommandReportUsage}, {Text: FullFlagName(FlagDebug), Description: FlagDebugUsage}, {Text: FullFlagName(FlagVerbose), Description: FlagVerboseUsage}, {Text: FullFlagName(FlagLogLevel), Description: FlagLogLevelUsage}, {Text: FullFlagName(FlagLog), Description: FlagLogUsage}, {Text: FullFlagName(FlagLogFormat), Description: FlagLogFormatUsage}, {Text: FullFlagName(FlagQuietCLIMode), Description: FlagQuietCLIModeUsage}, {Text: FullFlagName(FlagOutputFormat), Description: FlagOutputFormatUsage}, {Text: FullFlagName(FlagUseTLS), Description: FlagUseTLSUsage}, {Text: FullFlagName(FlagVerifyTLS), Description: FlagVerifyTLSUsage}, {Text: FullFlagName(FlagTLSCertPath), Description: FlagTLSCertPathUsage}, {Text: FullFlagName(FlagHost), Description: FlagHostUsage}, {Text: FullFlagName(FlagCRTConnection), Description: FlagCRTConnectionUsage}, {Text: FullFlagName(FlagCRTContext), Description: FlagCRTContextUsage}, {Text: FullFlagName(FlagAPIVersion), Description: FlagAPIVersionUsage}, {Text: FullFlagName(FlagArchiveState), Description: FlagArchiveStateUsage}, {Text: FullFlagName(FlagInContainer), Description: FlagInContainerUsage}, {Text: FullFlagName(FlagCheckVersion), Description: FlagCheckVersionUsage}, {Text: FullFlagName(FlagNoColor), Description: FlagNoColorUsage}, }
View Source
var GlobalFlagValueSuggestions = map[string]CompleteValue{ FullFlagName(FlagQuietCLIMode): CompleteBool, FullFlagName(FlagOutputFormat): CompleteOutputFormat, FullFlagName(FlagDebug): CompleteBool, FullFlagName(FlagVerbose): CompleteBool, FullFlagName(FlagNoColor): CompleteBool, FullFlagName(FlagCheckVersion): CompleteTBool, }
Functions ¶
func AddCLICommand ¶
func AddCLICommand( name string, cmd *cli.Command, cmdSuggestion prompt.Suggest, flagSuggestions *FlagSuggestions)
func ArchiveState ¶
func CLIContextGet ¶
func CLIContextGet(ctx context.Context, key CLIContextKey) interface{}
func CLIContextSave ¶
func CLIContextSave(ctx context.Context, key CLIContextKey, data interface{}) context.Context
func CompleteBool ¶
func CompleteBool(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteContinueAfter ¶
func CompleteContinueAfter(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteDir ¶
func CompleteDir(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteFile ¶
func CompleteFile(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteIPCMode ¶
func CompleteIPCMode(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteImage ¶
func CompleteImage(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteNetwork ¶
func CompleteNetwork(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteOutputFormat ¶
func CompleteOutputFormat(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteProgress ¶
func CompleteProgress(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteRuntime ¶
func CompleteRuntime(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteTBool ¶
func CompleteTBool(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func CompleteVolume ¶
func CompleteVolume(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
func ConfirmNetwork ¶
func CopyMetaArtifacts ¶
func DoArchiveState ¶
func FullFlagName ¶
func GetCommands ¶
func GetCommands() []*cli.Command
func GetContainerOverrides ¶
func GetContainerOverrides(xc *app.ExecutionContext, ctx *cli.Context) (*config.ContainerOverrides, error)
func GetContainerRunOptions ¶
func GetContainerRunOptions(ctx *cli.Context) (*config.ContainerRunOptions, error)
func GetContinueAfter ¶
func GetContinueAfter(ctx *cli.Context) (*config.ContinueAfter, error)
func GetDefaultHTTPProbe ¶
func GetDefaultHTTPProbe() config.HTTPProbeCmd
func GetDockerClientConfig ¶
func GetDockerClientConfig(ctx *cli.Context) *config.DockerClient
func GetHTTPProbeOptions ¶
func GetHTTPProbeOptions(xc *app.ExecutionContext, ctx *cli.Context, doProbe bool) config.HTTPProbeOptions
func GetHTTPProbes ¶
func GetHTTPProbes(ctx *cli.Context) ([]config.HTTPProbeCmd, error)
func GlobalFlags ¶
func GlobalFlags() []cli.Flag
func HTTPProbeFlags ¶
func HTTPProbeFlags() []cli.Flag
func HTTPProbeFlagsBasic ¶
func HTTPProbeFlagsBasic() []cli.Flag
func IsInContainer ¶
func IsOneSpace ¶
func ParseDockerExposeOpt ¶
based on expose opt parsing in Docker
func ParseEnvFile ¶
func ParseHTTPProbeExecFile ¶
func ParseHTTPProbeUploads ¶
func ParseHTTPProbeUploads(values []string) ([]config.HTTPProbeCmd, error)
func ParseHTTPProbes ¶
func ParseHTTPProbes(values []string) ([]config.HTTPProbeCmd, error)
func ParseHTTPProbesFile ¶
func ParseHTTPProbesFile(filePath string) ([]config.HTTPProbeCmd, error)
func ParseHTTPProbesPorts ¶
func ParseImageOverrides ¶
func ParseKVParams ¶
func ParseKVParams(values []string) []config.CBOBuildArg
func ParseParamsFromFile ¶
func ParseParamsFromFile(ctx *cli.Context, xc *app.ExecutionContext, filePath string, validFlags []cli.Flag)
func ParsePathPerms ¶
func ParsePathPerms(raw string) (string, *fsutil.AccessInfo, error)
func ParsePaths ¶
func ParsePaths(values []string) map[string]*fsutil.AccessInfo
func ParsePathsCreportFile ¶
func ParsePathsCreportFile(filePath string) (map[string]*fsutil.AccessInfo, error)
///
func ParsePathsFile ¶
func ParsePathsFile(filePath string) (map[string]*fsutil.AccessInfo, error)
func ParsePortBindings ¶
func ParseTokenSet ¶
func ParseTokenSetFile ¶
func ParseVolumeMounts ¶
func ParseVolumeMounts(values []string) (map[string]config.VolumeMount, error)
func ParseVolumeMountsAsList ¶
func ParseVolumeMountsAsList(values []string) ([]config.VolumeMount, error)
func RemoveContinueAfterMode ¶
func ResolveAutoRuntime ¶
func RunHostExecProbes ¶
func RunHostExecProbes(printState bool, xc *app.ExecutionContext, hostExecProbes []string)
Types ¶
type CLIContextKey ¶
type CLIContextKey int
const ( GlobalParams CLIContextKey = 1 AppParams CLIContextKey = 2 )
type CompleteValue ¶
type CompleteValue func(ia *InteractiveApp, token string, params prompt.Document) []prompt.Suggest
type CurrentCommandState ¶
type CurrentCommandState struct { Dclient *dockerapi.Client CRTConnection string State string AllTokensList []string CurrentToken string PrevToken string PrevTokenIdx int CommandTokenIdx int GlobalFlags map[string]string Command string CommandFlags map[string][]string }
func GetCurrentCommandState ¶
func GetCurrentCommandState() *CurrentCommandState
func (*CurrentCommandState) GetCFValue ¶
func (ref *CurrentCommandState) GetCFValue(name string) string
func (*CurrentCommandState) GetCFValueWithDefault ¶
func (ref *CurrentCommandState) GetCFValueWithDefault(name string, dvalue string) string
type FlagSuggestions ¶
type FlagSuggestions struct { Names []prompt.Suggest Values map[string]CompleteValue }
type GenericParams ¶
type GenericParams struct { NoColor bool CheckVersion bool Debug bool Verbose bool QuietCLIMode bool LogLevel string LogFormat string OutputFormat string Log string StatePath string ReportLocation string InContainer bool IsDSImage bool ArchiveState string CRTConnection string CRTContext string ClientConfig *config.DockerClient CRTIOInactivityTimeout int CRTSaveInactivityTimeout int CRTCopyInactivityTimeout int }
func GlobalFlagValues ¶
func GlobalFlagValues(ctx *cli.Context) *GenericParams
func UpdateGlobalFlagValues ¶
func UpdateGlobalFlagValues(appOpts *config.AppOptions, values *GenericParams) *GenericParams
type InteractiveApp ¶
type InteractiveApp struct {
// contains filtered or unexported fields
}
func NewInteractiveApp ¶
func NewInteractiveApp(app *cli.App, gparams *GenericParams) *InteractiveApp
func (*InteractiveApp) Run ¶
func (ia *InteractiveApp) Run()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.