cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

apikey_cmd.go — wowapi apikey: issue, list, rotate, and revoke machine API keys / service principals (roadmap S1/CA-3). Tenant-scoped: connects as app_rt and binds the given tenant, so RLS applies exactly as at runtime. Issue and rotate print the plaintext token ONCE — it cannot be recovered later.

audit_cmd.go — wowapi audit: verify a tenant's tamper-evident audit chain offline (roadmap S6/CA-11). Connects as app_rt, binds the tenant, walks the hash chain, and reports any mutation (row hash mismatch) or deletion (seq gap).

Package cli implements the wowapi command dispatcher. cmd/wowapi is a thin main over Run so behavior is unit-testable. Private implementation detail.

config_cmd.go — wowapi config subcommands (framework-side, Phase 1).

Framework-repo fallback: all subcommands run against config.Framework alone. Product-repo configcheck integration (tools/configcheck) arrives in Phase 10.

Precedence used by the loader: compiled defaults ← base.yaml ← env overlay ← env vars ← secret resolution. See docs/blueprint/12-configuration-and-deployment.md §3.

config_delegate.go — product-local config delegation + `config diff`.

The installed wowapi binary cannot import product config types (it is prebuilt), so `wowapi config <mode>` delegates to the product-local checker scaffolded by `wowapi init` at tools/configcheck (blueprint 12 §8). When that checker is absent (e.g. inside the framework repo) the commands fall back to validating config.Framework alone.

deploy_cmd.go — `wowapi deploy render` (Phase 10). Renders a deployment manifest (docker-compose or a plain env file) for the api/worker/migrate processes from a small set of flags. The DB DSN is emitted as a secretref://env/… reference (config.DB.DSN is a Secret), never an inlined value — the manifest is safe to commit.

dlq_cmd.go — wowapi dlq: inspect and operate the dead-letter queues (R4).

gen_cmd.go — wowapi gen: code generation subcommands (crud, ...).

init_cmd.go — wowapi init: scaffold a product repository.

lint_cmd.go — `wowapi lint boundaries` (Phase 10). Enforces the import law in a product repo the same way scripts/lint_boundaries.sh does for the framework: modules are isolated (a module never imports another module's internals — they collaborate through ports), and in the framework repo the kernel/module/app/ adapters layering holds. The rule checker is a pure function so it is unit tested without a live `go list`.

migrate_cmd.go — `wowapi migrate` helpers (Phase 10). `create` scaffolds the next-numbered goose migration file; the actual apply lives in the product's cmd/migrate (generated by `wowapi init`) which calls database.Migrate.

new_module_cmd.go — wowapi new-module: scaffold a module package.

openapi_cmd.go — `wowapi openapi merge` (Phase 10). Merges per-module OpenAPI fragments (the JSON each module registers via ctx.OpenAPI) into one document, failing loudly on a duplicate path or schema so two modules cannot silently clobber each other's API surface.

scaffold.go — shared helpers for wowapi scaffold commands (init, new-module, gen).

seed_cmd.go — `wowapi seed validate` (Phase 10). Loads a module's seed bundle through the same kernel/seeds.Load the app uses at boot, so a seed error is caught in CI (exit 1) rather than at deploy time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string, stdout, stderr io.Writer) int

Run executes the CLI and returns the process exit code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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