apic

module
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0

README

apic — OpenAPI-to-Server Code Generator

License Go GitLab

apic is a Go code generator that turns an OpenAPI 3.1 spec (or a JSON config file) into a fully-secured, production-ready HTTP / WebSocket / MCP server plus polyglot clients (Go, React TypeScript, Python, Rust, Zig). You write business logic; everything else — request validation, authentication, rate limiting, TLS, CORS, body caps, audit logging, and typed client bindings — is generated.

Module path: devnw.dev/apic

Note: This repository was relicensed from a proprietary commercial license to Apache-2.0 in June 2026 as part of the public OSS release by CodePros LLC. See CHANGELOG.md and NOTICE for full history.


What gets generated

  • REST handlers — Gin-based HTTP server with ServerInterface, generated NOOP stubs, and Valid() method dispatch for every request/response type.
  • WebSocket handlers — RFC 6455 stubs with per-connection rate and frame-size limiting.
  • MCP tools — JSON-RPC 2.0 tool registry (HTTP, WebSocket, and STDIO transports) for Model Context Protocol integrations.
  • GraphQL — schema, HTTP/WS handlers, and in-process resolvers.
  • Clients — Go, React TypeScript (TanStack Query), Python stdlib async, Rust (tokio/reqwest), and Zig (std-only synchronous).

All generated code carries composite auth enforcement (api_key, JWT, mTLS, cookie/CSRF, WebAuthn, webhook HMAC), RBAC role hierarchy (admin > manager > user), and FIPS 140-3-capable password hashing.


Requirements

Requirement Minimum
Go toolchain 1.26.5
GOEXPERIMENT jsonv2 (required — this module imports encoding/json/v2)
CGO enabled for test targets (CGO_ENABLED=1)
Python 3 + pipx for openapi-spec-validator (dev toolchain only)
pre-commit for contributor hook install (dev only)

Quick start

1. Clone and install dev toolchain
git clone https://gitlab.com/devnw/codepros/oss/apic.git
cd apic

# Set required env (add to your shell profile)
export GOEXPERIMENT=jsonv2
export GOTOOLCHAIN=go1.26.5

# Install all dev dependencies (oapi-codegen, vacuum, golangci-lint,
# openapi-spec-validator, pre-commit hooks)
make setup
2. Build and test
# Full build: openapi codegen -> tidy -> lint -> fmt -> test
make

# Run tests only
CGO_ENABLED=1 make test

# Run the API server locally (debug mode)
make run
3. Generate a server from your OpenAPI spec
# Regenerate all *.gen.go files from api/cfgs/openapi.yaml
make openapi
4. Generate a server from a JSON config (config-first path)
export GOEXPERIMENT=jsonv2

# Generate into ./gen from the bundled example config
go run ./cmd/apic generate --config configs/example.json --out ./gen

# Generate with tests and fuzz targets
go run ./cmd/apic generate \
  --config configs/example.json \
  --out ./gen \
  --with-tests --with-fuzz
5. Install the apic generator binary
go install devnw.dev/apic/cmd/apic@latest

Private module setup

devnw.dev/log and devnw.dev/bk are public modules that resolve through the public Go module proxy and checksum database — the full repo, including the api/ package and every cmd/ binary, builds and tests credential-free:

go build ./...
go test ./...

