common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package common provides shared types and utilities for the TUI components.

Index

Constants

View Source
const (
	// NameCol is the column name for "Name".
	NameCol = "Name"
	// InternalCol is the column name for "Internal".
	InternalCol = "Internal"
	// ValueCol is the column name for "Value".
	ValueCol = "Value"
	// RegionsCol is the column name for "Regions".
	RegionsCol = "Regions"
	// TenantCol is the column name for "Tenant".
	TenantCol = "Tenant"
	// ContextCol is the column name for "Context".
	ContextCol = "Context"
	// SizeCol is the column name for "Size".
	SizeCol = "Size"
	// FreeCol is the column name for "Free".
	FreeCol = "Free"
	// AgeCol is the column name for "Age".
	AgeCol = "Age"
	// UsageCol is the column name for "Usage".
	UsageCol = "Usage"
	// TypeCol is the column name for "Type".
	TypeCol = "Type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EditTarget

type EditTarget int

EditTarget represents the current edit target in the UI. Implements Stringer for testability and debugging.

const (
	// NoneTarget is the zero value for EditTarget, indicating no edit target is selected.
	NoneTarget EditTarget = iota // No edit target selected (zero value)
	// FilterTarget is the edit target for filters.
	FilterTarget // Filter edit target
	// AliasTarget is the edit target for aliases.
	AliasTarget // Alias edit target
)

func (EditTarget) String

func (e EditTarget) String() string

String returns the string representation of the EditTarget.

type InputMode

type InputMode int

InputMode represents the current mode of the UI.

const (
	// UnknownInput is the zero value for InputMode, indicating an unset or unknown state.
	UnknownInput InputMode = iota // Unset/unknown state (zero value)
	// EditInput is the input mode for editing.
	EditInput // Edit mode
	// NormalInput is the input mode for normal (non-editing) operations.
	NormalInput // Normal mode
)

func (InputMode) String

func (m InputMode) String() string

String returns the string representation of the InputMode.

type ViewMode

type ViewMode int

ViewMode represents the current UI mode (e.g., list, details).

const (
	// ListView is the default view mode, displaying a list of items.
	ListView ViewMode = iota
	// DetailsView is the view mode for displaying item details.
	DetailsView
	// LoadingView is the view mode for displaying loading state.
	LoadingView
	// HelpView is the view mode for displaying help information.
	HelpView
	// ErrorView is the view mode for displaying error state.
	ErrorView
	// ExportView is the view mode for exporting table data as CSV.
	ExportView
)

func (ViewMode) String

func (v ViewMode) String() string

String returns the string representation of the ViewMode.

Jump to

Keyboard shortcuts

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