Files
helmfile/pkg/config/destroy.go
T
yxxhero 9284d1764e Add --interactive option to sync, delete and destroy / Remove --interactive from global options (#328)
* add interactive in sync & remove --interactive in global options

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix unittest

Signed-off-by: yxxhero <aiopsclub@163.com>

* same behave as apply when in interactive

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
2022-08-28 10:36:07 +09:00

53 lines
1.2 KiB
Go

package config
// DestroyOptions is the options for the build command
type DestroyOptions struct {
// Args is the args to pass to helm exec
Args string
// Concurrency is the maximum number of concurrent helm processes to run, 0 is unlimited
Concurrency int
// SkipDeps is the skip deps flag
SkipDeps bool
// Interactive is true if the user should be prompted for input.
Interactive bool
}
// NewDestroyOptions creates a new Apply
func NewDestroyOptions() *DestroyOptions {
return &DestroyOptions{}
}
// DestroyImpl is impl for applyOptions
type DestroyImpl struct {
*GlobalImpl
*DestroyOptions
}
// NewDestroyImpl creates a new DestroyImpl
func NewDestroyImpl(g *GlobalImpl, b *DestroyOptions) *DestroyImpl {
return &DestroyImpl{
GlobalImpl: g,
DestroyOptions: b,
}
}
// Concurrency returns the concurrency
func (c *DestroyImpl) Concurrency() int {
return c.DestroyOptions.Concurrency
}
// Args returns the args
func (c *DestroyImpl) Args() string {
return c.DestroyOptions.Args
}
// SkipDeps returns the skip deps
func (c *DestroyImpl) SkipDeps() bool {
return c.DestroyOptions.SkipDeps
}
// Interactive returns the Interactive
func (c *DestroyImpl) Interactive() bool {
return c.DestroyOptions.Interactive
}