cmd

package
v0.31.6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 24 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.22.0

func NewCompletionCmd() *cobra.Command

func NewCopyCmd added in v0.22.0

func NewCopyCmd(o *CopyOptions) *cobra.Command

func NewDefaultImgpkgCmd

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

func NewDescribeCmd added in v0.26.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.22.0

func NewTagResolveCmd(o *TagResolveOptions) *cobra.Command

func NewVersionCmd

func NewVersionCmd(o *VersionOptions) *cobra.Command

Types

type BundleFlags added in v0.22.0

type BundleFlags struct {
	Bundle string
}

func (*BundleFlags) Set added in v0.22.0

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

func (*BundleFlags) SetCopy added in v0.22.0

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

type BundleRecursiveFlags added in v0.22.0

type BundleRecursiveFlags struct {
	Recursive bool
}

func (*BundleRecursiveFlags) Set added in v0.22.0

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

func (*BundleRecursiveFlags) SetCopy added in v0.22.0

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

type CopyOptions added in v0.22.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.22.0

func NewCopyOptions(ui *ui.ConfUI) *CopyOptions

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

func (*CopyOptions) Run added in v0.22.0

func (c *CopyOptions) Run() error

type CopyRepoSrc added in v0.22.0

type CopyRepoSrc struct {
	ImageFlags              ImageFlags
	BundleFlags             BundleFlags
	LockInputFlags          LockInputFlags
	TarFlags                TarFlags
	IncludeNonDistributable bool
	Concurrency             int
	// contains filtered or unexported fields
}

func (CopyRepoSrc) CopyToRepo added in v0.22.0

func (c CopyRepoSrc) CopyToRepo(repo string) (*ctlimgset.ProcessedImages, error)

func (CopyRepoSrc) CopyToTar added in v0.22.0

func (c CopyRepoSrc) CopyToTar(dstPath string, resume bool) error

CopyToTar copies image or bundle into the provided path

type DebugFlags added in v0.22.0

type DebugFlags struct {
	Debug bool
}

DebugFlags indicates debugging

func (*DebugFlags) ConfigureDebug added in v0.22.0

func (f *DebugFlags) ConfigureDebug()

ConfigureDebug set debug output to os.Stdout

func (*DebugFlags) Set added in v0.22.0

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

Set adds the debug flag to the command

type DescribeOptions added in v0.26.0

type DescribeOptions struct {
	BundleFlags   BundleFlags
	RegistryFlags RegistryFlags

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

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

func NewDescribeOptions added in v0.26.0

func NewDescribeOptions(ui *goui.ConfUI) *DescribeOptions

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

func (*DescribeOptions) Run added in v0.26.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
}

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.22.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.22.0

type IncludeNonDistributableFlag struct {
	IncludeNonDistributable bool
}

func (*IncludeNonDistributableFlag) Set added in v0.22.0

type LockInputFlags added in v0.22.0

type LockInputFlags struct {
	LockFilePath string
}

func (*LockInputFlags) Set added in v0.22.0

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

type LockOutputFlags added in v0.22.0

type LockOutputFlags struct {
	LockFilePath string
}

func (*LockOutputFlags) SetOnCopy added in v0.29.0

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

SetOnCopy Sets the lock-output flag for Copy command

func (*LockOutputFlags) SetOnPush added in v0.29.0

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

SetOnPush Sets the lock-output flag for Push command

type Logger added in v0.22.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
	// 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
}

func (*RegistryFlags) AsRegistryOpts

func (r *RegistryFlags) AsRegistryOpts() 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.22.0

type SignatureFlags struct {
	CopyCosignSignatures bool
}

func (*SignatureFlags) Set added in v0.22.0

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

type SignatureRetriever added in v0.22.0

type SignatureRetriever interface {
	Fetch(images *imageset.UnprocessedImageRefs) (*imageset.UnprocessedImageRefs, error)
}

type TagListOptions

type TagListOptions struct {
	ImageFlags    ImageFlags
	RegistryFlags RegistryFlags
	Digests       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.22.0

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

func NewTagResolveOptions added in v0.22.0

func NewTagResolveOptions(ui ui.UI) *TagResolveOptions

func (*TagResolveOptions) Run added in v0.22.0

func (t *TagResolveOptions) Run() error

type TarFlags added in v0.22.0

type TarFlags struct {
	TarSrc string
	TarDst string
	Resume bool
}

func (TarFlags) IsDst added in v0.22.0

func (t TarFlags) IsDst() bool

func (TarFlags) IsSrc added in v0.22.0

func (t TarFlags) IsSrc() bool

func (*TarFlags) Set added in v0.22.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