pkg/

directory
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0

Directories

Path Synopsis
Package app wires application lifecycle and dependency setup.
Package app wires application lifecycle and dependency setup.
Package cheatsheet ...
Package cheatsheet ...
Package common provides the cross-cutting dependency bag (Log, Tr, UserConfig, AppState, Fs) embedded into virtually every receiver downstream.
Package common provides the cross-cutting dependency bag (Log, Tr, UserConfig, AppState, Fs) embedded into virtually every receiver downstream.
Package config defines the user-facing configuration schema for pgsavvy (UserConfig, ThemeConfig, KeybindingConfig) and the loaders that read it from YAML files via an afero.Fs.
Package config defines the user-facing configuration schema for pgsavvy (UserConfig, ThemeConfig, KeybindingConfig) and the loaders that read it from YAML files via an afero.Fs.
Package constants ...
Package constants ...
Package drivers defines the storage-engine-independent driver contract (Driver, Connection, Session, RowStream, Transaction) along with the Capabilities shape, the Factory registry, and the shared error sentinels consumed by every concrete driver under pkg/drivers/*.
Package drivers defines the storage-engine-independent driver contract (Driver, Connection, Session, RowStream, Transaction) along with the Capabilities shape, the Factory registry, and the shared error sentinels consumed by every concrete driver under pkg/drivers/*.
pg
Package pg implements the Postgres concrete driver: pg.New returns a drivers.Factory that yields a *Driver wrapping a session.Prompter, and *Connection wraps a pgxpool.Pool with ServerVersion caching plus a pg_cancel_backend stub that will be wired in epic E6.
Package pg implements the Postgres concrete driver: pg.New returns a drivers.Factory that yields a *Driver wrapping a session.Prompter, and *Connection wraps a pgxpool.Pool with ServerVersion caching plus a pg_cancel_backend stub that will be wired in epic E6.
Package env ...
Package env ...
gui
Package gui hosts the pgsavvy TUI's focus-stack manager and (in later epics) the bootstrap that wires gocui to the Contexts declared in pkg/gui/context.
Package gui hosts the pgsavvy TUI's focus-stack manager and (in later epics) the bootstrap that wires gocui to the Contexts declared in pkg/gui/context.
clipboard
Package clipboard provides the shared clipboard seam used by the vim editor and the results grid + exporter.
Package clipboard provides the shared clipboard seam used by the vim editor and the results grid + exporter.
commands
Package commands defines the CommandRegistry: the named-action table that the keybinding system dispatches into.
Package commands defines the CommandRegistry: the named-action table that the keybinding system dispatches into.
context
Package context contains the concrete Context implementations the pgsavvy TUI focus stack manages: the five side-rail contexts (Connections, Schemas, Tables, Columns, Indexes), the four popup contexts (Menu, Confirmation, Prompt, Suggestions), the command-log EXTRAS context, the GLOBAL context (no view), the LIMIT terminal-too-small overlay, and six StubContext placeholders for Contexts that ship in later epics (QUERY_EDITOR, TABLE_DATA_EDITOR, RESULT_GRID, PLAN, WHICH_KEY, HISTORY).
Package context contains the concrete Context implementations the pgsavvy TUI focus stack manages: the five side-rail contexts (Connections, Schemas, Tables, Columns, Indexes), the four popup contexts (Menu, Confirmation, Prompt, Suggestions), the command-log EXTRAS context, the GLOBAL context (no view), the LIMIT terminal-too-small overlay, and six StubContext placeholders for Contexts that ship in later epics (QUERY_EDITOR, TABLE_DATA_EDITOR, RESULT_GRID, PLAN, WHICH_KEY, HISTORY).
controllers
Package controllers wires keyboard bindings to context state.
Package controllers wires keyboard bindings to context state.
controllers/helpers
Package helpers ...
Package helpers ...
controllers/helpers/data
Package data hosts data-access helpers that adapt drivers.Session into the shape the gui controllers consume.
Package data hosts data-access helpers that adapt drivers.Session into the shape the gui controllers consume.
controllers/helpers/ui
Package ui hosts UI-presentation helpers consumed by the gui controllers: confirm/prompt/toast popups, the table double-click stub, the first-run tip dismissal, and the boxlayout-driven window arrangement.
Package ui hosts UI-presentation helpers consumed by the gui controllers: confirm/prompt/toast popups, the table double-click stub, the first-run tip dismissal, and the boxlayout-driven window arrangement.
editor
Package editor hosts the canonical *Buffer + UndoTree state for one QUERY_EDITOR pane and the per-context gocui.Editor implementations pgsavvy ships outside the COMMAND_LINE master editor.
Package editor hosts the canonical *Buffer + UndoTree state for one QUERY_EDITOR pane and the per-context gocui.Editor implementations pgsavvy ships outside the COMMAND_LINE master editor.
editor/format
Package format provides SQL formatting via sqlfmt.
Package format provides SQL formatting via sqlfmt.
editor/highlight
Package highlight wraps the Chroma v2 PostgreSQL lexer to provide SQL syntax highlighting for the query editor.
Package highlight wraps the Chroma v2 PostgreSQL lexer to provide SQL syntax highlighting for the query editor.
editor/sqlcontext
Package sqlcontext is the detection brain for schema-aware SQL completion.
Package sqlcontext is the detection brain for schema-aware SQL completion.
grid
Package grid ...
Package grid ...
internal/testfake
Package testfake supplies an in-memory GuiDriver fake used by tests in pkg/gui.
Package testfake supplies an in-memory GuiDriver fake used by tests in pkg/gui.
internal/textcells
Package textcells reconciles the pinned gocui and tcell grapheme widths.
Package textcells reconciles the pinned gocui and tcell grapheme widths.
keys
Package keys is the single call site for registering keyboard and mouse bindings with the gocui runtime.
Package keys is the single call site for registering keyboard and mouse bindings with the gocui runtime.
modes
Package modes is intentionally empty.
Package modes is intentionally empty.
orchestrator
Package orchestrator wires the pgsavvy TUI: it owns the focus-stack tree, the GuiDriver instance, every UI/data helper and controller, and the gocui MainLoop entry point.
Package orchestrator wires the pgsavvy TUI: it owns the focus-stack tree, the GuiDriver instance, every UI/data helper and controller, and the gocui MainLoop entry point.
popup
Package popup ...
Package popup ...
presentation
Package presentation supplies render-time helpers that derive border styling and header text from a *models.Connection, plus the closures the context layer consumes through ContextTreeDeps.
Package presentation supplies render-time helpers that derive border styling and header text from a *models.Connection, plus the closures the context layer consumes through ContextTreeDeps.
services
Package services ...
Package services ...
services/custom_commands
Package custom_commands ...
Package custom_commands ...
status
Package status assembles the status-bar string rendered along the bottom of the gui.
Package status assembles the status-bar string rendered along the bottom of the gui.
style
Package style ships a chainable TextStyle builder used across the gui rendering layer.
Package style ships a chainable TextStyle builder used across the gui rendering layer.
types
Package types declares the foundational type system shared by every pkg/gui subpackage: ContextKind/ContextKey enums, the IBaseContext interface, the Views holder, focus/refresh option structs, the Mode bitmask, KeyBinding, the GuiCommon/HelperCommon aggregators, and the GuiDriver interface that abstracts the underlying gocui runtime.
Package types declares the foundational type system shared by every pkg/gui subpackage: ContextKind/ContextKey enums, the IBaseContext interface, the Views holder, focus/refresh option structs, the Mode bitmask, KeyBinding, the GuiCommon/HelperCommon aggregators, and the GuiDriver interface that abstracts the underlying gocui runtime.
Package i18n provides localized UI strings for pgsavvy.
Package i18n provides localized UI strings for pgsavvy.
Package jsonschema ...
Package jsonschema ...
Package logs ...
Package logs ...
Package models ...
Package models ...
Package query ...
Package query ...
plandoctor
Package plandoctor is a pure, offline EXPLAIN-plan insight engine.
Package plandoctor is a pure, offline EXPLAIN-plan insight engine.
Package session resolves runtime credentials for database connection profiles and (in subsequent tasks) builds engine-specific connection configs.
Package session resolves runtime credentials for database connection profiles and (in subsequent tasks) builds engine-specific connection configs.
sshtunnel
Package sshtunnel opens a driver-agnostic SSH connection to a bastion and exposes a DialContext suitable for use as a database driver's dial function (e.g.
Package sshtunnel opens a driver-agnostic SSH connection to a bastion and exposes a DialContext suitable for use as a database driver's dial function (e.g.
Package tasks ...
Package tasks ...
Package theme ...
Package theme ...
builtin
Package builtin holds the bundled ThemeConfig presets shipped with pgsavvy.
Package builtin holds the bundled ThemeConfig presets shipped with pgsavvy.
Package update fetches the latest GitHub Release, selects the host's binary asset, downloads and verifies it against checksums.txt, and compares versions.
Package update fetches the latest GitHub Release, selects the host's binary asset, downloads and verifies it against checksums.txt, and compares versions.
Package utils ...
Package utils ...

Jump to

Keyboard shortcuts

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