Versions in this module Expand all Collapse all v1 v1.5.1 May 14, 2026 v1.5.0 May 13, 2026 Changes in this version + const KeyBackspace + const KeyCtrlC + const KeyCtrlD + const KeyEnter + const KeyEscape + const KeyNewline + func Bold(s string) string + func ChooseConfigFile(explicitPath string) (string, error) + func ClearDown() + func ClearLine() + func Cyan(s string) string + func Dim(s string) string + func Green(s string) string + func HideCursor() + func LogCmd(s *Session, parts ...string) + func MoveDown(n int) + func MoveToColumn(n int) + func MoveUp(n int) + func PromptChoice(label string, options []string, defaultValue string) (string, error) + func PromptConfirm(label string) (bool, error) + func PromptText(label string, required bool) (string, error) + func RawMode() (restore func(), err error) + func Red(s string) string + func Reverse(s string) string + func RunREPL(s *Session) error + func RunTUI(explicitConfig string) error + func ShowCursor() + func Yellow(s string) string + type Cache struct + func NewCache() *Cache + func (c *Cache) Get(resourceType string) []NamedItem + func (c *Cache) Invalidate(resourceType string) + func (c *Cache) InvalidateAll() + func (c *Cache) InvalidateFiltered() + func (c *Cache) LookupByID(resourceType, id string) *NamedItem + func (c *Cache) LookupByName(resourceType, name string) *NamedItem + func (c *Cache) Set(resourceType string, items []NamedItem) + type Command struct + Description string + Name string + Run func(s *Session, args []string) error + func AllCommands() []Command + type FetchFunc func(ctx context.Context) ([]NamedItem, error) + type KeyEvent struct + Char byte + Special SpecialKey + func ReadKey() (KeyEvent, error) + type LoginFunc func() (string, error) + type NamedItem struct + Extra map[string]string + ID string + Labels map[string]string + Name string + Raw interface{} + Status string + type Resolver struct + func NewResolver(cache *Cache) *Resolver + func (r *Resolver) Fetch(ctx context.Context, resourceType string) ([]NamedItem, error) + func (r *Resolver) RegisterFetcher(resourceType string, fn FetchFunc) + func (r *Resolver) Resolve(ctx context.Context, resourceType, label string) (*NamedItem, error) + func (r *Resolver) ResolveID(resourceType, id string) string + func (r *Resolver) ResolveWithArgs(ctx context.Context, resourceType, label string, args []string) (*NamedItem, error) + func (r *Resolver) SelectFromItems(label string, items []NamedItem) (*NamedItem, error) + type Scope struct + LabelFilters map[string]string + SiteID string + SiteName string + VpcID string + VpcName string + type SelectItem struct + Extra map[string]string + ID string + Label string + func Select(label string, items []SelectItem) (*SelectItem, error) + type Session struct + Cache *Cache + Client *cli.Client + ConfigPath string + LoginFn LoginFunc + Org string + Resolver *Resolver + Scope Scope + Token string + func NewSession(client *cli.Client, org, configPath string) *Session + func (s *Session) PromptString() string + func (s *Session) RefreshClient(token string) + type SpecialKey int + const KeyDown + const KeyLeft + const KeyNone + const KeyRight + const KeyUp