Documentation
¶
Overview ¶
Package contrib provides adapters and integrations that depend on third-party libraries.
Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
cedar
Package cedar adapts cedar-go policy evaluation to api-toolkit authorization ports.
|
Package cedar adapts cedar-go policy evaluation to api-toolkit authorization ports. |
|
chi
Package chi adapts the chi router to api-toolkit HTTP ports.
|
Package chi adapts the chi router to api-toolkit HTTP ports. |
|
clock
Package clock adapts the system clock to the core clock port.
|
Package clock adapts the system clock to the core clock port. |
|
envvar
Package envvar loads environment-backed configuration through explicit adapter helpers.
|
Package envvar loads environment-backed configuration through explicit adapter helpers. |
|
httpclient
Package httpclient provides outbound HTTP clients with retry and tracing.
|
Package httpclient provides outbound HTTP clients with retry and tracing. |
|
idempotency
Package idempotency provides a contrib in-memory idempotency store.
|
Package idempotency provides a contrib in-memory idempotency store. |
|
idempotencyredis
Package idempotencyredis provides Redis-backed idempotency storage.
|
Package idempotencyredis provides Redis-backed idempotency storage. |
|
idempotencytest
Package idempotencytest provides reusable idempotency adapter contract tests.
|
Package idempotencytest provides reusable idempotency adapter contract tests. |
|
logzap
Package logzap adapts zap logging to the core logger port.
|
Package logzap adapts zap logging to the core logger port. |
|
migrate
Package migrate adapts migration execution to contrib database tooling.
|
Package migrate adapts migration execution to contrib database tooling. |
|
opa
Package opa provides an Open Policy Agent (OPA) policy engine adapter.
|
Package opa provides an Open Policy Agent (OPA) policy engine adapter. |
|
pgxpool
Package pgxpool adapts pgxpool to api-toolkit database ports.
|
Package pgxpool adapts pgxpool to api-toolkit database ports. |
|
ratelimitredis
Package ratelimitredis provides Redis-backed rate limiting.
|
Package ratelimitredis provides Redis-backed rate limiting. |
|
resend
Package resend adapts the Resend API to the core email sender port.
|
Package resend adapts the Resend API to the core email sender port. |
|
stripe
Package stripe adapts Stripe Checkout, webhooks, portal, and invoicing to the explicit v2 compat/billing contracts.
|
Package stripe adapts Stripe Checkout, webhooks, portal, and invoicing to the explicit v2 compat/billing contracts. |
|
txpostgres
Package txpostgres provides transaction helpers over a DatabasePool.
|
Package txpostgres provides transaction helpers over a DatabasePool. |
|
ulid
Package ulid adapts ULID generation to the core ID generator port.
|
Package ulid adapts ULID generation to the core ID generator port. |
|
uuid
Package uuid adapts UUID generation to the core ID generator port.
|
Package uuid adapts UUID generation to the core ID generator port. |
|
validation
Package validation provides validation utilities backed by go-playground/validator.
|
Package validation provides validation utilities backed by go-playground/validator. |
|
Package bootstrap composes common contrib adapters and core middleware into application profiles.
|
Package bootstrap composes common contrib adapters and core middleware into application profiles. |
|
cmd
|
|
|
migrate
Package migrate provides the migrate CLI.
|
Package migrate provides the migrate CLI. |
|
tester
command
Package main provides the tester CLI.
|
Package main provides the tester CLI. |
|
Package config provides fail-fast configuration loading helpers.
|
Package config provides fail-fast configuration loading helpers. |
|
Package countrycodes contains country-code helpers used by contrib consumers.
|
Package countrycodes contains country-code helpers used by contrib consumers. |
|
email
|
|
|
markdown
Package markdown renders Markdown email content for contrib email workflows.
|
Package markdown renders Markdown email content for contrib email workflows. |
|
noop
Package noop implements a no-op email sender.
|
Package noop implements a no-op email sender. |
|
examples
|
|
|
api-key
command
Command api-key shows API key authentication with scoped routes.
|
Command api-key shows API key authentication with scoped routes. |
|
auth
command
Command auth shows Clerk auth wiring.
|
Command auth shows Clerk auth wiring. |
|
file-upload
command
Command file-upload shows a multipart upload endpoint with size limits.
|
Command file-upload shows a multipart upload endpoint with size limits. |
|
idempotency
command
Command idempotency shows idempotent endpoint wiring.
|
Command idempotency shows idempotent endpoint wiring. |
|
minimal
command
Command minimal shows a basic API wiring example.
|
Command minimal shows a basic API wiring example. |
|
outbound
command
Command outbound shows a guarded outbound HTTP client with retries and breakers.
|
Command outbound shows a guarded outbound HTTP client with retries and breakers. |
|
pagination
command
Command pagination shows a limit/offset list endpoint with query limits.
|
Command pagination shows a limit/offset list endpoint with query limits. |
|
policy
command
Command policy shows policy-engine authorization with Cedar.
|
Command policy shows policy-engine authorization with Cedar. |
|
secure-profile
command
Command secure-profile shows a hardened profile wiring example.
|
Command secure-profile shows a hardened profile wiring example. |
|
spec-first
command
Code generated by spec-first example; DO NOT EDIT.
|
Code generated by spec-first example; DO NOT EDIT. |
|
spec-first/gen
command
|
|
|
webhook
command
Command webhook shows a minimal webhook receiver with signature verification.
|
Command webhook shows a minimal webhook receiver with signature verification. |
|
integrations
|
|
|
auth/clerk
Package clerk provides convenience wiring around the Clerk auth middleware.
|
Package clerk provides convenience wiring around the Clerk auth middleware. |
|
auth/devheaders
Package devheaders provides convenience wiring for development-only auth headers.
|
Package devheaders provides convenience wiring for development-only auth headers. |
|
auth/jwt
Package jwt provides convenience wiring around the stable JWT middleware.
|
Package jwt provides convenience wiring around the stable JWT middleware. |
|
pgxpool
Package pgxpool provides convenience wiring around the pgxpool adapter.
|
Package pgxpool provides convenience wiring around the pgxpool adapter. |
|
resend
Package resend provides convenience wiring around the Resend email adapter.
|
Package resend provides convenience wiring around the Resend email adapter. |
|
stripe
Package stripe provides convenience wiring around the Stripe billing adapter.
|
Package stripe provides convenience wiring around the Stripe billing adapter. |
|
txpostgres
Package txpostgres provides convenience wiring around the Postgres transaction adapter.
|
Package txpostgres provides convenience wiring around the Postgres transaction adapter. |
|
middleware
|
|
|
auth/clerk
Package clerk provides Clerk JWT middleware.
|
Package clerk provides Clerk JWT middleware. |
|
auth/devheaders
Package devheaders provides development-only debug auth header middleware.
|
Package devheaders provides development-only debug auth header middleware. |
|
cors
Package cors provides contrib CORS middleware configuration.
|
Package cors provides contrib CORS middleware configuration. |
|
metrics
Package metrics provides contrib HTTP metrics middleware.
|
Package metrics provides contrib HTTP metrics middleware. |
|
openapi
Package openapi provides OpenAPI request and response validation middleware.
|
Package openapi provides OpenAPI request and response validation middleware. |
|
oteltrace
Package oteltrace provides OpenTelemetry tracing middleware for contrib users.
|
Package oteltrace provides OpenTelemetry tracing middleware for contrib users. |
|
requestlog
Panic logging ------------
|
Panic logging ------------ |
|
Package migrator orchestrates database migrations for contrib-backed services.
|
Package migrator orchestrates database migrations for contrib-backed services. |
|
scheduler
|
|
|
postgres
Package postgres stores scheduler run records in Postgres.
|
Package postgres stores scheduler run records in Postgres. |
|
Package telemetry provides contrib OpenTelemetry wiring helpers.
|
Package telemetry provides contrib OpenTelemetry wiring helpers. |
Click to show internal directories.
Click to hide internal directories.