Discover Packages
github.com/hurtener/Harbor
internal
tui
renderers
package
Version:
v1.20.0
Opens a new window with list of versions in this module.
Published: Jul 24, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package renderers provides immutable safe renderer registries for TUI data.
Normalize converts arbitrary typed payloads to JSON-shaped values, recursively
redacts canonical secret fields, strips terminal controls, and refuses raw
heavy content. Heavy values must arrive as an artifact reference.
SafeText removes terminal control and escape characters and bounds a display
field. Every operator-visible value passes this function.
type Block struct {
Kind, ID, Title, Status, Summary string
}
Block is a terminal-neutral rendered summary.
Generic renders unknown or malformed values as bounded metadata-only JSON.
Registry is immutable after construction and safe for concurrent reuse.
Builtins returns the in-repo renderers through the same registry path used
for unknown values. Built-ins intentionally remain metadata-only.
New constructs a registry from a copied definition map.
Kinds returns the deterministic registered inventory.
Render dispatches by kind and always returns a safe generic fallback.
Renderer converts one canonical value to a bounded block.
type Value struct {
Kind, ID, Title, Status string
Payload any
}
Value is a renderer input. Payload must already be a canonical redacted wire
projection; the registry additionally bounds and escapes it for terminals.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.