Documentation
¶
Index ¶
- Constants
- func AddDebugMode(command *cobra.Command, debugRun *bool)
- func AddVerboseFlag(command *cobra.Command, verbose *bool)
- func MarkFlagsRequired(command *cobra.Command, flagNames ...string) error
- func NewDebugMenuDriven() *debugMenuDriven
- func NewMenuDriven() *genericMenuDriven
- func RegisterCommand(parent *cobra.Command, children ...*cobra.Command)
- func WithDefaultValue(defaultValue string) func(*option) error
- type BlueprintUI
- type CardItem
- type CardPack
- type MenuDriven
- type ProgressAnimation
- type SummaryUI
Constants ¶
View Source
const ( RenewableLowThreshold = 10.0 RenewableMediumThreshold = 40.0 LowCarbonLowThreshold = 10.0 LowCarbonMediumThreshold = 40.0 DirectCo2LowThreshold = 200.0 DirectCo2MediumThreshold = 400.0 LCACarbonIntensityMediumThreshold = 100.0 LCACarbonIntensityHighThreshold = 200.0 )
Variables ¶
This section is empty.
Functions ¶
func AddDebugMode ¶
func AddVerboseFlag ¶
func NewDebugMenuDriven ¶
func NewDebugMenuDriven() *debugMenuDriven
func NewMenuDriven ¶
func NewMenuDriven() *genericMenuDriven
func WithDefaultValue ¶
Types ¶
type BlueprintUI ¶
type BlueprintUI struct {
// contains filtered or unexported fields
}
BlueprintUI is responsible for rendering the cluster blueprint with enhanced UI
func NewBlueprintUI ¶
func NewBlueprintUI(w io.Writer) *BlueprintUI
NewBlueprintUI creates a new instance of BlueprintUI
func (*BlueprintUI) RenderClusterBlueprint ¶
func (ui *BlueprintUI) RenderClusterBlueprint(meta controller.Metadata)
RenderClusterBlueprint renders the cluster metadata with enhanced UI
type CardPack ¶
type CardPack interface {
LenOfItems() int
GetItem(i int) CardItem
GetInstruction() string
GetResult(index int) string
GetCardConfiguration() (cardWidth, noOfVisibleItems int)
}
func ConverterForInstanceTypesForCards ¶
func ConverterForInstanceTypesForCards(vms provider.InstancesRegionOutput) CardPack
func ConverterForRecommendationIOutputForCards ¶
func ConverterForRecommendationIOutputForCards(oo *optimizer.RecommendationAcrossRegions, tt consts.KsctlClusterType) CardPack
func ConverterForRegionOutputForCards ¶
func ConverterForRegionOutputForCards(regions provider.RegionsOutput) CardPack
type MenuDriven ¶
type MenuDriven interface {
GetProgressAnimation() ProgressAnimation
Confirmation(prompt string, opts ...func(*option) error) (proceed bool, err error)
TextInput(prompt string, opts ...func(*option) error) (string, error)
TextInputPassword(prompt string) (string, error)
DropDown(prompt string, options map[string]string, opts ...func(*option) error) (string, error)
DropDownList(prompt string, options []string, opts ...func(*option) error) (string, error)
MultiSelect(prompt string, options map[string]string, opts ...func(*option) error) ([]string, error)
CardSelection(element CardPack) (string, error)
}
type ProgressAnimation ¶
type SummaryUI ¶
type SummaryUI struct {
// contains filtered or unexported fields
}
SummaryUI is responsible for rendering cluster summary with enhanced UI
func NewSummaryUI ¶
NewSummaryUI creates a new instance of SummaryUI
func (*SummaryUI) RenderClusterSummary ¶
func (ui *SummaryUI) RenderClusterSummary(summary *common.SummaryOutput)
RenderClusterSummary renders the cluster summary with enhanced UI
Click to show internal directories.
Click to hide internal directories.