Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
comment-lint
command
Command comment-lint enforces the repository comment discipline over Go sources.
|
Command comment-lint enforces the repository comment discipline over Go sources. |
|
gen-apperror
command
Command gen-apperror regenerates apperror/codes.gen.go from apperror/codes.json.
|
Command gen-apperror regenerates apperror/codes.gen.go from apperror/codes.json. |
|
gen-config-example
command
Command gen-config-example regenerates .env.reference and config.reference.yml from config struct tags.
|
Command gen-config-example regenerates .env.reference and config.reference.yml from config struct tags. |
|
gen-scope
command
Command gen-scope regenerates scope/names.gen.go from scope/scopes.json.
|
Command gen-scope regenerates scope/names.gen.go from scope/scopes.json. |
|
othra
command
Command othra runs the Othra identity provider.
|
Command othra runs the Othra identity provider. |
|
protoc-gen-mcp
command
Command protoc-gen-mcp generates MCP tool bindings for every RPC annotated with mcp.v1.tool.
|
Command protoc-gen-mcp generates MCP tool bindings for every RPC annotated with mcp.v1.tool. |
|
Package config loads runtime configuration from defaults, a YAML file and OTHRA_* env vars.
|
Package config loads runtime configuration from defaults, a YAML file and OTHRA_* env vars. |
|
Package emailaddr normalizes email addresses the same way for admins and end users.
|
Package emailaddr normalizes email addresses the same way for admins and end users. |
|
examples
|
|
|
webhook-pong
command
Command webhook-pong is a localhost webhook receiver that verifies X-Othra-Signature and answers 200 PONG!!!.
|
Command webhook-pong is a localhost webhook receiver that verifies X-Othra-Signature and answers 200 PONG!!!. |
|
Package genassets embeds the buf-generated OpenAPI specs so the running binary can serve them without touching the filesystem.
|
Package genassets embeds the buf-generated OpenAPI specs so the running binary can serve them without touching the filesystem. |
|
Package httpclient builds outbound HTTP clients that are SSRF-filtered, traced and bounded by default.
|
Package httpclient builds outbound HTTP clients that are SSRF-filtered, traced and bounded by default. |
|
Package httpserver adapts an http.Server into a worker.Worker.
|
Package httpserver adapts an http.Server into a worker.Worker. |
|
internal
|
|
|
apiclient
Package apiclient is the Connect client the CLI uses to reach a remote Othra; it imports no domain package.
|
Package apiclient is the Connect client the CLI uses to reach a remote Othra; it imports no domain package. |
|
apikey
Package apikey mints and manages the machine credentials clients present to Othra.
|
Package apikey mints and manages the machine credentials clients present to Othra. |
|
auth
Package auth signs people in with a password, checks basic credentials and rebuilds a Principal's authority.
|
Package auth signs people in with a password, checks basic credentials and rebuilds a Principal's authority. |
|
auth/views
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
boot
Package boot is the composition root: it wires config into the runtime graph.
|
Package boot is the composition root: it wires config into the runtime graph. |
|
cli
Package cli builds the cobra command tree — every command is a factory so tests get a fresh tree.
|
Package cli builds the cobra command tree — every command is a factory so tests get a fresh tree. |
|
client
Package client holds a project's OAuth clients: their redirect URIs, secrets and consent policy.
|
Package client holds a project's OAuth clients: their redirect URIs, secrets and consent policy. |
|
consent
Package consent holds the scopes an end user approved for an OAuth client and a resource server, and decides when to ask again.
|
Package consent holds the scopes an end user approved for an OAuth client and a resource server, and decides when to ask again. |
|
controlplane
Package controlplane wires the Connect-RPC handlers into an http.Handler.
|
Package controlplane wires the Connect-RPC handlers into an http.Handler. |
|
enduser
Package enduser holds a project's end users: magic-link sign-in, browser and user sessions, and terms consent.
|
Package enduser holds a project's end users: magic-link sign-in, browser and user sessions, and terms consent. |
|
federation
Package federation signs end users in through a project's upstream IdPs and links their identities.
|
Package federation signs end users in through a project's upstream IdPs and links their identities. |
|
health
Package health answers the liveness and readiness probes.
|
Package health answers the liveness and readiness probes. |
|
install
Package install performs the first-boot setup: the first owner, the system org and its default project.
|
Package install performs the first-boot setup: the first owner, the system org and its default project. |
|
install/views
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
kernel
Package kernel holds the cross-cutting primitives every service receives.
|
Package kernel holds the cross-cutting primitives every service receives. |
|
kernel/authn
Package authn turns the credential a request presents into a Principal and checks it against a permission table.
|
Package authn turns the credential a request presents into a Principal and checks it against a permission table. |
|
kernel/authz
Package authz answers whether a Principal may perform a permission.
|
Package authz answers whether a Principal may perform a permission. |
|
kernel/capabilities
Package capabilities derives the feature switches surfaces check instead of reading the deployment mode.
|
Package capabilities derives the feature switches surfaces check instead of reading the deployment mode. |
|
kernel/db
Package db is the database feature: the writer/reader pool, the unit of work and the Postgres error checks.
|
Package db is the database feature: the writer/reader pool, the unit of work and the Postgres error checks. |
|
kernel/db/dbtest
Package dbtest helps sqlmock tests expect the transactions kernel/db opens around every store call.
|
Package dbtest helps sqlmock tests expect the transactions kernel/db opens around every store call. |
|
kernel/events
Package events is the hardcoded catalog of outbound webhook event types and their payload versions, the public contract tenants receive.
|
Package events is the hardcoded catalog of outbound webhook event types and their payload versions, the public contract tenants receive. |
|
kernel/mailqueue
Package mailqueue is the durable mail queue on Postgres: messages are sealed at rest and erased once settled.
|
Package mailqueue is the durable mail queue on Postgres: messages are sealed at rest and erased once settled. |
|
kernel/outbox
Package outbox is the durable, tenant-scoped delivery queue on Postgres.
|
Package outbox is the durable, tenant-scoped delivery queue on Postgres. |
|
kernel/queue
Package queue declares jobs and broadcasts and the Queue a driver carries them on.
|
Package queue declares jobs and broadcasts and the Queue a driver carries them on. |
|
kernel/queue/nats
Package nats is the queue driver on NATS JetStream: streams WORK, DLQ and BROADCAST in one account.
|
Package nats is the queue driver on NATS JetStream: streams WORK, DLQ and BROADCAST in one account. |
|
kernel/ratelimit
Package ratelimit defines the Limiter contract that the memory and Redis stores implement.
|
Package ratelimit defines the Limiter contract that the memory and Redis stores implement. |
|
kernel/ratelimit/memory
Package memory is the in-process ratelimit store: GCRA over a bounded map, so limits are per instance.
|
Package memory is the in-process ratelimit store: GCRA over a bounded map, so limits are per instance. |
|
kernel/ratelimit/ratelimittest
Package ratelimittest is the contract test every ratelimit store runs.
|
Package ratelimittest is the contract test every ratelimit store runs. |
|
kernel/ratelimit/redis
Package redis is the shared ratelimit store: GCRA in one Lua script on Redis, so every server counts against one limit.
|
Package redis is the shared ratelimit store: GCRA in one Lua script on Redis, so every server counts against one limit. |
|
kernel/secret
Package secret mints and hashes Othra's credentials: prefixed secrets shown once and opaque tokens, stored only as hashes.
|
Package secret mints and hashes Othra's credentials: prefixed secrets shown once and opaque tokens, stored only as hashes. |
|
kernel/session
Package session models the authenticated caller (Principal) and the store that keeps browser sessions.
|
Package session models the authenticated caller (Principal) and the store that keeps browser sessions. |
|
kernel/session/sessiontest
Package sessiontest holds the behavior every session.Store must share.
|
Package sessiontest holds the behavior every session.Store must share. |
|
kernel/storage
Package storage is the file storage feature: signed direct uploads, their verification, object keys and URLs.
|
Package storage is the file storage feature: signed direct uploads, their verification, object keys and URLs. |
|
kernel/storage/memory
Package memory is an in-process storage driver for tests: presigned URLs are fake and Put stands in for the browser.
|
Package memory is an in-process storage driver for tests: presigned URLs are fake and Put stands in for the browser. |
|
kernel/storage/s3
Package s3 is the storage driver on an S3-compatible bucket: presigned PUT and GET, HEAD, ranged GET and DELETE.
|
Package s3 is the storage driver on an S3-compatible bucket: presigned PUT and GET, HEAD, ranged GET and DELETE. |
|
kernel/tenant
Package tenant carries the OrgID/ProjectID/UserID triple through the request lifecycle.
|
Package tenant carries the OrgID/ProjectID/UserID triple through the request lifecycle. |
|
kernel/tokens
Package tokens verifies the access tokens of one issuer for one resource server through oauthrs.
|
Package tokens verifies the access tokens of one issuer for one resource server through oauthrs. |
|
kernel/usage
Package usage batches last-used writes on a ticker, so authenticating a credential never waits on one.
|
Package usage batches last-used writes on a ticker, so authenticating a credential never waits on one. |
|
keys
Package keys holds each project's token signing keys: sealed RS256 keys, their rotation, the JWKS and the signer.
|
Package keys holds each project's token signing keys: sealed RS256 keys, their rotation, the JWKS and the signer. |
|
legal
Package legal ships the Terms of Service and Privacy Policy and records that a person accepted them.
|
Package legal ships the Terms of Service and Privacy Policy and records that a person accepted them. |
|
legal/views
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
mcp
Package mcp wires the MCP surface: request authentication, the scopes a caller holds and error payloads.
|
Package mcp wires the MCP surface: request authentication, the scopes a caller holds and error payloads. |
|
mcp/ui
Package ui embeds the built MCP App bundle, published at ui://othra/app.
|
Package ui embeds the built MCP App bundle, published at ui://othra/app. |
|
oauth/hosted
Package hosted serves the branded sign-in pages of each project's issuer: login, magic links, the account picker and terms.
|
Package hosted serves the branded sign-in pages of each project's issuer: login, magic links, the account picker and terms. |
|
oauth/hosted/views
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
oauth/oidc
Package oidc serves each issuer's public OAuth and OpenID Connect endpoints: discovery, metadata, the JWKS, token and userinfo.
|
Package oidc serves each issuer's public OAuth and OpenID Connect endpoints: discovery, metadata, the JWKS, token and userinfo. |
|
oauth/redirecturi
Package redirecturi holds the redirect URI rules OAuth clients register under and the matcher /authorize checks them with.
|
Package redirecturi holds the redirect URI rules OAuth clients register under and the matcher /authorize checks them with. |
|
org
Package org models organizations.
|
Package org models organizations. |
|
org/invite
Package invite brings people into an org by email, through a single-use link and a transactional accept.
|
Package invite brings people into an org by email, through a single-use link and a transactional accept. |
|
org/invite/views
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
org/member
Package member models who belongs to an org and with which role.
|
Package member models who belongs to an org and with which role. |
|
org/member/views
Package views renders the member notice emails.
|
Package views renders the member notice emails. |
|
pat
Package pat holds end users' personal tokens: opaque bearer tokens for one resource server, validated only by introspection.
|
Package pat holds end users' personal tokens: opaque bearer tokens for one resource server, validated only by introspection. |
|
permission
Package permission holds the one table of the permissions each Connect procedure needs, for /api and MCP alike.
|
Package permission holds the one table of the permissions each Connect procedure needs, for /api and MCP alike. |
|
project
Package project models projects within an organization.
|
Package project models projects within an organization. |
|
prompt
Package prompt reads answers from a command's stdin: hidden on a terminal, one line otherwise.
|
Package prompt reads answers from a command's stdin: hidden on a terminal, one line otherwise. |
|
render
Package render dispatches CLI output to text tables, JSON, or NDJSON.
|
Package render dispatches CLI output to text tables, JSON, or NDJSON. |
|
resourceserver
Package resourceserver holds a project's resource servers, their scopes, their links to OAuth clients and their RFC 9728 verification.
|
Package resourceserver holds a project's resource servers, their scopes, their links to OAuth clients and their RFC 9728 verification. |
|
testutil/cptest
Package cptest holds controlplane test helpers that would cycle inside fakes.
|
Package cptest holds controlplane test helpers that would cycle inside fakes. |
|
testutil/fakes
Package fakes holds hand-written test doubles shared across packages.
|
Package fakes holds hand-written test doubles shared across packages. |
|
testutil/natstest
Package natstest starts an in-process NATS JetStream server for tests.
|
Package natstest starts an in-process NATS JetStream server for tests. |
|
tool/commentlint
Package commentlint enforces the repository comment discipline over Go sources.
|
Package commentlint enforces the repository comment discipline over Go sources. |
|
tool/protocmcp
Package gen turns MCP-annotated RPCs into mcp.ToolSpec registrations over their Connect handlers.
|
Package gen turns MCP-annotated RPCs into mcp.ToolSpec registrations over their Connect handlers. |
|
user
Package user models the people who sign in to Othra.
|
Package user models the people who sign in to Othra. |
|
web
Package web builds the HTTP surface: the mux and its middleware.
|
Package web builds the HTTP surface: the mux and its middleware. |
|
web/assets
Package assets serves embedded files with strong ETags and their build-time brotli and gzip siblings.
|
Package assets serves embedded files with strong ETags and their build-time brotli and gzip siblings. |
|
web/console
Package console embeds the built console SPA.
|
Package console embeds the built console SPA. |
|
web/i18n
Package i18n holds the message catalogs of the hosted pages and mail, and picks a locale from Accept-Language.
|
Package i18n holds the message catalogs of the hosted pages and mail, and picks a locale from Accept-Language. |
|
web/layout
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
web/middleware
Package middleware holds the web surface's HTTP middleware.
|
Package middleware holds the web surface's HTTP middleware. |
|
web/portal
Package portal embeds the built end-user portal SPA.
|
Package portal embeds the built end-user portal SPA. |
|
web/spa
Package spa serves an embedded single-page app build: its files with build-aware caching and one index.html rebased at boot.
|
Package spa serves an embedded single-page app build: its files with build-aware caching and one index.html rebased at boot. |
|
webhook
Package webhook is the outbound webhooks bounded context: tenant endpoints and their delivery attempts.
|
Package webhook is the outbound webhooks bounded context: tenant endpoints and their delivery attempts. |
|
Package mailer defines the Message and Mailer contract that the console, smtp and resend drivers implement.
|
Package mailer defines the Message and Mailer contract that the console, smtp and resend drivers implement. |
|
console
Package console is the development mail driver that prints each message instead of sending it.
|
Package console is the development mail driver that prints each message instead of sending it. |
|
resend
Package resend is the mail driver that sends through the Resend HTTP API.
|
Package resend is the mail driver that sends through the Resend HTTP API. |
|
smtp
Package smtp is the mail driver that sends through an SMTP server with STARTTLS, implicit TLS or no TLS.
|
Package smtp is the mail driver that sends through an SMTP server with STARTTLS, implicit TLS or no TLS. |
|
Package mcp wraps the Model Context Protocol Go SDK's streamable-HTTP server with a scope-checked tool registry.
|
Package mcp wraps the Model Context Protocol Go SDK's streamable-HTTP server with a scope-checked tool registry. |
|
Package migrator runs goose migrations with schema, prefix and role templating.
|
Package migrator runs goose migrations with schema, prefix and role templating. |
|
Package nanoid produces URL-safe short public IDs.
|
Package nanoid produces URL-safe short public IDs. |
|
Package nats opens, drains and watches the one NATS connection the drivers share.
|
Package nats opens, drains and watches the one NATS connection the drivers share. |
|
oauthrs
module
|
|
|
oidcrp
module
|
|
|
Package password hashes and verifies passwords with Argon2id in PHC string format.
|
Package password hashes and verifies passwords with Argon2id in PHC string format. |
|
Package pg opens, health-checks and locks Postgres connections, and holds Postgres identifier helpers.
|
Package pg opens, health-checks and locks Postgres connections, and holds Postgres identifier helpers. |
|
Package redis opens and watches the one Redis connection the drivers share.
|
Package redis opens and watches the one Redis connection the drivers share. |
|
Package reqid propagates a request identifier across a single call via context.
|
Package reqid propagates a request identifier across a single call via context. |
|
Package s3 opens and watches the one S3-compatible bucket (R2, Garage, AWS) the storage driver uses.
|
Package s3 opens and watches the one S3-compatible bucket (R2, Garage, AWS) the storage driver uses. |
|
Package scheduler runs registered Jobs on wall-clock or interval schedules inside one process.
|
Package scheduler runs registered Jobs on wall-clock or interval schedules inside one process. |
|
Package schema embeds the Othra migrations and wires them to migrator.
|
Package schema embeds the Othra migrations and wires them to migrator. |
|
entity
Package entity holds go-jet table bindings for the Othra schema.
|
Package entity holds go-jet table bindings for the Othra schema. |
|
Package scope is the single catalog of API scopes, read from scopes.json, which the console shares verbatim.
|
Package scope is the single catalog of API scopes, read from scopes.json, which the console shares verbatim. |
|
Package sealer seals secrets at rest with AES-256-GCM bound to caller-supplied additional data.
|
Package sealer seals secrets at rest with AES-256-GCM bound to caller-supplied additional data. |
|
Package slug generates URL-safe default slugs.
|
Package slug generates URL-safe default slugs. |
|
Package telemetry wires OTel tracer + meter providers and the Prometheus endpoint.
|
Package telemetry wires OTel tracer + meter providers and the Prometheus endpoint. |
|
Package version exposes build metadata stamped at link time via -ldflags.
|
Package version exposes build metadata stamped at link time via -ldflags. |
|
Package worker supervises long-running loops (HTTP servers, background clients) under one errgroup.
|
Package worker supervises long-running loops (HTTP servers, background clients) under one errgroup. |
Click to show internal directories.
Click to hide internal directories.