cmd

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 77 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HouseKeepingMessagesAllowedAnnotation = "skaffold_annotation_housekeeping_allowed"
)

Annotation for commands that should allow post execution housekeeping messages like updates and surveys

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd *cobra.Command)

AddFlags adds to the command the common flags that are annotated with the command name.

func FlagToEnvVarName

func FlagToEnvVarName(f *pflag.Flag) string

func NewCmdApply

func NewCmdApply() *cobra.Command

NewCmdApply describes the CLI command to apply manifests to a cluster.

func NewCmdBuild

func NewCmdBuild() *cobra.Command

NewCmdBuild describes the CLI command to build artifacts.

func NewCmdCompletion

func NewCmdCompletion() *cobra.Command

NewCmdCompletion returns the cobra command that outputs shell completion code

func NewCmdConfig

func NewCmdConfig() *cobra.Command

func NewCmdCredits

func NewCmdCredits() *cobra.Command

func NewCmdDebug

func NewCmdDebug() *cobra.Command

NewCmdDebug describes the CLI command to run a pipeline in debug mode. Unlike `dev`, `debug` defaults `auto-build` and `auto-deploy` to `false`.

func NewCmdDelete

func NewCmdDelete() *cobra.Command

NewCmdDelete describes the CLI command to delete deployed resources.

func NewCmdDeploy

func NewCmdDeploy() *cobra.Command

NewCmdDeploy describes the CLI command to deploy artifacts.

func NewCmdDev

func NewCmdDev() *cobra.Command

NewCmdDev describes the CLI command to run a pipeline in development mode.

func NewCmdDiagnose

func NewCmdDiagnose() *cobra.Command

NewCmdDiagnose describes the CLI command to diagnose skaffold.

func NewCmdExec added in v2.4.0

func NewCmdExec() *cobra.Command

NewCmdExec describes the CLI command to execute a custom action.

func NewCmdFilter

func NewCmdFilter() *cobra.Command

NewCmdFilter describes the CLI command to filter and transform a set of Kubernetes manifests.

func NewCmdFindConfigs

func NewCmdFindConfigs() *cobra.Command

NewCmdFindConfigs list the skaffold config files in the specified directory.

func NewCmdFix

func NewCmdFix() *cobra.Command

func NewCmdGeneratePipeline

func NewCmdGeneratePipeline() *cobra.Command

func NewCmdInit

func NewCmdInit() *cobra.Command

NewCmdInit describes the CLI command to generate a Skaffold configuration.

func NewCmdInspect

func NewCmdInspect() *cobra.Command

func NewCmdLSP

func NewCmdLSP() *cobra.Command

func NewCmdLint

func NewCmdLint() *cobra.Command

func NewCmdList

func NewCmdList() *cobra.Command

func NewCmdOptions

func NewCmdOptions() *cobra.Command

func NewCmdRender

func NewCmdRender() *cobra.Command

NewCmdRender describes the CLI command to build artifacts render Kubernetes manifests.

func NewCmdRun

func NewCmdRun() *cobra.Command

NewCmdRun describes the CLI command to run a pipeline.

func NewCmdSchema

func NewCmdSchema() *cobra.Command

func NewCmdSchemaGet

func NewCmdSchemaGet() *cobra.Command

func NewCmdSchemaList

func NewCmdSchemaList() *cobra.Command

func NewCmdSet

func NewCmdSet() *cobra.Command

func NewCmdSurvey

func NewCmdSurvey() *cobra.Command

func NewCmdTest

func NewCmdTest() *cobra.Command

NewCmdTest describes the CLI command to test artifacts.

func NewCmdUnset

func NewCmdUnset() *cobra.Command

func NewCmdVerify

func NewCmdVerify() *cobra.Command

NewCmdVerify describes the CLI command to verify artifacts.

func NewCmdVersion

func NewCmdVersion() *cobra.Command

func NewSkaffoldCommand

func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command

func ResetFlagDefaults

func ResetFlagDefaults(cmd *cobra.Command, flags []*Flag)

func ShouldSuppressErrorReporting

func ShouldSuppressErrorReporting(c *cobra.Command) bool

Types

type Builder

type Builder interface {
	WithArgs(cobra.PositionalArgs, func(context.Context, io.Writer, []string) error) *cobra.Command
	WithDescription(description string) Builder
	WithLongDescription(long string) Builder
	WithExample(comment, command string) Builder
	WithFlagAdder(adder func(*pflag.FlagSet)) Builder
	WithFlags([]*Flag) Builder
	WithHouseKeepingMessages() Builder
	WithCommonFlags() Builder
	Hidden() Builder
	ExactArgs(argCount int, action func(context.Context, io.Writer, []string) error) *cobra.Command
	NoArgs(action func(context.Context, io.Writer) error) *cobra.Command
	WithCommands(cmds ...*cobra.Command) *cobra.Command
	WithPersistentFlagAdder(adder func(*pflag.FlagSet)) Builder
	WithPostRunHook(hook func(error) error) Builder
	SuppressErrorReporting() Builder
}

Builder is used to build cobra commands.

func NewCmd

func NewCmd(use string) Builder

NewCmd creates a new command builder.

type DefaultRepoFn

type DefaultRepoFn func(string) (string, error)

DefaultRepoFn takes an image tag and returns either a new tag with the default repo prefixed, or the original tag if no default repo is specified.

type Flag

type Flag struct {
	Name                 string
	Shorthand            string
	Usage                string
	Value                interface{}
	DefValue             interface{}
	DefValuePerCommand   map[string]interface{}
	DeprecatedPerCommand map[string]interface{}
	NoOptDefVal          string
	FlagAddMethod        string
	Deprecated           string
	DefinedOn            []string
	Hidden               bool
	IsEnum               bool
}

Flag defines a Skaffold CLI flag which contains a list of subcommands the flag belongs to in `DefinedOn` field. See https://pkg.go.dev/github.com/spf13/pflag#Flag

type Nillable

type Nillable interface {
	SetNil() error
}

Nillable is used to reset objects that implement pflag's `Value` and `SliceValue`. Some flags, like `--default-repo`, use nil to indicate that they are unset, which is different from the empty string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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