cmd

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package cmd contains mechanism of tying the cli interactions such as commands and flags to business logic layers

Index

Constants

This section is empty.

Variables

View Source
var (
	// DescribeOutputType Possible output options
	DescribeOutputType = []string{"text", "yaml"}
)
View Source
var Version = "develop"

Functions

func NewCompletionCmd added in v0.39.0

func NewCompletionCmd() *cobra.Command

func NewCopyCmd added in v0.39.0

func NewCopyCmd(o *CopyOptions) *cobra.Command

func NewDefaultImgpkgCmd

func NewDefaultImgpkgCmd(ui *ui.ConfUI) *cobra.Command

func NewDescribeCmd added in v0.39.0

func NewDescribeCmd(o *DescribeOptions) *cobra.Command

NewDescribeCmd constructor for the describe command

func NewImgpkgCmd

func NewImgpkgCmd(o *ImgpkgOptions) *cobra.Command

func NewPullCmd

func NewPullCmd(o *PullOptions) *cobra.Command

func NewPushCmd

func NewPushCmd(o *PushOptions) *cobra.Command

func NewTagCmd

func NewTagCmd() *cobra.Command

func NewTagListCmd

func NewTagListCmd(o *TagListOptions) *cobra.Command

func NewTagResolveCmd added in v0.39.0

func NewTagResolveCmd(o *TagResolveOptions) *cobra.Command

func NewVersionCmd

func NewVersionCmd(o *VersionOptions) *cobra.Command

Types

type BundleFlags added in v0.39.0

type BundleFlags struct {
	Bundle string
}

func (*BundleFlags) Set added in v0.39.0

func (b *BundleFlags) Set(cmd *cobra.Command)

func (*BundleFlags) SetCopy added in v0.39.0

func (b *BundleFlags) SetCopy(cmd *cobra.Command)

type BundleRecursiveFlags added in v0.39.0

type BundleRecursiveFlags struct {
	Recursive bool
}

func (*BundleRecursiveFlags) Set added in v0.39.0

func (b *BundleRecursiveFlags) Set(cmd *cobra.Command)

func (*BundleRecursiveFlags) SetCopy added in v0.39.0

func (b *BundleRecursiveFlags) SetCopy(cmd *cobra.Command)

type CopyOptions added in v0.39.0

type CopyOptions struct {
	ImageFlags      ImageFlags
	BundleFlags     BundleFlags
	LockInputFlags  LockInputFlags
	LockOutputFlags LockOutputFlags
	TarFlags        TarFlags
	RegistryFlags   RegistryFlags
	SignatureFlags  SignatureFlags

	RepoDst string

	Concurrency             int
	IncludeNonDistributable bool
	UseRepoBasedTags        bool
	// contains filtered or unexported fields
}

func NewCopyOptions added in v0.39.0

func NewCopyOptions(ui *ui.ConfUI) *CopyOptions

NewCopyOptions constructor for building a CopyOptions, holding values derived via flags

func (*CopyOptions) Run added in v0.39.0

func (c *CopyOptions) Run() error

type DebugFlags added in v0.39.0

type DebugFlags struct {
	Debug bool
}

DebugFlags indicates debugging

func (*DebugFlags) ConfigureDebug added in v0.39.0

func (f *DebugFlags) ConfigureDebug()

ConfigureDebug set debug output to os.Stdout

func (*DebugFlags) Set added in v0.39.0

func (f *DebugFlags) Set(cmd *cobra.Command)

Set adds the debug flag to the command

type DescribeOptions added in v0.39.0

type DescribeOptions struct {
	BundleFlags   BundleFlags
	RegistryFlags RegistryFlags

	Concurrency            int
	OutputType             string
	Layers                 bool
	IncludeCosignArtifacts bool
	// contains filtered or unexported fields
}

DescribeOptions Command Line options that can be provided to the describe command

func NewDescribeOptions added in v0.39.0

func NewDescribeOptions(ui *goui.ConfUI) *DescribeOptions

NewDescribeOptions constructor for building a DescribeOptions, holding values derived via flags

func (*DescribeOptions) Run added in v0.39.0

func (d *DescribeOptions) Run() error

Run functions called when the describe command is provided in the command line

type FileFlags

type FileFlags struct {
	Files []string

	ExcludedFilePaths   []string
	PreservePermissions bool
}

func (*FileFlags) Set

func (f *FileFlags) Set(cmd *cobra.Command)

type ImageFlags

type ImageFlags struct {
	Image string
}

func (*ImageFlags) Set

func (i *ImageFlags) Set(cmd *cobra.Command)

func (*ImageFlags) SetCopy added in v0.39.0

func (i *ImageFlags) SetCopy(cmd *cobra.Command)

type ImgpkgOptions

type ImgpkgOptions struct {
	UIFlags    UIFlags
	DebugFlags DebugFlags
	// contains filtered or unexported fields
}

func NewImgpkgOptions

func NewImgpkgOptions(ui *ui.ConfUI) *ImgpkgOptions

type IncludeNonDistributableFlag added in v0.39.0

