Directories
¶
| Path | Synopsis |
|---|---|
|
admin
|
|
|
agent
module
|
|
|
proto
module
|
|
|
cmd
|
|
|
nucleus
module
|
|
|
drivers
|
|
|
mssql
module
|
|
|
mysql
module
|
|
|
oracle
module
|
|
|
postgres
module
|
|
|
sqlite
module
|
|
|
exporters
|
|
|
otlp
module
|
|
|
prometheus
module
|
|
|
internal
|
|
|
cli
`nucleus generate module <name>` — the package-per-feature slice generator (ADR-022 §4).
|
`nucleus generate module <name>` — the package-per-feature slice generator (ADR-022 §4). |
|
cli/scaffold
Package scaffold renders the `nucleus new` starter project from a tree of embedded template files instead of inline Go string literals.
|
Package scaffold renders the `nucleus new` starter project from a tree of embedded template files instead of inline Go string literals. |
|
configbind
Package configbind is the single place a merged koanf tree becomes a framework config struct.
|
Package configbind is the single place a merged koanf tree becomes a framework config struct. |
|
dbclassify
Package dbclassify recognises a unique-constraint violation from MySQL, SQL Server, Oracle and SQLite WITHOUT importing any of them.
|
Package dbclassify recognises a unique-constraint violation from MySQL, SQL Server, Oracle and SQLite WITHOUT importing any of them. |
|
dupfixture
Package dupfixture holds a model whose type NAME collides with one in the model package's tests: two packages each declaring a Product is the ordinary way two modules end up registering the same model name (NU-20).
|
Package dupfixture holds a model whose type NAME collides with one in the model package's tests: two packages each declaring a Product is the ordinary way two modules end up registering the same model name (NU-20). |
|
errreport
Package errreport carries, in a request's context, the reporters that want the error behind a 500 the framework answers — and hands them that error.
|
Package errreport carries, in a request's context, the reporters that want the error behind a 500 the framework answers — and hands them that error. |
|
fixtures/inprocess/dirqueue
Package dirqueue is the example in-process extension: a module that adds an outbox bridge written in Go, registered on the running application with no process in between.
|
Package dirqueue is the example in-process extension: a module that adds an outbox bridge written in Go, registered on the running application with no process in between. |
|
fixtures/plugins/nucleus-plugin-maildir
command
Command nucleus-plugin-maildir is the example external plugin of the Nucleus plugin SDK: a mail provider that delivers each message into a Maildir — one file per message, written to tmp/ and renamed into new/, the way a local mail system delivers — where a mail client, a test or a person can read it.
|
Command nucleus-plugin-maildir is the example external plugin of the Nucleus plugin SDK: a mail provider that delivers each message into a Maildir — one file per message, written to tmp/ and renamed into new/, the way a local mail system delivers — where a mail client, a test or a person can read it. |
|
fixtures/plugins/nucleus-plugin-relay
command
Command nucleus-plugin-relay is the example plugin for the outbox's plugin bridge: it serves the two capabilities an outbox bridge of type plugin sends.
|
Command nucleus-plugin-relay is the example plugin for the outbox's plugin bridge: it serves the two capabilities an outbox bridge of type plugin sends. |
|
httpneg
Package httpneg reads what a client asked for in its Accept header and carries the application's choice of error shape on the request context.
|
Package httpneg reads what a client asked for in its Accept header and carries the application's choice of error shape on the request context. |
|
jobstelemetry
Package jobstelemetry holds the metric instruments every job provider records to.
|
Package jobstelemetry holds the metric instruments every job provider records to. |
|
knownproviders
Package knownproviders is the catalog: every name `nucleus add` installs, `nucleus new --with` resolves and the runtime's refusals point at (ADR-034).
|
Package knownproviders is the catalog: every name `nucleus add` installs, `nucleus new --with` resolves and the runtime's refusals point at (ADR-034). |
|
leakcheck
Package leakcheck fails a test binary that leaves goroutines running after its tests pass.
|
Package leakcheck fails a test binary that leaves goroutines running after its tests pass. |
|
listenhook
Package listenhook tells a caller inside this module the moment app.Run has bound its listener, carried on the context Run receives.
|
Package listenhook tells a caller inside this module the moment app.Run has bound its listener, carried on the context Run receives. |
|
providerconfig
Package providerconfig binds the configuration subtree that belongs to a registered provider — a storage backend, a session store, an authentication backend — into the provider's own typed struct.
|
Package providerconfig binds the configuration subtree that belongs to a registered provider — a storage backend, a session store, an authentication backend — into the provider's own typed struct. |
|
providerns
Package providerns answers one question for every configuration validator in the framework: does this key belong to the private subtree of a REGISTERED provider, rather than to app.Config's schema?
|
Package providerns answers one question for every configuration validator in the framework: does this key belong to the private subtree of a REGISTERED provider, rather than to app.Config's schema? |
|
routedump
Package routedump is the wire format between a Nucleus application that prints its route table at boot (NUCLEUS_PRINT_ROUTES=1, read by pkg/nucleus.RunContext) and the `nucleus routes` command that runs the application to read it.
|
Package routedump is the wire format between a Nucleus application that prints its route table at boot (NUCLEUS_PRINT_ROUTES=1, read by pkg/nucleus.RunContext) and the `nucleus routes` command that runs the application to read it. |
|
testredis
Package testredis gives the framework's tests a Redis server: miniredis, in a process of its own.
|
Package testredis gives the framework's tests a Redis server: miniredis, in a process of its own. |
|
testsqlite
Package testsqlite links SQLite into the framework's own test binaries and registers its unique-violation classifier.
|
Package testsqlite links SQLite into the framework's own test binaries and registers its unique-violation classifier. |
|
pkg
|
|
|
accounts
Package accounts is the part of authentication an end user touches: registering, confirming an address, signing in and out, recovering a password, and being locked out after enough wrong guesses.
|
Package accounts is the part of authentication an end user touches: registering, confirming an address, signing in and out, recovering a password, and being locked out after enough wrong guesses. |
|
app
Package app provides the application configuration and bootstrap for Nucleus.
|
Package app provides the application configuration and bootstrap for Nucleus. |
|
auth
Package auth provides authentication utilities for the Nucleus framework, including password hashing, JWT management, and session handling.
|
Package auth provides authentication utilities for the Nucleus framework, including password hashing, JWT management, and session handling. |
|
auth/apikeys
Package apikeys is the credential a program uses to call an API: issued once, shown once, revocable, scoped, and recognisable in a log.
|
Package apikeys is the credential a program uses to call an API: issued once, shown once, revocable, scoped, and recognisable in a log. |
|
auth/backend
Package backend is the contract a third-party authentication backend implements — and nothing else.
|
Package backend is the contract a third-party authentication backend implements — and nothing else. |
|
auth/backend/backendtest
Package backendtest is a conformance suite for authentication backends.
|
Package backendtest is a conformance suite for authentication backends. |
|
auth/federated
Package federated is the contract a browser-redirect identity provider implements — OIDC, SAML, anything where the user leaves for an identity provider and comes back — and nothing else.
|
Package federated is the contract a browser-redirect identity provider implements — OIDC, SAML, anything where the user leaves for an identity provider and comes back — and nothing else. |
|
auth/federated/oidc
Package oidc is an OpenID Connect provider for the federated sign-in seam: authorization code flow with PKCE, discovery, and an id_token verified against the provider's published keys.
|
Package oidc is an OpenID Connect provider for the federated sign-in seam: authorization code flow with PKCE, discovery, and an id_token verified against the provider's published keys. |
|
auth/secrets
Package secrets resolves opaque reference strings into raw secret bytes for the auth layer — JWT signing keys, primarily.
|
Package secrets resolves opaque reference strings into raw secret bytes for the auth layer — JWT signing keys, primarily. |
|
auth/sessionstore
Package sessionstore is the contract a third-party session store implements — and nothing else.
|
Package sessionstore is the contract a third-party session store implements — and nothing else. |
|
authz
Package authz provides authorization for the Nucleus framework using Casbin.
|
Package authz provides authorization for the Nucleus framework using Casbin. |
|
cache
Package cache is a minimal key/value cache with TTL semantics and the runtime counterpart of the `nucleus createcachetable` CLI command: an in-memory backend for single-process deployments, a SQL backend wired to the table that command creates (`nucleus_cache_entries` by default) for replicas that share a database, and a registry other backends join by import — the Redis one is pkg/cache/rediscache.
|
Package cache is a minimal key/value cache with TTL semantics and the runtime counterpart of the `nucleus createcachetable` CLI command: an in-memory backend for single-process deployments, a SQL backend wired to the table that command creates (`nucleus_cache_entries` by default) for replicas that share a database, and a registry other backends join by import — the Redis one is pkg/cache/rediscache. |
|
cache/rediscache
Package rediscache is the Redis backend of pkg/cache: entries every instance of an application pointed at the same server shares, with the expiry kept by Redis itself.
|
Package rediscache is the Redis backend of pkg/cache: entries every instance of an application pointed at the same server shares, with the expiry kept by Redis itself. |
|
circuit
Package circuit provides a small circuit-breaker primitive for wrapping calls to external dependencies (mail, storage, plugin bridges, third-party APIs) in a deterministic failure-isolation pattern.
|
Package circuit provides a small circuit-breaker primitive for wrapping calls to external dependencies (mail, storage, plugin bridges, third-party APIs) in a deterministic failure-isolation pattern. |
|
db
Package db provides database connectivity for the Nucleus framework.
|
Package db provides database connectivity for the Nucleus framework. |
|
db/driver
Package driver is the contract a database driver module implements to plug into pkg/db.
|
Package driver is the contract a database driver module implements to plug into pkg/db. |
|
db/driver/drivertest
Package drivertest is a conformance kit for database driver modules.
|
Package drivertest is a conformance kit for database driver modules. |
|
errors
Package errors provides domain-specific error types for the Nucleus framework.
|
Package errors provides domain-specific error types for the Nucleus framework. |
|
health
Package health provides a small abstraction for dependency probes used by the /healthz handler in pkg/app.
|
Package health provides a small abstraction for dependency probes used by the /healthz handler in pkg/app. |
|
i18n
Package i18n is the runtime counterpart of the `nucleus makemessages` / `nucleus compilemessages` CLI pair.
|
Package i18n is the runtime counterpart of the `nucleus makemessages` / `nucleus compilemessages` CLI pair. |
|
model
Package model provides the model registry, metadata extraction, and generic CRUD operations for the Nucleus framework.
|
Package model provides the model registry, metadata extraction, and generic CRUD operations for the Nucleus framework. |
|
nucleus
Package nucleus — config.go implements the configuration loader surfaced by `AppBuilder.FromConfigFile`.
|
Package nucleus — config.go implements the configuration loader surfaced by `AppBuilder.FromConfigFile`. |
|
nucleustest
Package nucleustest boots a nucleus application inside the test process (DX-22).
|
Package nucleustest boots a nucleus application inside the test process (DX-22). |
|
observability
Package observability is the in-process EVENT BUS — not the logging package.
|
Package observability is the in-process EVENT BUS — not the logging package. |
|
observability/hooks
Package hooks plugs the framework's existing instrumentation points (HTTP middleware, SQL observer, session manager) into the observability.Bus so the agent (and direct subscribers) can receive strongly typed events.
|
Package hooks plugs the framework's existing instrumentation points (HTTP middleware, SQL observer, session manager) into the observability.Bus so the agent (and direct subscribers) can receive strongly typed events. |
|
observe
Package observe is the one you almost always want: structured logging (slog with context-aware fields), request/trace IDs and the small set of helpers the rest of the framework logs through.
|
Package observe is the one you almost always want: structured logging (slog with context-aware fields), request/trace IDs and the small set of helpers the rest of the framework logs through. |
|
observe/exporter
Package exporter is the contract a telemetry exporter module implements to plug into pkg/observe.
|
Package exporter is the contract a telemetry exporter module implements to plug into pkg/observe. |
|
outbox
Package outbox provides a transactional outbox pattern implementation with support for external message delivery through configurable bridges.
|
Package outbox provides a transactional outbox pattern implementation with support for external message delivery through configurable bridges. |
|
plugins
Package plugins is the executable plugin contract of Nucleus, both sides of it.
|
Package plugins is the executable plugin contract of Nucleus, both sides of it. |
|
realtime
Package realtime pushes messages to connected clients: topics, broadcast, presence, and the two transports a browser understands.
|
Package realtime pushes messages to connected clients: topics, broadcast, presence, and the two transports a browser understands. |
|
router
Package router provides an HTTP router for the Nucleus framework, built on top of Go's standard net/http.ServeMux (Go 1.22+).
|
Package router provides an HTTP router for the Nucleus framework, built on top of Go's standard net/http.ServeMux (Go 1.22+). |
|
router/interceptor
Package interceptor is the contract a third-party request interceptor implements — and nothing else.
|
Package interceptor is the contract a third-party request interceptor implements — and nothing else. |
|
signals
Package signals provides a synchronous and asynchronous event bus for the Nucleus framework.
|
Package signals provides a synchronous and asynchronous event bus for the Nucleus framework. |
|
storage/provider
Package storage provides a durable, provider-agnostic file storage interface for Nucleus applications.
|
Package storage provides a durable, provider-agnostic file storage interface for Nucleus applications. |
|
tasks/providers/asynq
Package tasks provides background job enqueueing and worker runtime backed by Asynq.
|
Package tasks provides background job enqueueing and worker runtime backed by Asynq. |
|
tasks/providers/sql
Package sqlprovider is a durable job queue on the database the application already has — no broker, no Redis.
|
Package sqlprovider is a durable job queue on the database the application already has — no broker, no Redis. |
|
validate
Package validate provides struct validation powered by go-playground/validator, with automatic conversion of validation errors to Nucleus DomainErrors.
|
Package validate provides struct validation powered by go-playground/validator, with automatic conversion of validation errors to Nucleus DomainErrors. |
|
providers
|
|
|
auth-saml
module
|
|
|
errors-sentry
module
|
|
|
ldap
module
|
|
|
secrets-aws
module
|
|
|
storage-azure
module
|
|
|
storage-gcs
module
|
|
|
storage-s3
module
|
|
|
scripts
|
|
|
website/bodycheck
command
Command bodycheck is the automated CI guard for the §9 anti-falsehood discipline (see CLAUDE.md §9).
|
Command bodycheck is the automated CI guard for the §9 anti-falsehood discipline (see CLAUDE.md §9). |
|
website/gen-config-reference
command
Command gen-config-reference renders the public Configuration reference page (website/docs/reference/configuration.md) from the configuration key registry (docs/reference/CONFIG_KEY_REGISTRY.md).
|
Command gen-config-reference renders the public Configuration reference page (website/docs/reference/configuration.md) from the configuration key registry (docs/reference/CONFIG_KEY_REGISTRY.md). |
Click to show internal directories.
Click to hide internal directories.