Directories
¶
| Path | Synopsis |
|---|---|
|
Package api embeds backd's HTTP API contract, which per-realm documents are derived from.
|
Package api embeds backd's HTTP API contract, which per-realm documents are derived from. |
|
clients
|
|
|
go-examples/shelf
command
Command shelf is the Go client against the Shelf tutorial stack (docs: Tutorial): it signs in, lists the published assets, saves a note and follows the assets live for a little while.
|
Command shelf is the Go client against the Shelf tutorial stack (docs: Tutorial): it signs in, lists the published assets, saves a note and follows the assets live for a little while. |
|
js
Package jsclient embeds the JavaScript client's sources, so the functions runner can give each function a real client as ctx.db.
|
Package jsclient embeds the JavaScript client's sources, so the functions runner can give each function a real client as ctx.db. |
|
cmd
|
|
|
backd
command
Command backd is backd's command line, for developers and administrators: the project tools (templates, checks, types) and a running backd's admin API.
|
Command backd is backd's command line, for developers and administrators: the project tools (templates, checks, types) and a running backd's admin API. |
|
backd-server
command
Command backd-server runs backd's server roles (serve, worker, executor, egress, provision) and the tools that work on MongoDB or run Deno directly.
|
Command backd-server runs backd's server roles (serve, worker, executor, egress, provision) and the tools that work on MongoDB or run Deno directly. |
|
internal
|
|
|
adminclient
Package adminclient is the /_admin/...
|
Package adminclient is the /_admin/... |
|
adminui
Package adminui serves the admin web interface under /_ui/.
|
Package adminui serves the admin web interface under /_ui/. |
|
apiheaders
Package apiheaders names the HTTP headers that both the server and the CLI read, so the CLI doesn't need the server's packages for them.
|
Package apiheaders names the HTTP headers that both the server and the CLI read, so the CLI doesn't need the server's packages for them. |
|
appconfig
Package appconfig keeps a realm's app configuration: the values admins and functions set over the declared defaults, with optimistic concurrency, an audited history and rollback.
|
Package appconfig keeps a realm's app configuration: the values admins and functions set over the declared defaults, with optimistic concurrency, an audited history and rollback. |
|
auth
Package auth holds backd's identity model: users, their sign-in identities and password handling.
|
Package auth holds backd's identity model: users, their sign-in identities and password handling. |
|
auth/authtest
Package authtest provides an in-memory auth.Store for tests.
|
Package authtest provides an in-memory auth.Store for tests. |
|
authcore
Package authcore holds the parts of backd's authentication that need no store: API key scopes, the secrets cipher, field key encoding, and the portable form of authentication data in export packages.
|
Package authcore holds the parts of backd's authentication that need no store: API key scopes, the secrets cipher, field key encoding, and the portable form of authentication data in export packages. |
|
buildinfo
Package buildinfo is the version backd was built as, the same for both binaries.
|
Package buildinfo is the version backd was built as, the same for both binaries. |
|
changefeed
Package changefeed reads a database's change history for the two features built on it: triggers (a dispatcher with a durable position) and realtime (consumers that open when a client subscribes).
|
Package changefeed reads a database's change history for the two features built on it: triggers (a dispatcher with a durable position) and realtime (consumers that open when a client subscribes). |
|
cli
Package cli is backd's command tree: every command, run in-process by Run so tests drive it like the binary.
|
Package cli is backd's command tree: every command, run in-process by Run so tests drive it like the binary. |
|
cmdtest
Package cmdtest has what the tests of the command line and the server share: CONFIG_DIR trees, built function manifests, and terminal input and output.
|
Package cmdtest has what the tests of the command line and the server share: CONFIG_DIR trees, built function manifests, and terminal input and output. |
|
cmdutil
Package cmdutil holds the helpers backd's command trees share: flag definitions and reads, the wrapper every command runs in, exit codes, the user's terminal and JSON output.
|
Package cmdutil holds the helpers backd's command trees share: flag definitions and reads, the wrapper every command runs in, exit codes, the user's terminal and JSON output. |
|
cron
Package cron parses five-field cron expressions and computes their schedule, in UTC or in a time zone.
|
Package cron parses five-field cron expressions and computes their schedule, in UTC or in a time zone. |
|
dbnames
Package dbnames names the MongoDB databases and collections backd keeps for itself, for the tools that list them without connecting (`backd databases`, for least-privilege grants).
|
Package dbnames names the MongoDB databases and collections backd keeps for itself, for the tools that list them without connecting (`backd databases`, for least-privilege grants). |
|
devreport
Package devreport is what dev mode (BACKD_DEV) says when a config doesn't load: the problems it holds, each with where it is, the tool's output and what to do, for the log and for the dev landing page and API answers.
|
Package devreport is what dev mode (BACKD_DEV) says when a config doesn't load: the problems it holds, each with where it is, the tool's output and what to do, for the log and for the dev landing page and API answers. |
|
docutil
Package docutil has the small operations on JSON-shaped documents (nested map[string]any and []any) that several packages need: copying, merge patches and dot paths.
|
Package docutil has the small operations on JSON-shaped documents (nested map[string]any and []any) that several packages need: copying, merge patches and dot paths. |
|
egress
Package egress runs backd's egress role: the only way a function process reaches the network.
|
Package egress runs backd's egress role: the only way a function process reaches the network. |
|
email
Package email holds what backd knows about the emails it asks a realm's delivery function to send: the kinds, the templates (loaded from <realm>/_realm/email/ into memory at startup and rendered per message), and the shape of the message handed to the function.
|
Package email holds what backd knows about the emails it asks a realm's delivery function to send: the kinds, the templates (loaded from <realm>/_realm/email/ into memory at startup and rendered per message), and the shape of the message handed to the function. |
|
executor
Package executor runs server-side functions: `backd-server executor` is a supervisor that runs each invocation in its own Deno process, with only the function's permissions and limits, and returns its output.
|
Package executor runs server-side functions: `backd-server executor` is a supervisor that runs each invocation in its own Deno process, with only the function's permissions and limits, and returns its output. |
|
exportpkg
Package exportpkg is the format of an export package: a directory (or archive) with a manifest, one JSON Lines file per collection in the API representation, the files the documents reference and the wrapped keys of encrypted fields.
|
Package exportpkg is the format of an export package: a directory (or archive) with a manifest, one JSON Lines file per collection in the API representation, the files the documents reference and the wrapped keys of encrypted fields. |
|
exportreadme
Package exportreadme renders the README.html of a personal data export from a logic-less template: the realm's own (_realm/compliance/readme/<locale>.html) or the built-in one of its language.
|
Package exportreadme renders the README.html of a personal data export from a logic-less template: the realm's own (_realm/compliance/readme/<locale>.html) or the built-in one of its language. |
|
fieldcrypt
Package fieldcrypt encrypts the fields a collection marks `encrypt` before they reach the database, and decrypts them for readers (design/field-encryption.md §4 and §5).
|
Package fieldcrypt encrypts the fields a collection marks `encrypt` before they reach the database, and decrypts them for readers (design/field-encryption.md §4 and §5). |
|
functions
Package functions builds server-side functions: `backd-server functions build` bundles each function of a database's Deno project into one file with `deno bundle`, and records the bundles in a manifest that startup checks.
|
Package functions builds server-side functions: `backd-server functions build` bundles each function of a database's Deno project into one file with `deno bundle`, and records the bundles in a manifest that startup checks. |
|
httpapi
Package httpapi is backd's HTTP layer: routing, middleware, error envelope, the generic document handlers and the /_auth endpoints.
|
Package httpapi is backd's HTTP layer: routing, middleware, error envelope, the generic document handlers and the /_auth endpoints. |
|
imaging
Package imaging turns one image into resized copies, safely: pure Go (no cgo, no external library), the pixel count checked from the header before anything is decoded, the orientation flag applied, a time limit per image, and output that never carries metadata.
|
Package imaging turns one image into resized copies, safely: pure Go (no cgo, no external library), the pixel count checked from the header before anything is decoded, the orientation flag applied, a time limit per image, and output that never carries metadata. |
|
jsonnum
Package jsonnum converts json.Number values into concrete Go numbers.
|
Package jsonnum converts json.Number values into concrete Go numbers. |
|
metrics
Package metrics is backd's Prometheus instrumentation (design/metrics.md).
|
Package metrics is backd's Prometheus instrumentation (design/metrics.md). |
|
mongodb
Package mongodb holds everything MongoDB-specific: the $jsonSchema validator translation, the repository implementation and the provisioner.
|
Package mongodb holds everything MongoDB-specific: the $jsonSchema validator translation, the repository implementation and the provisioner. |
|
oauth
Package oauth talks to external identity providers (Google, Microsoft, Apple): the authorize URL, the code exchange, the verification of ID tokens and Apple's client secret.
|
Package oauth talks to external identity providers (Google, Microsoft, Apple): the authorize URL, the code exchange, the verification of ID tokens and Apple's client secret. |
|
oauth/oauthtest
Package oauthtest is a small identity provider for tests: it signs ID tokens with its own key, publishes them, and plays the parts of a provider's authorize, token and keys endpoints, so the sign-in flow can be run end to end without a real one.
|
Package oauthtest is a small identity provider for tests: it signs ID tokens with its own key, publishes them, and plays the parts of a provider's authorize, token and keys endpoints, so the sign-in flow can be run end to end without a real one. |
|
openapigen
Package openapigen derives an OpenAPI 3.1 document for one realm from the generic contract (api/openapi.yaml) and the realm's loaded config: its collections with their schemas and features, its enabled authentication methods, its functions, and what its clients can reach.
|
Package openapigen derives an OpenAPI 3.1 document for one realm from the generic contract (api/openapi.yaml) and the realm's loaded config: its collections with their schemas and features, its enabled authentication methods, its functions, and what its clients can reach. |
|
push
Package push holds what backd knows about push notification messages that doesn't depend on the realm's settings or its store: the templates they are written from, the portable message and its validation, and the payloads each provider receives (design: design/push-notifications.md §6).
|
Package push holds what backd knows about push notification messages that doesn't depend on the realm's settings or its store: the templates they are written from, the portable message and its validation, and the payloads each provider receives (design: design/push-notifications.md §6). |
|
pushsend
Package pushsend holds backd's built-in push senders: FCM (HTTP v1), APNs (HTTP/2, token authentication) and Web Push (VAPID, RFC 8291).
|
Package pushsend holds backd's built-in push senders: FCM (HTTP v1), APNs (HTTP/2, token authentication) and Web Push (VAPID, RFC 8291). |
|
query
Package query parses and checks the list query language (where, order_by) against a collection's schema, producing backend-neutral storage conditions.
|
Package query parses and checks the list query language (where, order_by) against a collection's schema, producing backend-neutral storage conditions. |
|
realtime
Package realtime serves subscriptions to document changes as server-sent events (design/triggers-and-realtime.md §17 and §20).
|
Package realtime serves subscriptions to document changes as server-sent events (design/triggers-and-realtime.md §17 and §20). |
|
registry
Package registry loads the realm/database/collection tree from CONFIG_DIR into an immutable, validated registry used by routing, validation and provisioning.
|
Package registry loads the realm/database/collection tree from CONFIG_DIR into an immutable, validated registry used by routing, validation and provisioning. |
|
rules
Package rules checks and compiles a collection's rules (the `rules:` section of its collection.yaml): expr-lang expressions deciding, per operation, whether a caller may act on a whole document.
|
Package rules checks and compiles a collection's rules (the `rules:` section of its collection.yaml): expr-lang expressions deciding, per operation, whether a caller may act on a whole document. |
|
rulestest
Package rulestest runs the fixtures of `backd rules test`: it decides who may read, create, update and delete which documents of a collection, with the collection's real rules (the `rules:` of its collection.yaml) and schema.json and no database, and compares the decisions with what the fixture expects.
|
Package rulestest runs the fixtures of `backd rules test`: it decides who may read, create, update and delete which documents of a collection, with the collection's real rules (the `rules:` of its collection.yaml) and schema.json and no database, and compares the decisions with what the fixture expects. |
|
server
Package server runs backd's server roles (API, worker, provisioning, the executor and egress bootstrap): settings, config loading and startup checks, the MongoDB client, and the dev-mode reloader.
|
Package server runs backd's server roles (API, worker, provisioning, the executor and egress bootstrap): settings, config loading and startup checks, the MongoDB client, and the dev-mode reloader. |
|
settings
Package settings reads backd's runtime configuration from environment variables.
|
Package settings reads backd's runtime configuration from environment variables. |
|
settings/limits
Package limits reads the instance limits that also decide whether a config is valid (image pixels, reference expansion, aggregation, trigger chains) from the environment.
|
Package limits reads the instance limits that also decide whether a config is valid (image pixels, reference expansion, aggregation, trigger chains) from the environment. |
|
storage
Package storage defines the backend-neutral data access contract.
|
Package storage defines the backend-neutral data access contract. |
|
storage/storagetest
Package storagetest is a small in-memory S3 server for tests that need an object storage but not a real one: path-style addressing, the operations backd uses (bucket HEAD, PUT, GET with Range, HEAD, DELETE, ListObjectsV2) and the signed SHA-256 check a PUT carries.
|
Package storagetest is a small in-memory S3 server for tests that need an object storage but not a real one: path-style addressing, the operations backd uses (bucket HEAD, PUT, GET with Range, HEAD, DELETE, ListObjectsV2) and the signed SHA-256 check a PUT carries. |
|
strutil
Package strutil has small string helpers shared by packages that must not import each other.
|
Package strutil has small string helpers shared by packages that must not import each other. |
|
templates
Package templates writes commented starter files for realms and databases into CONFIG_DIR (`backd template`).
|
Package templates writes commented starter files for realms and databases into CONFIG_DIR (`backd template`). |
|
triggers
Package triggers dispatches the changes of a database to the functions collections declare (design/triggers-and-realtime.md §9): one dispatcher per deployment holds a lease, reads the change stream from a durable position, evaluates each trigger's condition and queues one async job per match.
|
Package triggers dispatches the changes of a database to the functions collections declare (design/triggers-and-realtime.md §9): one dispatcher per deployment holds a lease, reads the change stream from a durable position, evaluates each trigger's condition and queues one async job per match. |
|
typegen
Package typegen turns a realm's loaded config into TypeScript types: documents, queries, functions, configuration, templates and roles.
|
Package typegen turns a realm's loaded config into TypeScript types: documents, queries, functions, configuration, templates and roles. |
|
pkg
|
|
|
client
Package client is the Go client for backd: one entry point per realm, with the sign-in surface, collections that speak the query language, files, functions and their jobs, organizations, push devices, the app configuration and live views, the way backd-js and the Dart client do.
|
Package client is the Go client for backd: one entry point per realm, with the sign-in surface, collections that speak the query language, files, functions and their jobs, organizations, push devices, the app configuration and live views, the way backd-js and the Dart client do. |
Click to show internal directories.
Click to hide internal directories.