cli

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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 AddDebugMode(command *cobra.Command, debugRun *bool)

func AddVerboseFlag

func AddVerboseFlag(command *cobra.Command, verbose *bool)

func MarkFlagsRequired

func MarkFlagsRequired(command *cobra.Command, flagNames ...string) error

func NewDebugMenuDriven

func NewDebugMenuDriven() *debugMenuDriven

func NewMenuDriven

func NewMenuDriven() *genericMenuDriven

func RegisterCommand

func RegisterCommand(parent *cobra.Command, children ...*cobra.Command)

func WithDefaultValue

func WithDefaultValue(defaultValue string) func(*option) error

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 CardItem

type CardItem interface {
	GetUpper() string
	GetLower() string
}

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 ConverterForRegionOutputForCards

func ConverterForRegionOutputForCards(regions provider.RegionsOutput) CardPack
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 ProgressAnimation interface {
	Start(msg ...any)
	StopWithSuccess(msg ...any)
	StopWithFailure(msg ...any)
	Stop()
}

type SummaryUI

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

SummaryUI is responsible for rendering cluster summary with enhanced UI

func NewSummaryUI

func NewSummaryUI(w io.Writer) *SummaryUI

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

Jump to

Keyboard shortcuts

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