command

package
v0.0.0-...-56bb938 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApplyCommand = NewHelmfileCommand(
	"apply",
	"Apply Helmfile releases, similar to `helmfile apply`",
	true,
	false,
	[]string{"apply", "-i"},
)
View Source
var DiffCommand = NewHelmfileCommand(
	"diff",
	"Diff Helmfile releases, similar to `helmfile diff`",
	true,
	false,
	[]string{"diff"},
)
View Source
var ErrConfig = errors.New("configuration error")
View Source
var ErrEnvNotSet = errors.New("-e/--environment must be set")
View Source
var SyncCommand = NewHelmfileCommand(
	"sync",
	"Sync Helmfile releases, similar to `helmfile sync`",
	true,
	false,
	[]string{"sync", "-i"},
)
View Source
var TemplateCommand = NewHelmfileCommand(
	"template",
	"Template Helmfile releases, similar to `helmfile template`",
	false,
	true,
	[]string{"template", "-i"},
)

Functions

func Usage

func Usage(cmd Command) func()

Types

type Command

type Command interface {
	Name() string
	FlagSet() *flag.FlagSet
	Description() string
	Run() error
}

type HelmfileCommand

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

func NewHelmfileCommand

func NewHelmfileCommand(
	name string,
	description string,
	validateAPIServer bool,
	usePager bool,
	args []string,
) *HelmfileCommand

func (HelmfileCommand) CurrentAPIServer

func (HelmfileCommand) CurrentAPIServer() (string, error)

func (*HelmfileCommand) Description

func (cmd *HelmfileCommand) Description() string

func (*HelmfileCommand) FlagSet

func (cmd *HelmfileCommand) FlagSet() *flag.FlagSet

func (*HelmfileCommand) Name

func (cmd *HelmfileCommand) Name() string

func (*HelmfileCommand) Run

func (cmd *HelmfileCommand) Run() error

func (HelmfileCommand) ValidateConfig

func (cmd HelmfileCommand) ValidateConfig(config apis.Config, env string, validateAPIServer bool) error

type HelpCommand

type HelpCommand struct {
}

func (HelpCommand) Description

func (HelpCommand) Description() string

func (HelpCommand) FlagSet

func (HelpCommand) FlagSet() *flag.FlagSet

func (HelpCommand) Name

func (HelpCommand) Name() string

func (HelpCommand) Run

func (HelpCommand) Run() error

type VersionCommand

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

func (VersionCommand) CurrentAPIServer

func (VersionCommand) CurrentAPIServer() (string, error)

func (*VersionCommand) Description

func (*VersionCommand) Description() string

func (*VersionCommand) FlagSet

func (cmd *VersionCommand) FlagSet() *flag.FlagSet

func (*VersionCommand) Name

func (*VersionCommand) Name() string

func (*VersionCommand) Run

func (cmd *VersionCommand) Run() error

func (VersionCommand) ValidateConfig

func (cmd VersionCommand) ValidateConfig(config apis.Config, env string, validateAPIServer bool) error

Jump to

Keyboard shortcuts

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