Documentation
¶
Overview ¶
Package commands defines structures and variables used to parse command line input
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassicArgs ¶
type ClassicArgs struct {
ImageDefinition string `` /* 168-byte string literal not displayed */
}
ClassicArgs holds the gadget tree. positional arguments need their own struct
type ClassicCommand ¶
type ClassicCommand struct {
ClassicArgsPassed ClassicArgs `positional-args:"true" required:"false"`
}
type CommonOpts ¶
type CommonOpts struct { Debug bool `long:"debug" description:"Enable debugging output"` Verbose bool `short:"v" long:"verbose" description:"Enable verbose output"` Quiet bool `short:"q" long:"quiet" description:"Turn off all output"` Size string `` /* 447-byte string literal not displayed */ DiskInfo string `` /* 246-byte string literal not displayed */ OutputDir string `` /* 618-byte string literal not displayed */ Version bool `long:"version" description:"Print the version number of ubuntu-image and exit"` Channel string `short:"c" long:"channel" description:"The default snap channel to use" value-name:"CHANNEL"` SectorSize string `` //nolint:staticcheck,SA5008 /* 191-byte string literal not displayed */ Validation string `long:"validation" description:"Control whether validations should be ignored or enforced" choice:"ignore" choice:"enforce"` //nolint:staticcheck,SA5008 // The library we use to handle command-line flags (github.com/jessevdk/go-flags) relies on this method to list valid values for a flag, even though this is not a recommended way. // Ignore these warnings until we use another library. DryRun bool `long:"dry-run" description:"Print the states to be executed to build the image and return."` }
CommonOpts stores the options that are common to all image types
type PackCommand ¶
type PackCommand struct {
PackOptsPassed PackOpts `required:"true"`
}
type PackOpts ¶
type PackOpts struct { ArtifactType string `long:"artifact-type" description:"Type of the resulting disk image file." required:"true" default:"raw" choice:"raw"` GadgetDir string `` /* 148-byte string literal not displayed */ RootfsDir string `long:"rootfs-dir" description:"Directory containing the rootfs" required:"true"` }
PackOpts holds all flags that are specific to the pack command
type SnapArgs ¶
type SnapArgs struct {
ModelAssertion string `` /* 190-byte string literal not displayed */
}
SnapArgs holds the model Assertion
type SnapCommand ¶
type SnapOpts ¶
type SnapOpts struct { DisableConsoleConf bool `long:"disable-console-conf" description:"Disable console-conf on the resulting image."` FactoryImage bool `long:"factory-image" description:"Hint that the image is meant to boot in a device factory."` Preseed bool `long:"preseed" description:"Preseed the image (UC20 only)."` AppArmorKernelFeaturesDir string `long:"apparmor-features-dir" description:"Optional path to apparmor kernel features directory"` PreseedSignKey string `long:"preseed-sign-key" description:"Name of the key to use to sign preseed assertion, otherwise use the default key"` Snaps []string `` /* 248-byte string literal not displayed */ Components []string `` /* 126-byte string literal not displayed */ CloudInit string `long:"cloud-init" description:"cloud-config data to be copied to the image" value-name:"USER-DATA-FILE"` Revisions map[string]int `long:"revision" description:"The revision of a specific snap to install in the image." value-name:"REVISION"` SysfsOverlay string `` /* 192-byte string literal not displayed */ }
SnapOpts holds all flags that are specific to the snap command
type StateMachineOpts ¶
type StateMachineOpts struct { WorkDir string `` /* 563-byte string literal not displayed */ Until string `` /* 161-byte string literal not displayed */ Thru string `` /* 158-byte string literal not displayed */ Resume bool `` /* 143-byte string literal not displayed */ }
StateMachineOpts stores the options that are related to the state machine
type UbuntuImageCommand ¶
type UbuntuImageCommand struct { Snap SnapCommand `command:"snap"` Classic ClassicCommand `command:"classic"` Pack PackCommand `command:"pack" hidden:"true"` }
UbuntuImageCommand is needed for the parser to store positional arguments and flags
Click to show internal directories.
Click to hide internal directories.