commandflag

package
v0.8.17 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgOpts

type ArgOpts struct {
	Required bool `description:"Require argument to be non-empty"                       long:"required"`
	Global   bool `description:"Global argument to make available to all other targets" long:"global"`
}

type BuildOpts

type BuildOpts struct {
	Platforms       []string `description:"The platform to use"                                              long:"platform"`         //nolint:lll
	BuildArgs       []string `description:"A build arg override passed on to a referenced EarthBuild target" long:"build-arg"`        //nolint:lll
	AllowPrivileged bool     `description:"Allow targets to assume privileged mode"                          long:"allow-privileged"` //nolint:lll
	PassArgs        bool     `description:"Pass arguments to external targets"                               long:"pass-args"`        //nolint:lll
	AutoSkip        bool     `description:"Use auto-skip to bypass the target if nothing has changed"        long:"auto-skip"`        //nolint:lll
}

type CacheOpts

type CacheOpts struct {
	Sharing string `description:"The cache sharing mode: locked (default), shared, private"                 long:"sharing"`
	Mode    string `` //nolint:lll
	/* 147-byte string literal not displayed */
	ID      string `description:"Cache ID, to reuse the same cache across different targets and Earthfiles" long:"id"`
	Persist bool   `description:"If should persist cache state in image"                                    long:"persist"`
}

type CopyOpts

type CopyOpts struct {
	From            string   `description:"Not supported"                                                           long:"from"`              //nolint:lll
	Chown           string   `description:"Apply a specific group and/or owner to the copied files and directories" long:"chown"`             //nolint:lll
	Chmod           string   `description:"Apply a mode to the copied files and directories"                        long:"chmod"`             //nolint:lll
	Platform        string   `description:"The platform to use"                                                     long:"platform"`          //nolint:lll
	BuildArgs       []string `description:"A build arg override passed on to a referenced EarthBuild target"        long:"build-arg"`         //nolint:lll
	IsDirCopy       bool     `description:"Copy entire directories, not just the contents"                          long:"dir"`               //nolint:lll
	KeepTs          bool     `description:"Keep created time file timestamps"                                       long:"keep-ts"`           //nolint:lll
	KeepOwn         bool     `description:"Keep owner info"                                                         long:"keep-own"`          //nolint:lll
	IfExists        bool     `description:"Do not fail if the artifact does not exist"                              long:"if-exists"`         //nolint:lll
	SymlinkNoFollow bool     `description:"Do not follow symlinks"                                                  long:"symlink-no-follow"` //nolint:lll
	AllowPrivileged bool     `description:"Allow targets to assume privileged mode"                                 long:"allow-privileged"`  //nolint:lll
	PassArgs        bool     `description:"Pass arguments to external targets"                                      long:"pass-args"`         //nolint:lll
}

type DoOpts

type DoOpts struct {
	AllowPrivileged bool `description:"Allow targets to assume privileged mode" long:"allow-privileged"`
	PassArgs        bool `description:"Pass arguments to external targets"      long:"pass-args"`
}

type ForOpts

type ForOpts struct {
	Separators string   `description:"The separators to use for tokenizing the output of the IN expression. Defaults to '\n\t '" long:"sep"`        //nolint:lll
	Secrets    []string `description:"Make available a secret"                                                                   long:"secret"`     //nolint:lll
	Mounts     []string `description:"Mount a file or directory"                                                                 long:"mount"`      //nolint:lll
	Privileged bool     `description:"Enable privileged mode"                                                                    long:"privileged"` //nolint:lll
	WithSSH    bool     `description:"Make available the SSH agent of the host"                                                  long:"ssh"`        //nolint:lll
	NoCache    bool     `description:"Always run this specific item, ignoring cache"                                             long:"no-cache"`   //nolint:lll
}

func NewForOpts

func NewForOpts() ForOpts

NewForOpts creates and returns a ForOpts with default separators.

type FromDockerfileOpts

type FromDockerfileOpts struct {
	Platform string `` //nolint:lll
	/* 129-byte string literal not displayed */
	Target string `` //nolint:lll
	/* 127-byte string literal not displayed */
	Path      string   `description:"The Dockerfile location on the host, relative to the current Earthfile, or as an artifact reference" short:"f"` //nolint:lll
	BuildArgs []string ``                                                                                                                            //nolint:lll
	/* 130-byte string literal not displayed */
	AllowPrivileged bool `` //nolint:lll
	/* 137-byte string literal not displayed */
}

type FromOpts

type FromOpts struct {
	Platform        string   `description:"The platform to use"                                              long:"platform"`         //nolint:lll
	BuildArgs       []string `description:"A build arg override passed on to a referenced EarthBuild target" long:"build-arg"`        //nolint:lll
	AllowPrivileged bool     `description:"Allow commands under remote targets to enable privileged mode"    long:"allow-privileged"` //nolint:lll
	PassArgs        bool     `description:"Pass arguments to external targets"                               long:"pass-args"`        //nolint:lll
}

type GitCloneOpts

type GitCloneOpts struct {
	Branch string `description:"The git ref to use when cloning"   long:"branch"`
	KeepTs bool   `description:"Keep created time file timestamps" long:"keep-ts"`
}

