Documentation
¶
Overview ¶
Package options implements the generic logic to manage the common options shared by all the falcoctl commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶ added in v0.6.0
type Artifact struct { ArtifactType oci.ArtifactType Name string Version string Platforms []string // orders matter (same as args) Dependencies []string Requirements []string Tags []string AnnotationSource string }
Artifact specific options. Commands that need these options may embed this struct in their options.
type Common ¶ added in v0.6.0
type Common struct { // Printer used by all commands to output messages. Printer *output.Printer // Config file. It must not be possible to be reinitialized by subcommands, // using the Initialize function. It will be attached as global flags. ConfigFile string // IndexCache caches the entries for the configured indexes. IndexCache *cache.Cache // contains filtered or unexported fields }
Common provides the common flags, options, and printers for all the commands. All the fields provided by the Common will be initialized before the commands are executed through the Initialize func.
func (*Common) Initialize ¶ added in v0.6.0
Initialize initializes the options based on the configs. Subsequent calls will overwrite the previous configurations based on the new configs passed to the functions.
type Configs ¶
type Configs func(options *Common)
Configs type of the configs accepted by the Initialize function.
func WithIndexCache ¶
WithIndexCache sets the index cache.
func WithPrinterScope ¶
WithPrinterScope sets the scope for the printer.
func WithWriter ¶
WithWriter sets the writer for the printer.