Directories
¶
| Path | Synopsis |
|---|---|
|
Package apitest provides helpers for end-to-end HTTP tests that drive a real application handler through an httptest.Server.
|
Package apitest provides helpers for end-to-end HTTP tests that drive a real application handler through an httptest.Server. |
|
Package auth provides authentication and authorization building blocks: a transport-neutral Principal carried in context, credential extraction from HTTP requests, a pluggable Verifier (token -> Principal), a built-in JWT verifier, and net/http middleware for authentication and role-based access control.
|
Package auth provides authentication and authorization building blocks: a transport-neutral Principal carried in context, credential extraction from HTTP requests, a pluggable Verifier (token -> Principal), a built-in JWT verifier, and net/http middleware for authentication and role-based access control. |
|
Package broker abstracts an event broker behind transport-agnostic Publisher and Consumer contracts.
|
Package broker abstracts an event broker behind transport-agnostic Publisher and Consumer contracts. |
|
rabbitmq
Package rabbitmq implements the broker abstraction over RabbitMQ.
|
Package rabbitmq implements the broker abstraction over RabbitMQ. |
|
Package closer manages graceful shutdown of resources.
|
Package closer manages graceful shutdown of resources. |
|
cmd
|
|
|
servicekit
command
Command servicekit scaffolds and manages servicekit-based services.
|
Command servicekit scaffolds and manages servicekit-based services. |
|
Package config standardizes 12-factor configuration on jessevdk/go-flags: a single options struct whose fields carry `long`/`env`/`default`/`description` tags, so the same definition drives CLI flags, environment variables, and `--help`.
|
Package config standardizes 12-factor configuration on jessevdk/go-flags: a single options struct whose fields carry `long`/`env`/`default`/`description` tags, so the same definition drives CLI flags, environment variables, and `--help`. |
|
Package dbtest spins up disposable databases for integration tests using testcontainers.
|
Package dbtest spins up disposable databases for integration tests using testcontainers. |
|
Package debugsrv serves operational endpoints — net/http/pprof profiles plus optional metrics and health handlers — on a separate, internal-only listener or as a handler attached to an existing router.
|
Package debugsrv serves operational endpoints — net/http/pprof profiles plus optional metrics and health handlers — on a separate, internal-only listener or as a handler attached to an existing router. |
|
Package dim is a slim, generics-based dependency-injection toolkit: lazy providers and managed resources built from plain functions, with structured logging of initialization and cleanup.
|
Package dim is a slim, generics-based dependency-injection toolkit: lazy providers and managed resources built from plain functions, with structured logging of initialization and cleanup. |
|
Package errs provides a single, transport-agnostic error type with stable codes, an HTTP (and later gRPC) status mapping, request validation helpers, and automatic redaction of secrets in user-facing messages.
|
Package errs provides a single, transport-agnostic error type with stable codes, an HTTP (and later gRPC) status mapping, request validation helpers, and automatic redaction of secrets in user-facing messages. |
|
Package eventbus is an in-process, synchronous event bus for decoupling domain packages that cannot import one another (avoiding import cycles).
|
Package eventbus is an in-process, synchronous event bus for decoupling domain packages that cannot import one another (avoiding import cycles). |
|
Package grpcserver bootstraps a gRPC server with the SDK's cross-cutting concerns and exposes it as a worker.Runnable.
|
Package grpcserver bootstraps a gRPC server with the SDK's cross-cutting concerns and exposes it as a worker.Runnable. |
|
Package health provides liveness and readiness HTTP handlers suitable for Kubernetes probes.
|
Package health provides liveness and readiness HTTP handlers suitable for Kubernetes probes. |
|
Package httpmw provides outbound HTTP-client middleware: composable http.RoundTripper wrappers for resilient calls to upstream services.
|
Package httpmw provides outbound HTTP-client middleware: composable http.RoundTripper wrappers for resilient calls to upstream services. |
|
Package i18n is a thin wrapper over nicksnyder/go-i18n that loads message catalogs from an fs.FS (typically an embed.FS), resolves the request language from an Accept-Language header, and localizes *errs.Error messages by their MessageID/Code with Args as template data.
|
Package i18n is a thin wrapper over nicksnyder/go-i18n that loads message catalogs from an fs.FS (typically an embed.FS), resolves the request language from an Accept-Language header, and localizes *errs.Error messages by their MessageID/Code with Args as template data. |
|
Package logger is a thin wrapper around log/slog tailored for services.
|
Package logger is a thin wrapper around log/slog tailored for services. |
|
Package metrics provides a Prometheus registry, a scrape handler, an HTTP request middleware, and the building block for extensible, conflict-free metrics across the SDK and the application.
|
Package metrics provides a Prometheus registry, a scrape handler, an HTTP request middleware, and the building block for extensible, conflict-free metrics across the SDK and the application. |
|
Package migrate applies SQL schema migrations from an embedded filesystem.
|
Package migrate applies SQL schema migrations from an embedded filesystem. |
|
Package otel bootstraps OpenTelemetry tracing and provides helpers to inject a trace id into the context (and therefore into logs), open child spans, and propagate trace context across service boundaries.
|
Package otel bootstraps OpenTelemetry tracing and provides helpers to inject a trace id into the context (and therefore into logs), open child spans, and propagate trace context across service boundaries. |
|
Package outbox implements the transactional outbox pattern for reliably publishing domain events to a message broker.
|
Package outbox implements the transactional outbox pattern for reliably publishing domain events to a message broker. |
|
Package poller maintains a single "current value" that is refreshed by periodically calling a Getter.
|
Package poller maintains a single "current value" that is refreshed by periodically calling a Getter. |
|
Package queue is a durable work queue with at-least-once delivery, safe for concurrent consumers across processes.
|
Package queue is a durable work queue with at-least-once delivery, safe for concurrent consumers across processes. |
|
Package safetick provides panic recovery helpers for long-running background loops and message-consumer callbacks, so a single bad tick or message cannot crash the worker.
|
Package safetick provides panic recovery helpers for long-running background loops and message-consumer callbacks, so a single bad tick or message cannot crash the worker. |
|
Package sqldb provides Postgres helpers on top of jmoiron/sqlx and the pgx driver: connection setup, named query/exec wrappers with query logging, transactions, and bulk insert/upsert.
|
Package sqldb provides Postgres helpers on top of jmoiron/sqlx and the pgx driver: connection setup, named query/exec wrappers with query logging, transactions, and bulk insert/upsert. |
|
web
|
|
|
mid
Package mid provides standard net/http middleware for servicekit services.
|
Package mid provides standard net/http middleware for servicekit services. |
|
rest
Package rest is a tiny typed-handler layer over net/http.
|
Package rest is a tiny typed-handler layer over net/http. |
|
router
Package router wraps the standard library's net/http.ServeMux with nestable groups, per-group middleware, and typed handlers.
|
Package router wraps the standard library's net/http.ServeMux with nestable groups, per-group middleware, and typed handlers. |
|
Package worker unifies the background-execution patterns found across the reference services into one small vocabulary.
|
Package worker unifies the background-execution patterns found across the reference services into one small vocabulary. |
Click to show internal directories.
Click to hide internal directories.