selector

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ReleasesFlagName = "release"

ReleasesFlagName constant used for the --release flag name (public because the render package creates an alias for this flag)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

type Options

type Options struct {
	// IncludeBulkFlags include bulk destination selection flags such as --destination-type, --environment-template, and so on
	IncludeBulkFlags bool
	// RequireDestination require at least one destination be specified with -e / -c flags
	RequireDestination bool
}

type Selection

type Selection struct {
	// IsReleaseScoped true if the user supplied the names of releases (like "agora", "cromwell"), false if they supplied "ALL"
	IsReleaseScoped bool
	// Releases is the set of matching releases
	Releases []terra.Release
	// SingleChart true if we're using a single release name
	SingleChart bool
	// AppReleasesOnly true if all matched releases are application releases
	AppReleasesOnly bool
}

Selection describes the set of releases that match user-supplied CLI flags

type Selector

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

func NewSelector

func NewSelector(options ...Option) *Selector

func (*Selector) AddFlags

func (s *Selector) AddFlags(cobraCommand *cobra.Command)

AddFlags adds selector CLI flags to cobra command

func (*Selector) GetSelection

func (s *Selector) GetSelection(state terra.State, pflags *pflag.FlagSet, args []string) (*Selection, error)

Jump to

Keyboard shortcuts

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