options

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputModePretty = "pretty"
	OutputModeJSON   = "json"
	OutputModeWide   = "wide"
	OutputModePEM    = "pem"
)

Variables

This section is empty.

Functions

func MustSingleImageArgs

func MustSingleImageArgs(args []string) error

Types

type Image

type Image struct {
	// Platform specifies the platform in the form
	// os/arch[/variant][:osversion] (e.g. linux/amd64)
	Platform string `json:"platform"`
}

Image contains options for interacting with images

func RegisterImage

func RegisterImage(cmd *cobra.Command) *Image

RegistryImage registers image options with cobra

func (*Image) Options

func (i *Image) Options() ([]image.Option, error)

Options converts the options to a slice of image.Options

type Output

type Output struct {
	// Mode is the output format of the command. Defaults to "pretty".
	Mode string `json:"format"`
}

Output are options for configuring command outputs.

func RegisterOutputs

func RegisterOutputs(cmd *cobra.Command) *Output

func (*Output) Validate

func (o *Output) Validate() error

type Validation

type Validation struct {
	// Config is the filepath location to the validation configuration.
	Config string `json:"config"`

	// Quiet suppresses non-zero exit codes on validation failures.
	Quiet bool `json:"quiet"`

	// Permissive allows any certificate that is not otherwise forbidden. This
	// overrides the config's allow list.
	Permissive bool `json:"permissive"`
}

Validation are options for configuring validation command.

func RegisterValidation

func RegisterValidation(cmd *cobra.Command) *Validation

Jump to

Keyboard shortcuts

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