Documentation
¶
Overview ¶
Package main provides the repository placeholder entrypoint.
Use cmd/api for the production server bootstrap.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
api
command
Command api starts the SuperAPI HTTP server using environment-driven configuration.
|
Command api starts the SuperAPI HTTP server using environment-driven configuration. |
|
authgen
command
Command authgen scaffolds goAuth bootstrap artifacts for SuperAPI projects.
|
Command authgen scaffolds goAuth bootstrap artifacts for SuperAPI projects. |
|
migrate
command
Command migrate applies and manages database migrations for SuperAPI.
|
Command migrate applies and manages database migrations for SuperAPI. |
|
modulegen
command
Command modulegen creates new module scaffolds with optional policy and DB wiring.
|
Command modulegen creates new module scaffolds with optional policy and DB wiring. |
|
modulesync
command
Command modulesync syncs module-level schema/query files into shared sqlc directories.
|
Command modulesync syncs module-level schema/query files into shared sqlc directories. |
|
perftoken
command
Command perftoken generates auth tokens for load and performance testing workflows.
|
Command perftoken generates auth tokens for load and performance testing workflows. |
|
superapi-verify
command
Command superapi-verify runs static route and policy validation across the codebase.
|
Command superapi-verify runs static route and policy validation across the codebase. |
|
internal
|
|
|
core/app
Package app wires the HTTP server, module registration, and lifecycle management.
|
Package app wires the HTTP server, module registration, and lifecycle management. |
|
core/auth
Package auth provides authentication context types and goAuth provider integration.
|
Package auth provides authentication context types and goAuth provider integration. |
|
core/cache
Package cache implements Redis-backed response caching and cache key generation utilities.
|
Package cache implements Redis-backed response caching and cache key generation utilities. |
|
core/config
Package config loads, normalizes, and validates runtime configuration from environment variables.
|
Package config loads, normalizes, and validates runtime configuration from environment variables. |
|
core/db
Package db provides Postgres connectivity and migrations for storage backends.
|
Package db provides Postgres connectivity and migrations for storage backends. |
|
core/errors
Package errors defines typed application errors used for consistent API responses.
|
Package errors defines typed application errors used for consistent API responses. |
|
core/httpx
Package httpx contains HTTP adapters, middleware, and router helpers used by modules.
|
Package httpx contains HTTP adapters, middleware, and router helpers used by modules. |
|
core/logx
Package logx wraps structured logging setup and logger configuration.
|
Package logx wraps structured logging setup and logger configuration. |
|
core/metrics
Package metrics provides Prometheus instrumentation for HTTP, readiness, and policy signals.
|
Package metrics provides Prometheus instrumentation for HTTP, readiness, and policy signals. |
|
core/modulekit
Package modulekit provides module-safe accessors for runtime dependencies.
|
Package modulekit provides module-safe accessors for runtime dependencies. |
|
core/netx
Package netx contains network helpers such as trusted client IP extraction.
|
Package netx contains network helpers such as trusted client IP extraction. |
|
core/params
Package params provides normalized request parameter helper functions.
|
Package params provides normalized request parameter helper functions. |
|
core/policy
Package policy provides route-level middleware for auth, RBAC, tenant checks, rate limiting, and cache control.
|
Package policy provides route-level middleware for auth, RBAC, tenant checks, rate limiting, and cache control. |
|
core/ratelimit
Package ratelimit implements Redis-backed rate limiting primitives and keying strategies.
|
Package ratelimit implements Redis-backed rate limiting primitives and keying strategies. |
|
core/readiness
Package readiness aggregates dependency health into a sanitized readiness report.
|
Package readiness aggregates dependency health into a sanitized readiness report. |
|
core/requestid
Package requestid defines request-id context storage and retrieval helpers.
|
Package requestid defines request-id context storage and retrieval helpers. |
|
core/response
Package response writes API envelopes and error payloads with centralized sanitization.
|
Package response writes API envelopes and error payloads with centralized sanitization. |
|
core/storage
Package storage defines the enforced data-layer contracts used by repositories.
|
Package storage defines the enforced data-layer contracts used by repositories. |
|
core/tenant
Package tenant provides tenant-scope utilities used by auth and policy layers.
|
Package tenant provides tenant-scope utilities used by auth and policy layers. |
|
core/tracing
Package tracing configures OpenTelemetry provider lifecycle for the API process.
|
Package tracing configures OpenTelemetry provider lifecycle for the API process. |
|
devx/modulegen
Package modulegen provides scaffolding utilities for creating new API modules.
|
Package modulegen provides scaffolding utilities for creating new API modules. |
|
devx/modulesync
Package modulesync syncs module-local SQL assets into global sqlc input folders.
|
Package modulesync syncs module-local SQL assets into global sqlc input folders. |
|
modules
Package modules registers built-in runtime modules for the API process.
|
Package modules registers built-in runtime modules for the API process. |
|
modules/health
Package health exposes liveness and readiness endpoints as an app module.
|
Package health exposes liveness and readiness endpoints as an app module. |
|
modules/system
Package system provides system-level example routes, auth demos, and utility endpoints.
|
Package system provides system-level example routes, auth demos, and utility endpoints. |
|
tools/validator
Package validator statically validates route policy wiring for SuperAPI modules.
|
Package validator statically validates route policy wiring for SuperAPI modules. |
Click to show internal directories.
Click to hide internal directories.