type HealthCheckOpts

type HealthCheckOpts struct {
	Interval time.Duration `` //nolint:lll
	/* 210-byte string literal not displayed */
	Timeout time.Duration `` //nolint:lll
	/* 209-byte string literal not displayed */
	StartPeriod time.Duration `` //nolint:lll
	/* 135-byte string literal not displayed */
	Retries int `` //nolint:lll
	/* 209-byte string literal not displayed */
	StartInterval time.Duration `` //nolint:lll
	/* 216-byte string literal not displayed */
}

type IfOpts

type IfOpts struct {
	Secrets    []string `description:"Make available a secret"                       long:"secret"`
	Mounts     []string `description:"Mount a file or directory"                     long:"mount"`
	Privileged bool     `description:"Enable privileged mode"                        long:"privileged"`
	WithSSH    bool     `description:"Make available the SSH agent of the host"      long:"ssh"`
	NoCache    bool     `description:"Always run this specific item, ignoring cache" long:"no-cache"`
}

type ImportOpts

type ImportOpts struct {
	AllowPrivileged bool `description:"Allow targets to assume privileged mode" long:"allow-privileged"`
	PassArgs        bool `description:"Pass arguments to external targets"      long:"pass-args"`
}

type LetOpts

type LetOpts struct{}

type ProjectOpts

type ProjectOpts struct{}

type RunOpts

type RunOpts struct {
	OIDC       string   `description:"make credentials from oidc provider (currently only works with AWS) available to RUN commands"  long:"oidc"`    //nolint:lll
	Network    string   `description:"Network to use; currently network=none is only supported"                                       long:"network"` //nolint:lll
	Secrets    []string `description:"Make available a secret"                                                                        long:"secret"`  //nolint:lll
	Mounts     []string `description:"Mount a file or directory"                                                                      long:"mount"`   //nolint:lll
	Push       bool     `description:"Execute this command only if the build succeeds and also if earthbuild is invoked in push mode" long:"push"`    //nolint:lll
	Privileged bool     ``                                                                                                                            //nolint:lll
	/* 126-byte string literal not displayed */
	WithEntrypoint bool `` //nolint:lll
	/* 126-byte string literal not displayed */
	WithDocker bool `` //nolint:lll
	/* 127-byte string literal not displayed */
	WithSSH     bool `description:"Make available the SSH agent of the host"                                                       long:"ssh"`      //nolint:lll
	WithAWS     bool `description:"Make any AWS credentials set in the environment available to RUN commands"                      long:"aws"`      //nolint:lll
	NoCache     bool `description:"Always run this specific item, ignoring cache"                                                  long:"no-cache"` //nolint:lll
	Interactive bool ``                                                                                                                             //nolint:lll
	/* 127-byte string literal not displayed */
	InteractiveKeep bool `` //nolint:lll
	/* 132-byte string literal not displayed */
	RawOutput bool `` //nolint:lll
	/* 126-byte string literal not displayed */
}

type SaveArtifactOpts

type SaveArtifactOpts struct {
	KeepTs bool `` //nolint:lll
	/* 140-byte string literal not displayed */
	KeepOwn bool `` //nolint:lll
	/* 141-byte string literal not displayed */
	IfExists bool `` //nolint:lll
	/* 142-byte string literal not displayed */
	SymlinkNoFollow bool `` //nolint:lll
	/* 150-byte string literal not displayed */
	Force bool `` //nolint:lll
	/* 138-byte string literal not displayed */
}

type SaveImageOpts

type SaveImageOpts struct {
	CacheFrom []string `` //nolint:lll
	/* 151-byte string literal not displayed */
	Push bool `` //nolint:lll
	/* 145-byte string literal not displayed */
	CacheHint bool `` //nolint:lll
	/* 151-byte string literal not displayed */
	Insecure bool `` //nolint:lll
	/* 149-byte string literal not displayed */
	NoManifestList bool `` //nolint:lll
	/* 157-byte string literal not displayed */
	WithoutEarthlyLabels bool `` //nolint:lll
	/* 163-byte string literal not displayed */
}

type SetOpts

type SetOpts struct{}

type WithDockerOpts

type WithDockerOpts struct {
	Platform        string   `description:"The platform to use"                                             long:"platform"` //nolint:lll
	CacheID         string   `description:"When specified, layer data will be persisted to specified cache" long:"cache-id"` //nolint:lll
	ComposeFiles    []string `description:"A compose file used to bring up services from"                   long:"compose"`  //nolint:lll
	ComposeServices []string `description:"A compose service to bring up"                                   long:"service"`  //nolint:lll
	Loads           []string `description:"An image produced by Earthly which is loaded as a Docker image"  long:"load"`
	BuildArgs       []string `description:"A build arg override passed on to a referenced Earthly target"   long:"build-arg"` //nolint:lll
	Pulls           []string `description:"An image which is pulled and made available in the docker cache" long:"pull"`
	AllowPrivileged bool     `description:"Allow targets referenced by load to assume privileged mode"      long:"allow-privileged"` //nolint:lll
	PassArgs        bool     `description:"Pass arguments to external targets"                              long:"pass-args"`        //nolint:lll
}

Jump to

Keyboard shortcuts

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