cmd

package
v1.39.18 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 70 Imported by: 1

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 added in v0.30.0

func AddFlags(cmd *cobra.Command)

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

func FlagToEnvVarName added in v0.20.0

func FlagToEnvVarName(f *pflag.Flag) string

func NewCmdApply added in v1.21.0

func NewCmdApply() *cobra.Command

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

func NewCmdBuild added in v0.6.0

func NewCmdBuild() *cobra.Command

NewCmdBuild describes the CLI command to build artifacts.

func NewCmdCompletion added in v0.4.0

func NewCmdCompletion() *cobra.Command

NewCmdCompletion returns the cobra command that outputs shell completion code

func NewCmdConfig added in v0.13.0

func NewCmdConfig() *cobra.Command

func NewCmdCredits added in v1.0.0

func NewCmdCredits() *cobra.Command

func NewCmdDebug added in v0.26.0

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 added in v0.7.0

func NewCmdDelete() *cobra.Command

NewCmdDelete describes the CLI command to delete deployed resources.

func NewCmdDeploy added in v0.7.0

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 added in v0.16.0

func NewCmdDiagnose() *cobra.Command

NewCmdDiagnose describes the CLI command to diagnose skaffold.

func NewCmdFilter added in v1.7.1

func NewCmdFilter() *cobra.Command

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

func NewCmdFindConfigs added in v0.32.0

func NewCmdFindConfigs() *cobra.Command

NewCmdFindConfigs list the skaffold config files in the specified directory.

func NewCmdFix added in v0.4.0

func NewCmdFix() *cobra.Command

func NewCmdInit added in v0.14.0

func NewCmdInit() *cobra.Command

NewCmdInit describes the CLI command to generate a Skaffold configuration.

func NewCmdInspect added in v1.24.0

func NewCmdInspect() *cobra.Command

func NewCmdLSP added in v1.36.0

func NewCmdLSP() *cobra.Command

func NewCmdLint added in v1.34.0

func NewCmdLint() *cobra.Command

func NewCmdList added in v0.31.0

func NewCmdList() *cobra.Command

func NewCmdOptions added in v0.34.0

func NewCmdOptions() *cobra.Command

func NewCmdRender added in v0.39.0

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 added in v1.1.0

func NewCmdSchema() *cobra.Command

func NewCmdSchemaGet added in v1.1.0

func NewCmdSchemaGet() *cobra.Command

func NewCmdSchemaList added in v1.1.0

func NewCmdSchemaList() *cobra.Command

func NewCmdSet added in v0.31.0

func NewCmdSet() *cobra.Command

func NewCmdSurvey added in v1.7.1

func NewCmdSurvey() *cobra.Command

func NewCmdTest added in v1.18.0

func NewCmdTest() *cobra.Command

NewCmdTest describes the CLI command to test artifacts.

func NewCmdUnset added in v0.31.0

func NewCmdUnset() *cobra.Command

func NewCmdVersion

func NewCmdVersion() *cobra.Command

func NewSkaffoldCommand

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

func ResetFlagDefaults added in v1.21.0

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

func ShouldSuppressErrorReporting added in v1.34.1

func ShouldSuppressErrorReporting(c *cobra.Command) bool

Types

type Builder added in v0.31.0

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 added in v0.31.0

func NewCmd(use string) Builder

NewCmd creates a new command builder.

type DefaultRepoFn added in v1.21.0

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 added in v0.30.0

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 added in v1.22.0

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
statik
Package statik contains static assets.
Package statik contains static assets.

Jump to

Keyboard shortcuts

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