Skip to content

Latest commit

 

History

History
159 lines (128 loc) · 4.17 KB

File metadata and controls

159 lines (128 loc) · 4.17 KB
type Catalogue
title core/cli — schema & actions
description Auto-extracted saved-file schemas, exported structs, and registered actions for core/cli.
repo core/cli
generated_by lethean-plan/schema.py

Auto-generated from core/cli. Regenerate with schema.py after code changes — do not hand-edit.

Schema

Exported structs

DaemonOptions

DaemonOptions configures a background process helper.

Field Go type SQL Description
PIDFile string VARCHAR(255) PIDFile stores the current process ID on Start and removes it on Stop.
HealthAddr string VARCHAR(255) Pass an empty string to disable the server.
HealthPath string VARCHAR(255) HealthPath serves the liveness probe endpoint.
ReadyPath string VARCHAR(255) ReadyPath serves the readiness probe endpoint.
HealthCheck func() TEXT Defaults to true when nil.
ReadyCheck func() TEXT Defaults to HealthCheck when nil, or true when both are nil.
CREATE TABLE daemon_options (
  p_i_d_file VARCHAR(255),
  health_addr VARCHAR(255),
  health_path VARCHAR(255),
  ready_path VARCHAR(255),
  health_check TEXT,
  ready_check TEXT
);

ExitError

ExitError represents an error that should cause the CLI to exit with a specific code.

Field Go type SQL Description
Code int BIGINT
Err error TEXT
CREATE TABLE exit_error (
  code BIGINT,
  err TEXT
);

FSSource

FSSource pairs a filesystem with a directory containing locale JSON files.

Field Go type SQL Description
FS fs.FS TEXT
Dir string VARCHAR(255)
CREATE TABLE f_s_source (
  f_s TEXT,
  dir VARCHAR(255)
);

KeyMap

KeyMap defines key bindings for Frame navigation.

Field Go type SQL Description
FocusNext tea.KeyType TEXT
FocusPrev tea.KeyType TEXT
FocusUp tea.KeyType TEXT
FocusDown tea.KeyType TEXT
FocusLeft tea.KeyType TEXT
FocusRight tea.KeyType TEXT
Back tea.KeyType TEXT
Quit tea.KeyType TEXT
CREATE TABLE key_map (
  focus_next TEXT,
  focus_prev TEXT,
  focus_up TEXT,
  focus_down TEXT,
  focus_left TEXT,
  focus_right TEXT,
  back TEXT,
  quit TEXT
);

Options

Options configures the CLI runtime.

Field Go type SQL Description
AppName string VARCHAR(255)
Version string VARCHAR(255)
Services []core.Service JSON
I18nSources []LocaleSource JSON
OnReload func() TEXT Use for configuration reloading. Leave nil to ignore SIGHUP.
CREATE TABLE options (
  app_name VARCHAR(255),
  version VARCHAR(255),
  services JSON,
  i18n_sources JSON,
  on_reload TEXT
);

Table

Field Go type SQL Description
Headers []string JSON
Rows [][]string JSON
Style TableStyle TEXT
CREATE TABLE table (
  headers JSON,
  rows JSON,
  style TEXT
);

TableStyle

Field Go type SQL Description
HeaderStyle *AnsiStyle TEXT
CellStyle *AnsiStyle TEXT
Separator string VARCHAR(255)
CREATE TABLE table_style (
  header_style TEXT,
  cell_style TEXT,
  separator VARCHAR(255)
);

Actions

Action In Out Description
cli.version SemVer handleVersion — cli.version action handler. Returns the SemVer 2.0.0 version string in r.Value.
cli.app_name AppName handleAppName — cli.app_name action handler. Returns the configured AppName (set via WithAppName before Main) in r.Value.
cli.build_info map[string]string handleBuildInfo — cli.build_info action handler. Returns a map[string]string with version, commit, date, and pre-release fields in r.Value for diagnostics.