Documentation
¶
Overview ¶
Package gombit is the root package for the Gombit framework.
Index ¶
Constants ¶
View Source
const ModulePath = "github.com/gombit-dev/gombit"
ModulePath is the canonical Go module path for Gombit.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin is Gombit's runtime generic admin (ADMIN-1 through ADMIN-3 / ADR-013).
|
Package admin is Gombit's runtime generic admin (ADMIN-1 through ADMIN-3 / ADR-013). |
|
Package auth is Gombit's runtime Bearer JWT surface (C3 / M5-2).
|
Package auth is Gombit's runtime Bearer JWT surface (C3 / M5-2). |
|
benchmarks
|
|
|
apps/gin-gorm
command
Command gin-gorm is the BENCH-1 primary framework-tax control (issue #141 "Gin + GORM ...
|
Command gin-gorm is the BENCH-1 primary framework-tax control (issue #141 "Gin + GORM ... |
|
apps/gombit
command
Command gombit is the BENCH-1 Gombit-runtime implementation of the canonical /api/projects CRUD API (issue #141, benchmarks/docs/schema.md): a normal Gombit app — Huma handlers, GORM, framework.App — using Atlas migrations (`gombit db makemigrations`/`migrate`, not AutoMigrate; AGENTS.md D3) applied as a separate step before this binary runs, the same way a deployed Gombit app would.
|
Command gombit is the BENCH-1 Gombit-runtime implementation of the canonical /api/projects CRUD API (issue #141, benchmarks/docs/schema.md): a normal Gombit app — Huma handlers, GORM, framework.App — using Atlas migrations (`gombit db makemigrations`/`migrate`, not AutoMigrate; AGENTS.md D3) applied as a separate step before this binary runs, the same way a deployed Gombit app would. |
|
apps/gombit/internal/project
Package project implements the canonical /api/projects CRUD API (benchmarks/docs/schema.md) as a normal Gombit feature package: Huma handlers, GORM models, framework.App wiring — the same shape `gombit make resource` would emit, hand-extended with the update/delete and pagination the generator doesn't produce yet.
|
Package project implements the canonical /api/projects CRUD API (benchmarks/docs/schema.md) as a normal Gombit feature package: Huma handlers, GORM models, framework.App wiring — the same shape `gombit make resource` would emit, hand-extended with the update/delete and pagination the generator doesn't produce yet. |
|
apps/shared
Package shared holds the response-shape types common to every Go implementation under benchmarks/apps/ (currently gombit and gin-gorm) for the BENCH-1 canonical CRUD comparison (issue #141, benchmarks/docs/schema.md).
|
Package shared holds the response-shape types common to every Go implementation under benchmarks/apps/ (currently gombit and gin-gorm) for the BENCH-1 canonical CRUD comparison (issue #141, benchmarks/docs/schema.md). |
|
internal/footprint
Package footprint is the schema and encoders for the operational-footprint half of the benchmark (issue #141 §"Operational footprint"): cold-start, idle/loaded memory, and CPU-under-load per implementation, plus the single-binary numbers (binary + image size) for the embedded-Gombit variant.
|
Package footprint is the schema and encoders for the operational-footprint half of the benchmark (issue #141 §"Operational footprint"): cold-start, idle/loaded memory, and CPU-under-load per implementation, plus the single-binary numbers (binary + image size) for the embedded-Gombit variant. |
|
internal/k6
Package k6 parses the raw k6 summary that benchmarks/workloads/crud-list.js dumps (via handleSummary) into the load-generator-derived fields of a benchmark result.
|
Package k6 parses the raw k6 summary that benchmarks/workloads/crud-list.js dumps (via handleSummary) into the load-generator-derived fields of a benchmark result. |
|
internal/metadata
Package metadata collects the reproducibility metadata every full benchmark run must capture (issue #141 "Reproducibility metadata"): enough about the host, toolchain, and run parameters that a published table can be reproduced.
|
Package metadata collects the reproducibility metadata every full benchmark run must capture (issue #141 "Reproducibility metadata"): enough about the host, toolchain, and run parameters that a published table can be reproduced. |
|
internal/microbench
Package microbench is the schema, `go test -bench` parser, and encoders for the framework-tax microbenchmark (issue #141 §13 A): the per-request abstraction cost of each layer — net/http → Gin → Huma → Gombit — across the five scenarios (plaintext, json, path-param, valid-post, invalid-post), reported as ns/op, B/op, and allocs/op.
|
Package microbench is the schema, `go test -bench` parser, and encoders for the framework-tax microbenchmark (issue #141 §13 A): the per-request abstraction cost of each layer — net/http → Gin → Huma → Gombit — across the five scenarios (plaintext, json, path-param, valid-post, invalid-post), reported as ns/op, B/op, and allocs/op. |
|
internal/report
Package report renders the root README's `## Performance` block from the committed benchmark outputs (results.json, footprint.json, metadata.json) and replaces the content between the benchmark-results markers.
|
Package report renders the root README's `## Performance` block from the committed benchmark outputs (results.json, footprint.json, metadata.json) and replaces the content between the benchmark-results markers. |
|
internal/reslimits
Package reslimits answers one question honestly: did a container actually receive the resource ceiling the benchmark intended for it?
|
Package reslimits answers one question honestly: did a container actually receive the resource ceiling the benchmark intended for it? |
|
internal/result
Package result defines the machine-readable benchmark result schema (issue #141 §9) that every benchmark run writes, and the JSON/CSV encoders the summarizer and report generator read back.
|
Package result defines the machine-readable benchmark result schema (issue #141 §9) that every benchmark run writes, and the JSON/CSV encoders the summarizer and report generator read back. |
|
internal/summary
Package summary turns the per-trial rows a benchmark run records (benchmarks/internal/result) into per-(framework, benchmark, concurrency) aggregates with trial variance, and renders the Markdown report from them.
|
Package summary turns the per-trial rows a benchmark run records (benchmarks/internal/result) into per-(framework, benchmark, concurrency) aggregates with trial variance, and renders the Markdown report from them. |
|
micro/gin
Package gin is the idiomatic plain-Gin row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): Gin routing and binding-tag validation, no Huma, no Gombit framework.
|
Package gin is the idiomatic plain-Gin row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): Gin routing and binding-tag validation, no Huma, no Gombit framework. |
|
micro/gombit
Package gombit is the Gombit-runtime row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): the same four scenarios as benchmarks/micro/huma, but registered through a real framework.App instead of bare Huma+Gin (scenario.RegisterEnvelopedRoutes instead of scenario.RegisterRoutes — Gombit wraps responses in the D10 envelope, which bare Huma+Gin does not do by default), so the delta between the two rows isolates the cost of the Gombit runtime itself — request-id, security headers, XSS sanitization, D10 error mapping and envelope — on top of Huma.
|
Package gombit is the Gombit-runtime row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): the same four scenarios as benchmarks/micro/huma, but registered through a real framework.App instead of bare Huma+Gin (scenario.RegisterEnvelopedRoutes instead of scenario.RegisterRoutes — Gombit wraps responses in the D10 envelope, which bare Huma+Gin does not do by default), so the delta between the two rows isolates the cost of the Gombit runtime itself — request-id, security headers, XSS sanitization, D10 error mapping and envelope — on top of Huma. |
|
micro/huma
Package huma is the bare Huma-over-Gin row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): Huma's typed handlers, validation, and OpenAPI emission on top of Gin, without the Gombit runtime around it and without the D10 response envelope (that's a Gombit convention, not a Huma default).
|
Package huma is the bare Huma-over-Gin row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): Huma's typed handlers, validation, and OpenAPI emission on top of Gin, without the Gombit runtime around it and without the D10 response envelope (that's a Gombit convention, not a Huma default). |
|
micro/nethttp
Package nethttp is the plain net/http row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): no router, no framework, hand-written JSON encode/decode and manual validation.
|
Package nethttp is the plain net/http row of the BENCH-1 framework-tax microbenchmark matrix (issue #141): no router, no framework, hand-written JSON encode/decode and manual validation. |
|
micro/scenario
Package scenario defines the five request/response scenarios shared by every row of the BENCH-1 framework-tax microbenchmark matrix (issue #141 "1.
|
Package scenario defines the five request/response scenarios shared by every row of the BENCH-1 framework-tax microbenchmark matrix (issue #141 "1. |
|
scripts/collect-host-info
command
Command collect-host-info writes the reproducibility metadata for a benchmark run (issue #141 "Reproducibility metadata") as JSON.
|
Command collect-host-info writes the reproducibility metadata for a benchmark run (issue #141 "Reproducibility metadata") as JSON. |
|
scripts/footprint
command
Command footprint records one implementation's operational-footprint row (issue #141 §"Operational footprint").
|
Command footprint records one implementation's operational-footprint row (issue #141 §"Operational footprint"). |
|
scripts/inspect-limits
command
Command inspect-limits reports whether a running container actually received the resource ceiling the benchmark intended (issue #141 §7 requires the suite to "detect and report that fact rather than silently pretending limits were applied").
|
Command inspect-limits reports whether a running container actually received the resource ceiling the benchmark intended (issue #141 §7 requires the suite to "detect and report that fact rather than silently pretending limits were applied"). |
|
scripts/k6load
command
Command k6load runs the crud-list workload against a target for a fixed window and KEEPS + validates the k6 summary, exiting non-zero unless the load was a clean measurement (traffic sent, no HTTP errors, no failed checks — benchmarks/internal/k6's Summary.Validate).
|
Command k6load runs the crud-list workload against a target for a fixed window and KEEPS + validates the k6 summary, exiting non-zero unless the load was a clean measurement (traffic sent, no HTTP errors, no failed checks — benchmarks/internal/k6's Summary.Validate). |
|
scripts/microbench
command
Command microbench parses `go test -bench=BenchmarkFrameworkTax` output for one stack (read from stdin) and merges the rows into OUT/microbench.json, replacing that stack as a whole (so a re-run can't leave a stale scenario).
|
Command microbench parses `go test -bench=BenchmarkFrameworkTax` output for one stack (read from stdin) and merges the rows into OUT/microbench.json, replacing that stack as a whole (so a re-run can't leave a stale scenario). |
|
scripts/report
command
Command report regenerates the root README's `## Performance` block from the committed benchmark outputs, or (-check) verifies the committed README still matches — the drift guard for issue #141's "README is regenerable, never hand-edited" AC.
|
Command report regenerates the root README's `## Performance` block from the committed benchmark outputs, or (-check) verifies the committed README still matches — the drift guard for issue #141's "README is regenerable, never hand-edited" AC. |
|
scripts/run-crud
command
Command run-crud runs the headline CRUD-read workload (benchmarks/workloads/crud-list.js) against one already-running, already-seeded implementation and merges its rows into a results snapshot.
|
Command run-crud runs the headline CRUD-read workload (benchmarks/workloads/crud-list.js) against one already-running, already-seeded implementation and merges its rows into a results snapshot. |
|
scripts/summarize
command
Command summarize reads a results.json snapshot and writes the human report (summary.md), generated from the structured per-trial rows — Markdown is never the canonical source (issue #141 §9).
|
Command summarize reads a results.json snapshot and writes the human report (summary.md), generated from the structured per-trial rows — Markdown is never the canonical source (issue #141 §9). |
|
Package build implements `gombit build --embed`: Vite production build, collectstatic into internal/web/static, and `go build` of a single binary that serves API + static + SPA fallback.
|
Package build implements `gombit build --embed`: Vite production build, collectstatic into internal/web/static, and `go build` of a single binary that serves API + static + SPA fallback. |
|
Package cache provides Gombit's backend-neutral cache boundary.
|
Package cache provides Gombit's backend-neutral cache boundary. |
|
Package cli is the Cobra command tree for `gombit` (D13 / ADR-014).
|
Package cli is the Cobra command tree for `gombit` (D13 / ADR-014). |
|
Package client generates a TypeScript API client from an OpenAPI 3.1 document.
|
Package client generates a TypeScript API client from an OpenAPI 3.1 document. |
|
cmd
|
|
|
contract-spike-openapi
command
|
|
|
gombit
command
|
|
|
Package commandgen implements `gombit make command`.
|
Package commandgen implements `gombit make command`. |
|
Package config provides Gombit's typed configuration boundary.
|
Package config provides Gombit's typed configuration boundary. |
|
Package contract defines Gombit's Huma DTO conventions, the D10 success and error envelopes, and draft §41 application error category mapping.
|
Package contract defines Gombit's Huma DTO conventions, the D10 success and error envelopes, and draft §41 application error category mapping. |
|
Package database opens supported GORM SQL drivers and exposes driver metadata.
|
Package database opens supported GORM SQL drivers and exposes driver metadata. |
|
conformance
Package conformance hosts the multi-DB conformance suite.
|
Package conformance hosts the multi-DB conformance suite. |
|
conformance/models
Package models holds GORM fixtures for the multi-DB conformance suite.
|
Package models holds GORM fixtures for the multi-DB conformance suite. |
|
Package dev implements `gombit dev`: one command that runs the Go API (with reload when air or watchexec is available), the Vite frontend with HMR, and live OpenAPI → TypeScript client regeneration.
|
Package dev implements `gombit dev`: one command that runs the Go API (with reload when air or watchexec is available), the Vite frontend with HMR, and live OpenAPI → TypeScript client regeneration. |
|
examples
|
|
|
admin
command
|
|
|
auth
command
|
|
|
auth-cookie
command
|
|
|
cache
command
|
|
|
config
command
|
|
|
contract
command
|
|
|
database
command
|
|
|
embed
command
|
|
|
lifecycle
command
|
|
|
logging
command
|
|
|
migrations
command
|
|
|
router
command
|
|
|
tutorial
command
Command tutorial is the finished application from docs/tutorial.md: one Task resource served through Huma, with cookie auth and the runtime admin.
|
Command tutorial is the finished application from docs/tutorial.md: one Task resource served through Huma, with cookie auth and the runtime admin. |
|
Package framework provides Gombit's runtime application lifecycle and HTTP surfaces (Gin router escape hatch and Huma contract API).
|
Package framework provides Gombit's runtime application lifecycle and HTTP surfaces (Gin router escape hatch and Huma contract API). |
|
Package goldentest is the M4-5 generator golden suite.
|
Package goldentest is the M4-5 generator golden suite. |
|
internal
|
|
|
Package logging builds Gombit's Zap logger and supports external sinks.
|
Package logging builds Gombit's Zap logger and supports external sinks. |
|
Package migrations wraps Atlas versioned migrations for Gombit apps.
|
Package migrations wraps Atlas versioned migrations for Gombit apps. |
|
Package resourcegen implements `gombit make resource`.
|
Package resourcegen implements `gombit make resource`. |
|
Package scaffold generates a new Gombit application (gombit new).
|
Package scaffold generates a new Gombit application (gombit new). |
|
Package types holds framework value types that are shared by generated models, handler DTOs, and the admin data plane.
|
Package types holds framework value types that are shared by generated models, handler DTOs, and the admin data plane. |
Click to show internal directories.
Click to hide internal directories.