type IncludeNonDistributableFlag struct {
	IncludeNonDistributable bool
}

func (*IncludeNonDistributableFlag) Set added in v0.39.0

type LabelFlags added in v0.39.0

type LabelFlags struct {
	Labels map[string]string
}

LabelFlags is a struct that holds the labels for an OCI artifact

func (*LabelFlags) Set added in v0.39.0

func (l *LabelFlags) Set(cmd *cobra.Command)

Set sets the labels for an OCI artifact

type LockInputFlags added in v0.39.0

type LockInputFlags struct {
	LockFilePath string
}

func (*LockInputFlags) Set added in v0.39.0

func (l *LockInputFlags) Set(cmd *cobra.Command)

type LockOutputFlags added in v0.39.0

type LockOutputFlags struct {
	LockFilePath string
}

func (*LockOutputFlags) SetOnCopy added in v0.39.0

func (l *LockOutputFlags) SetOnCopy(cmd *cobra.Command)

SetOnCopy Sets the lock-output flag for Copy command

func (*LockOutputFlags) SetOnPush added in v0.39.0

func (l *LockOutputFlags) SetOnPush(cmd *cobra.Command)

SetOnPush Sets the lock-output flag for Push command

type Logger added in v0.39.0

type Logger interface {
	Logf(str string, args ...interface{})
}

type PullOptions

type PullOptions struct {
	ImageFlags           ImageFlags
	ImageIsBundleCheck   bool
	RegistryFlags        RegistryFlags
	BundleFlags          BundleFlags
	LockInputFlags       LockInputFlags
	BundleRecursiveFlags BundleRecursiveFlags
	OutputPath           string
	// contains filtered or unexported fields
}

func NewPullOptions

func NewPullOptions(ui ui.UI) *PullOptions

func (*PullOptions) Run

func (po *PullOptions) Run() error

type PushOptions

type PushOptions struct {
	ImageFlags      ImageFlags
	BundleFlags     BundleFlags
	LockOutputFlags LockOutputFlags
	FileFlags       FileFlags
	RegistryFlags   RegistryFlags
	LabelFlags      LabelFlags
	// contains filtered or unexported fields
}

func NewPushOptions

func NewPushOptions(ui ui.UI) *PushOptions

func (*PushOptions) Run

func (po *PushOptions) Run() error

type RegistryFlags

type RegistryFlags struct {
	CACertPaths []string
	VerifyCerts bool
	Insecure    bool

	Username string
	Password string
	Token    string
	Anon     bool

	RetryCount int

	ResponseHeaderTimeout time.Duration
	ActiveKeychains       string
}

RegistryFlags command line flags to configure the registry connection

func (*RegistryFlags) AsRegistryOpts

func (r *RegistryFlags) AsRegistryOpts() registry.Opts

AsRegistryOpts convert command flags and environment variables into registry.Opts

func (*RegistryFlags) Set

func (r *RegistryFlags) Set(cmd *cobra.Command)

Set Registers the flags available to the provided command

type SignatureFlags added in v0.39.0

type SignatureFlags struct {
	CopyCosignSignatures bool
}

func (*SignatureFlags) Set added in v0.39.0

func (s *SignatureFlags) Set(cmd *cobra.Command)

type TagListOptions

type TagListOptions struct {
	ImageFlags          ImageFlags
	RegistryFlags       RegistryFlags
	Digests             bool
	IncludeInternalTags bool
	// contains filtered or unexported fields
}

func NewTagListOptions

func NewTagListOptions(ui ui.UI) *TagListOptions

func (*TagListOptions) Run

func (t *TagListOptions) Run() error

type TagResolveOptions added in v0.39.0

type TagResolveOptions struct {
	ImageFlags    ImageFlags
	RegistryFlags RegistryFlags
	// contains filtered or unexported fields
}

func NewTagResolveOptions added in v0.39.0

func NewTagResolveOptions(ui ui.UI) *TagResolveOptions

func (*TagResolveOptions) Run added in v0.39.0

func (t *TagResolveOptions) Run() error

type TarFlags added in v0.39.0

type TarFlags struct {
	TarSrc string
	TarDst string
	Resume bool
}

func (TarFlags) IsDst added in v0.39.0

func (t TarFlags) IsDst() bool

func (TarFlags) IsSrc added in v0.39.0

func (t TarFlags) IsSrc() bool

func (*TarFlags) Set added in v0.39.0

func (t *TarFlags) Set(cmd *cobra.Command)

type UIFlags

type UIFlags struct {
	TTY            bool
	Color          bool
	JSON           bool
	NonInteractive bool
	Columns        []string
}

func (*UIFlags) ConfigureUI

func (f *UIFlags) ConfigureUI(ui *ui.ConfUI)

func (*UIFlags) Set

func (f *UIFlags) Set(cmd *cobra.Command)

type VersionOptions

type VersionOptions struct {
	// contains filtered or unexported fields
}

func NewVersionOptions

func NewVersionOptions(ui ui.UI) *VersionOptions

func (*VersionOptions) Run

func (o *VersionOptions) Run() error

Jump to

Keyboard shortcuts

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