Only gitlab.com/devnw/* internal packages remain genuinely private (see .gitlab-ci.yml's GOPRIVATE/GONOSUMDB). If a dependency under that path fails to resolve locally:

export GOPRIVATE=gitlab.com/devnw/*
export GONOSUMDB=gitlab.com/devnw/*
export GOFLAGS=-mod=mod

# Configure authenticated HTTPS access (set GITLAB_USER and GITLAB_PAT in your shell)
git config --global \
  url."https://${GITLAB_USER}:${GITLAB_PAT}@gitlab.com/".insteadOf \
  "https://gitlab.com/"

Repository layout

api/          Framework runtime package — Gin wiring, OIDC, validation, WebSocket/MCP registries
cmd/apic/     Config-driven code generator CLI (reads configs/*.json, writes to gen/)
cmd/api/      Main API server binary (Cobra CLI, Viper config, dotenv)
cmd/server/   Standalone HTTP server with embedded dev TLS cert
cmd/pipeline/ Orchestrates: apic -> vet -> build -> test -> fuzz -> bench
pkg/httpx/    Token-bucket rate limiter, body size limiter, CORS/security headers
pkg/wsx/      In-repo RFC 6455 WebSocket implementation
pkg/mcpx/     JSON-RPC 2.0 engine for MCP (HTTP, STDIO, WebSocket transports)
pkg/securex/  API key HMAC auth, HS256 JWT, RBAC, CSRF, FIPS-aware password hashing
pkg/obsx/     Request logging, request IDs, expvar metrics, audit log helpers
configs/      Example and reference JSON configs for the config-first generator
api/cfgs/     OpenAPI 3.1 spec and oapi-codegen config
docs/         Full documentation (see below)
tests/        Unit, integration, and security test suites

Documentation

Document Description
docs/README.md Full user guide: two generation paths, quick starts, API reference
docs/CONFIGURATION.md Complete JSON config reference
docs/POLYGLOT_CLIENTS.md Python, Rust, Zig client generation
docs/REACT_UI_EXPLORER.md React service explorer (REST/WS/GraphQL/MCP)
docs/FUZZING.md Fuzz targets, harnesses, CI gate
docs/FIPS_MODE.md FIPS 140-3 build and verification
docs/MTLS_MODE.md Mutual TLS configuration
docs/CAC_PIV_MODE.md CAC/PIV smart-card auth
docs/MIGRATION_default-deny-auth.md Auth default-deny migration (v0.7.0 breaking change)
CONTRIBUTING.md How to contribute
SECURITY.md Vulnerability reporting policy
CHANGELOG.md Release history

Runtime environment variables

Variable Purpose
GOEXPERIMENT=jsonv2 Required — enables encoding/json/v2
GOTOOLCHAIN=go1.26.5 Pins the exact Go toolchain used in CI
CGO_ENABLED=1 Required for tests with -race
GOPRIVATE=gitlab.com/devnw/* Skip public module proxy for genuinely-private modules
GOMEMLIMIT Soft memory ceiling for containerized deployments
GOGC GC tuning (default 100; prefer GOMEMLIMIT instead)
APIC_CORS_ORIGINS Override embedded CORS origin list at runtime
APIC_CORS_ORIGINS_FILE Path to file containing CORS origins
APIC_SKIP_PREPUSH=1 Skip pre-push CI-parity gate for WIP branches

License

Apache-2.0. See LICENSE and NOTICE.

Copyright 2024-2026 CodePros LLC and contributors.

Directories

Path Synopsis
Package api is the generated Gin-based HTTP/WebSocket/MCP server for the apic framework, plus the hand-written wiring (server construction, OIDC, validation, listeners) around the generated code.
Package api is the generated Gin-based HTTP/WebSocket/MCP server for the apic framework, plus the hand-written wiring (server construction, OIDC, validation, listeners) around the generated code.
cmd
api command
apic command
GraphQL config validators, split out of config_validate.go to keep each file focused (QG-086 / QG-050 file-size gate).
GraphQL config validators, split out of config_validate.go to keep each file focused (QG-086 / QG-050 file-size gate).
gen command
pipeline command
server command
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
gen
api
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/api
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/client
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/cmd/server command
Command server is the thin default entrypoint for the generated API.
Command server is the thin default entrypoint for the generated API.
apic-mcp/mcp
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/configx
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
apic-mcp/pkg/gen
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/gen/cli
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/gqlx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/healthx
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
apic-mcp/pkg/httpx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/internal/ratebucket
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
apic-mcp/pkg/mcpx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/obsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/obsx/auditx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/obsx/otelx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/obsx/promx
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
apic-mcp/pkg/oidcx
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
apic-mcp/pkg/opt
Package opt provides a small generic implementation of the functional options pattern.
Package opt provides a small generic implementation of the functional options pattern.
apic-mcp/pkg/securex
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/cacpiv
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/csrfx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/fipsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/harness
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
apic-mcp/pkg/securex/hashx
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
apic-mcp/pkg/securex/mtlsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/sessionx
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
apic-mcp/pkg/securex/signerx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/signerx/pkcs11
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/signerx/softfile
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/securex/webauthnx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/pkg/wsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/server
Package server holds the generated server wiring (Serve) and the functional options consumers use to register their business-logic ServerInterface implementation plus auth, WebAuthn-store, and HSM/KMS signer overrides.
Package server holds the generated server wiring (Serve) and the functional options consumers use to register their business-logic ServerInterface implementation plus auth, WebAuthn-store, and HSM/KMS signer overrides.
apic-mcp/types
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
apic-mcp/ws
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
client
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
cmd/server command
Command server is the thin default entrypoint for the generated API.
Command server is the thin default entrypoint for the generated API.
gql
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
mcp
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
openapi
Package openapi provides primitives to interact with the openapi HTTP API.
Package openapi provides primitives to interact with the openapi HTTP API.
pkg/configx
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
pkg/gen
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/gen/cli
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/gqlx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/healthx
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
pkg/httpx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/internal/ratebucket
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
pkg/mcpx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx/auditx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx/otelx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx/promx
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
pkg/oidcx
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
pkg/opt
Package opt provides a small generic implementation of the functional options pattern.
Package opt provides a small generic implementation of the functional options pattern.
pkg/securex
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/cacpiv
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/csrfx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/fipsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/harness
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
pkg/securex/hashx
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
pkg/securex/mtlsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/sessionx
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
pkg/securex/signerx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/signerx/pkcs11
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/signerx/softfile
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/webauthnx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/wsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
server
Package server holds the generated server wiring (Serve) and the functional options consumers use to register their business-logic ServerInterface implementation plus auth, WebAuthn-store, and HSM/KMS signer overrides.
Package server holds the generated server wiring (Serve) and the functional options consumers use to register their business-logic ServerInterface implementation plus auth, WebAuthn-store, and HSM/KMS signer overrides.
types
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
ws
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
helpers
fn command
httpgentest command
internal/runner
Package runner centralizes the tiny CLI boilerplate shared by every helpers/* generator main: validate the positional-argument count, print a usage line, and exit non-zero on misuse (QG-030).
Package runner centralizes the tiny CLI boilerplate shared by every helpers/* generator main: validate the positional-argument count, print a usage line, and exit non-zero on misuse (QG-030).
internal/scaffold
Package scaffold holds shared codegen output helpers used by the apic code generators under helpers/* (wsgen, mcpgen, fn, noop, httpgentest).
Package scaffold holds shared codegen output helpers used by the apic code generators under helpers/* (wsgen, mcpgen, fn, noop, httpgentest).
mcpgen command
noop command
ownerguard command
Command ownerguard is the SEC-0027 post-gen helper.
Command ownerguard is the SEC-0027 post-gen helper.
wsgen command
internal
corpusgen
Package corpusgen produces deterministic edge-case seed values from neutral schema/auth constraints.
Package corpusgen produces deterministic edge-case seed values from neutral schema/auth constraints.
jwtalg
Package jwtalg is the canonical JWS algorithm-confusion guard shared by the OIDC/JWKS verification paths in api/oidc.go and pkg/htpx/oidc.go, which previously each carried a byte-identical private copy of the asymmetric allowlist plus the unverified-header parse (QG-060/QG-081).
Package jwtalg is the canonical JWS algorithm-confusion guard shared by the OIDC/JWKS verification paths in api/oidc.go and pkg/htpx/oidc.go, which previously each carried a byte-identical private copy of the asymmetric allowlist plus the unverified-header parse (QG-060/QG-081).
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg
Package pkg contains the runtime dependencies that will be generated into the output directory.
Package pkg contains the runtime dependencies that will be generated into the output directory.
configx
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
gen
Package gen is a generic general use Go functions library which can be used throughout any project.
Package gen is a generic general use Go functions library which can be used throughout any project.
gqlx
Package gqlx is a self-contained GraphQL engine used by apic-generated services.
Package gqlx is a self-contained GraphQL engine used by apic-generated services.
healthx
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
htpx
Package htpx is the HTTP application toolkit that backs apic-generated services.
Package htpx is the HTTP application toolkit that backs apic-generated services.
htpx/cmd/apimap command
httpx
Package httpx provides net/http server building blocks and middleware for apic services: a TLS/mTLS listener with hardened timeouts and body-size limits, transparent gzip response compression (with BREACH-sensitive path exclusions), token-bucket rate limiting (a coarse per-IP abuse ceiling plus stricter per-path-prefix and per-peer buckets), CORS handling, and the default-deny security response-header set (CSP, COOP/COEP/CORP, Permissions-Policy).
Package httpx provides net/http server building blocks and middleware for apic services: a TLS/mTLS listener with hardened timeouts and body-size limits, transparent gzip response compression (with BREACH-sensitive path exclusions), token-bucket rate limiting (a coarse per-IP abuse ceiling plus stricter per-path-prefix and per-peer buckets), CORS handling, and the default-deny security response-header set (CSP, COOP/COEP/CORP, Permissions-Policy).
internal/ratebucket
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
mcpx
Package mcpx implements a JSON-RPC 2.0 engine for the Model Context Protocol (MCP) over three transports: HTTP, WebSocket, and STDIO.
Package mcpx implements a JSON-RPC 2.0 engine for the Model Context Protocol (MCP) over three transports: HTTP, WebSocket, and STDIO.
obsx
Package obsx is the observability layer for apic services, bundling structured logging, metrics, and tracing behind a small package-level API.
Package obsx is the observability layer for apic services, bundling structured logging, metrics, and tracing behind a small package-level API.
obsx/auditx
Package auditx is the FedRAMP / NIST 800-53 audit logging layer for apic.
Package auditx is the FedRAMP / NIST 800-53 audit logging layer for apic.
obsx/otelx
Package otelx bootstraps the OpenTelemetry SDK from the standard OTEL_* environment variables (https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/) and delivers traces, metrics, and logs over OTLP/HTTP using the JSON encoding — stdlib + the already-vendored OTEL SDK only, no exporter module dependencies.
Package otelx bootstraps the OpenTelemetry SDK from the standard OTEL_* environment variables (https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/) and delivers traces, metrics, and logs over OTLP/HTTP using the JSON encoding — stdlib + the already-vendored OTEL SDK only, no exporter module dependencies.
obsx/promx
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
oidcx
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
opt
Package opt provides a small generic implementation of the functional options pattern.
Package opt provides a small generic implementation of the functional options pattern.
securex
Package securex — OIDC asymmetric verifier.
Package securex — OIDC asymmetric verifier.
securex/cacpiv
Package cacpiv extends mtlsx.Principal with DOD CAC and federal PIV identity extraction per FIPS 201-3 and the X.509 Certificate Policy for the U.S. Federal PKI Common Policy Framework.
Package cacpiv extends mtlsx.Principal with DOD CAC and federal PIV identity extraction per FIPS 201-3 and the X.509 Certificate Policy for the U.S. Federal PKI Common Policy Framework.
securex/csrfx
Package csrfx implements stateless, HMAC-signed, session-bound CSRF tokens using the signed double-submit pattern (OWASP).
Package csrfx implements stateless, HMAC-signed, session-bound CSRF tokens using the signed double-submit pattern (OWASP).
securex/fipsx
Package fipsx exposes a tiny façade over crypto/fips140 so the rest of apic can gate behavior on FIPS 140-3 mode without importing crypto/fips140 directly (keeping the import boundary tight makes FIPS-disabled callers easy to audit).
Package fipsx exposes a tiny façade over crypto/fips140 so the rest of apic can gate behavior on FIPS 140-3 mode without importing crypto/fips140 directly (keeping the import boundary tight makes FIPS-disabled callers easy to audit).
securex/harness
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
securex/harness/cmd/mint command
Command mint prints a standard RFC 7519 HS256 JWT to stdout, signed with the supplied shared secret, so non-Go test stacks (pytest/PyJWT, curl, etc.) can obtain a harness-minted token without linking any Go code.
Command mint prints a standard RFC 7519 HS256 JWT to stdout, signed with the supplied shared secret, so non-Go test stacks (pytest/PyJWT, curl, etc.) can obtain a harness-minted token without linking any Go code.
securex/hashx
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
securex/mtlsx
Package mtlsx implements the per-route mTLS verification pipeline used by apic-generated handlers: trust store loading, issuer-label enforcement, CRL/OCSP revocation checks, and principal extraction.
Package mtlsx implements the per-route mTLS verification pipeline used by apic-generated handlers: trust store loading, issuer-label enforcement, CRL/OCSP revocation checks, and principal extraction.
securex/sessionx
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
securex/signerx
Package signerx is the apic abstraction over hardware- and KMS-backed crypto.Signer providers (PKCS#11 HSMs, AWS KMS, Azure Key Vault, etc.).
Package signerx is the apic abstraction over hardware- and KMS-backed crypto.Signer providers (PKCS#11 HSMs, AWS KMS, Azure Key Vault, etc.).
securex/webauthnx
Package webauthnx wraps github.com/go-webauthn/webauthn with the apic-specific identity binding, FedRAMP-compatible attestation policy (AAGUID allow-list), and ceremony orchestration.
Package webauthnx wraps github.com/go-webauthn/webauthn with the apic-specific identity binding, FedRAMP-compatible attestation policy (AAGUID allow-list), and ceremony orchestration.
wsx
testgen
api
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
client
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
cmd/server command
Command server is the thin default entrypoint for the generated API.
Command server is the thin default entrypoint for the generated API.
gql
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
mcp
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/configx
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
Package configx defines the JSON configuration schema shared by the apic code generator and the generated servers, together with the validation and normalization that enforce a secure-by-default posture.
pkg/gen
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/gen/cli
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/gqlx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/healthx
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
Package healthx is the generated control-plane health subsystem: the user hook API a service registers dependency checks against, plus the executor and HTTP dispatch behind /livez, /readyz, and /startupz.
pkg/httpx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/internal/ratebucket
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
Package ratebucket is the canonical mutex-guarded token bucket shared by the rate-limiters that previously each carried a byte-identical private copy of this algorithm (securex.Bucket, mcpx's bucket, httpx's tokenBucket) — QG-046/QG-059/PERF-0044.
pkg/mcpx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx/auditx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx/otelx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/obsx/promx
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
Package promx implements obsx.MetricsProvider on top of prometheus/client_golang, preserving labels (the expvar default discards them) with a per-metric series-cardinality cap, and exposes the scrape handler mounted by generated servers at the authenticated /metrics endpoint.
pkg/oidcx
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
Package oidcx provides an auto-refreshing JWK Set cache that survives IdP key rotation without restarting the host process.
pkg/opt
Package opt provides a small generic implementation of the functional options pattern.
Package opt provides a small generic implementation of the functional options pattern.
pkg/securex
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/cacpiv
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/csrfx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/fipsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/harness
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
Package harness provides RBAC/ABAC test helpers for downstream services that consume the generated API.
pkg/securex/hashx
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
pkg/securex/hashx/algorithm.go Package hashx implements salted, self-describing, FIPS-140-3-aware one-way hashing and constant-time verification for passwords and other authentication material.
pkg/securex/mtlsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/sessionx
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
Package sessionx implements FedRAMP AC-7 account lockout, AC-11 inactivity timeout, and AC-12 session termination tracking.
pkg/securex/signerx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/signerx/pkcs11
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/signerx/softfile
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/securex/webauthnx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
pkg/wsx
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
server
Package server holds the generated server wiring (Serve) and the functional options consumers use to register their business-logic ServerInterface implementation plus auth, WebAuthn-store, and HSM/KMS signer overrides.
Package server holds the generated server wiring (Serve) and the functional options consumers use to register their business-logic ServerInterface implementation plus auth, WebAuthn-store, and HSM/KMS signer overrides.
types
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
ws
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
tests
integration/security/app/api
Package api is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package api is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/pkg/securex
Package securex is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package securex is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/pkg/securex/cacpiv
Package cacpiv is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package cacpiv is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/pkg/securex/mtlsx
Package mtlsx is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package mtlsx is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/pkg/securex/signerx
Package signerx is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package signerx is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/pkg/securex/signerx/pkcs11
Package pkcs11 is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package pkcs11 is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/server
Package server is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package server is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
integration/security/app/types
Package types is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Package types is a QG-093 tidy-only placeholder for the gitignored, generated tests/integration/security/app/ tree (see .gitignore).
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.
Code generated by apic; DO NOT EDIT.

Jump to

Keyboard shortcuts

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