Documentation
¶
Overview ¶
Serve/CLI configuration resolution: flags take precedence, then the canonical OPENSTORAGE_* environment variables, then the SPIKE_*/legacy spike aliases (PG_URL, BLOB_URL) so phase-0 invocations keep working.
openstorage is the service binary: `serve` runs a stateless node exposing the /api/v1 HTTP API (single-org self-host mode) and the git smart-HTTP path; `hook` is re-exec'd by git as pre-receive/update hooks; `signing-key` manages the org's commit-signing key registry (docs/reference/authentication.md verify-sig); keygen/mint/list-packs are local dogfooding helpers.
Configuration comes from OPENSTORAGE_* environment variables, with the phase-0 spike names (SPIKE_*, PG_URL, BLOB_URL) kept as fallback aliases — see config.go.
purge-repo permanently reclaims one soft-deleted repository's registry rows and blobs (issue #52) — the synchronous operator twin of the OPENSTORAGE_REPO_RETENTION background purge, running the exact same jobs.RepoPurger primitive. Purged repositories CANNOT be restored, and the burned (org, url) name is never released (see meta/purge.go).
signing-key subcommands manage the org's commit-signing key registry (docs/reference/authentication.md verify-sig). Upstream exposes this only through its dashboard; the OSS equivalent is this CLI writing to the metadata store's org_signing_keys table, which the receive-path update hook reads fresh from Postgres on every push.
wire.go is the single integration seam between the CLI and the phase-1 implementation slices. It is the ONLY file referencing the constructors owned by sibling slices:
- meta.Open / meta.Backend{InitSchema, Close} (internal/meta)
- auth.NewVerifier(store) (internal/auth)
- api.New(api.Config{Store, Verifier, HTTPBaseURL}) (internal/api)
If a slice landed different names/signatures, fix the drift HERE only. The `openstorage_stub` build tag (constraint above) used to swap in a wire_stub.go stub so the CLI could build in isolation before the slices landed; the stub was deleted once they did.
wire_eventing.go is the phase-5 sibling of wire.go: it assembles the eventing/sync stack (docs/reference/webhooks.md, docs/archive/phases/07-implementation-roadmap.md p5) from the slice-owned packages — jobs queue (River on pg / in-process in local mode), webhook deliverer, upstream-sync worker with loopback push, and the events.RefStore CASRef decorator — for both the serve process and the `openstorage hook` subprocess git re-execs.