Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( //ErrUnknownProjectName signals an unknown project was requested/referred ErrUnknownProjectName = errors.New("unknown project name") )
Functions ¶
func DatatugCommand ¶
DatatugCommand builds the `datatug` root command tree.
A bare `datatug` invocation (and any invocation whose first positional argument does not match a registered subcommand) falls through to `ui` — this replicates urfave/cli/v3's DefaultCommand: "ui" behaviour, which took priority over the root's own Action in every case, including when --tui was set (the root Action's TUIFlag.IsSet() check was consequently dead code: DefaultCommand always intercepted execution first). Only the --tui/-t flag surface is preserved here; the root RunE ignores it, exactly as the unreachable original Action's callers never observed it either.
func Exit ¶ added in v0.12.0
Exit returns an error that carries a specific process exit code. Returning it from a command's RunE propagates up to main, which exits with code — the same contract github.com/urfave/cli/v3's cli.Exit provided.
func InstallCommand ¶ added in v0.31.0
InstallCommand returns the "install" command, built from github.com/strongo/cli-helpers/cliinstall/cobracmd against datatug's own catalog id (cli-install#req:host-identity-from-catalog). `install` lists the fleet CLIs relevant to datatug (`ingitdb`, `ovdb`, `specscore`) with their live status, and `install <name>...` installs them the same way datatug itself was installed. cobracmd.New panics if "datatug" is absent from the compiled catalog — a programming error this package's own tests catch (TestInstallCommand_Shape proves the real entry resolves), never a runtime state a user sees.
func RegisterAsViewer ¶ added in v0.1.0
func RegisterAsViewer()
func SelfUpdateCommand ¶ added in v0.31.0
SelfUpdateCommand returns the "self-update" command, built from github.com/strongo/cli-helpers/selfupdate/cobracmd against datatugSelfUpdateConfig's identity.
func UpgradeCommand ¶ added in v0.31.0
UpgradeCommand returns the "upgrade" command, built from github.com/strongo/cli-helpers/cliinstall/cobracmd against datatug's own catalog id. HostConfig comes from the exact same datatugSelfUpdateConfig helper SelfUpdateCommand uses, and datatug's self-update has no after-update hook to pass as HostAfterUpdate, so `datatug self-update` and `datatug upgrade datatug` reach the exact same library call (cli-install#req:self-update-equals-upgrade-self). ver is the running build's own version, matching SelfUpdateCommand's own parameter.
Types ¶
type Encoder ¶
type Encoder interface {
Encode(v interface{}) error
}
Encoder defines interface to encode
type ExitCoder ¶ added in v0.12.0
ExitCoder is implemented by an error that must terminate the process with a specific exit code. It is this package's replacement for github.com/urfave/cli/v3's ExitCoder contract, which several mutating commands (db copy, entity authoring, --git mode validation) relied on before the migration to cobra. main() checks for this interface after the root command returns and exits with ExitCode() when present.
Source Files
¶
- chat_ai_profile.go
- cli_console_command.go
- cmd_chat.go
- cmd_compare.go
- cmd_config.go
- cmd_config_client.go
- cmd_config_server.go
- cmd_config_url.go
- cmd_dataset.go
- cmd_dataset_data.go
- cmd_dataset_def.go
- cmd_datasets.go
- cmd_db_copy.go
- cmd_demo.go
- cmd_entity.go
- cmd_execute_sql.go
- cmd_execution.go
- cmd_exit_codes.go
- cmd_filetug.go
- cmd_incident.go
- cmd_init_project.go
- cmd_install.go
- cmd_open_db.go
- cmd_projects.go
- cmd_projects_add.go
- cmd_queries.go
- cmd_query.go
- cmd_query_run_saved.go
- cmd_render.go
- cmd_scan_db.go
- cmd_self_update.go
- cmd_serve.go
- cmd_show_project.go
- cmd_ui.go
- cmd_upgrade.go
- cmd_validate.go
- command.go
- errors.go
- field_types.go
- git_integration.go
- grid.go
- options.go
- project_base_command.go
- query_output.go
- serve_runtime_settings.go