Directories
¶
| Path | Synopsis |
|---|---|
|
Package ai defines provider-neutral types for the AI proxy (backyard.ai).
|
Package ai defines provider-neutral types for the AI proxy (backyard.ai). |
|
anthropic
Package anthropic implements ai.Provider for Claude using the official Anthropic Go SDK (github.com/anthropics/anthropic-sdk-go).
|
Package anthropic implements ai.Provider for Claude using the official Anthropic Go SDK (github.com/anthropics/anthropic-sdk-go). |
|
bedrock
Package bedrock implements ai.Provider for Amazon Bedrock using the AWS SDK for Go v2 (bedrockruntime).
|
Package bedrock implements ai.Provider for Amazon Bedrock using the AWS SDK for Go v2 (bedrockruntime). |
|
gemini
Package gemini implements ai.Provider for Google's Gemini models over raw HTTP, either through the Gemini API in Google AI Studio (api_key, https://generativelanguage.googleapis.com/v1beta) or through Vertex AI (project_id + location with Application Default Credentials; location "global" uses https://aiplatform.googleapis.com).
|
Package gemini implements ai.Provider for Google's Gemini models over raw HTTP, either through the Gemini API in Google AI Studio (api_key, https://generativelanguage.googleapis.com/v1beta) or through Vertex AI (project_id + location with Application Default Credentials; location "global" uses https://aiplatform.googleapis.com). |
|
internal/claudemodel
Package claudemodel encodes per-model request rules for Claude models that are shared by the anthropic provider (first-party, Vertex AI, Bedrock Mantle) and the bedrock provider (Converse API).
|
Package claudemodel encodes per-model request rules for Claude models that are shared by the anthropic provider (first-party, Vertex AI, Bedrock Mantle) and the bedrock provider (Converse API). |
|
internal/httpx
Package httpx holds HTTP helpers shared by the raw-HTTP AI providers (openai, gemini): JSON requests, bounded response decoding and conversion of upstream error bodies into *ai.UpstreamError.
|
Package httpx holds HTTP helpers shared by the raw-HTTP AI providers (openai, gemini): JSON requests, bounded response decoding and conversion of upstream error bodies into *ai.UpstreamError. |
|
internal/imagefetch
Package imagefetch downloads remote images referenced by URL in chat requests for providers that only accept inline bytes (Gemini, Bedrock, Claude on Vertex AI/Bedrock, Ollama and other self-hosted OpenAI-compatible servers).
|
Package imagefetch downloads remote images referenced by URL in chat requests for providers that only accept inline bytes (Gemini, Bedrock, Claude on Vertex AI/Bedrock, Ollama and other self-hosted OpenAI-compatible servers). |
|
internal/sse
Package sse is a small, allocation-conscious reader for the text/event-stream format (https://html.spec.whatwg.org/multipage/server-sent-events.html) as emitted by OpenAI-compatible and Gemini streaming endpoints.
|
Package sse is a small, allocation-conscious reader for the text/event-stream format (https://html.spec.whatwg.org/multipage/server-sent-events.html) as emitted by OpenAI-compatible and Gemini streaming endpoints. |
|
openai
Package openai implements ai.Provider for the OpenAI Chat Completions, Images and Embeddings APIs and for compatible servers: provider types "openai" (api.openai.com or any OpenAI-compatible base_url such as vLLM, LiteLLM, LM Studio or OpenRouter), "ollama" (OpenAI-compatible endpoint of a local Ollama) and "azure-openai" (Azure OpenAI / Azure AI Foundry, API key or Entra ID authentication).
|
Package openai implements ai.Provider for the OpenAI Chat Completions, Images and Embeddings APIs and for compatible servers: provider types "openai" (api.openai.com or any OpenAI-compatible base_url such as vLLM, LiteLLM, LM Studio or OpenRouter), "ollama" (OpenAI-compatible endpoint of a local Ollama) and "azure-openai" (Azure OpenAI / Azure AI Foundry, API key or Entra ID authentication). |
|
router
Package router maps client-facing model aliases to configured providers and implements ai.Service.
|
Package router maps client-facing model aliases to configured providers and implements ai.Service. |
|
Package app wires configuration into running components and serves them.
|
Package app wires configuration into running components and serves them. |
|
Package auth authenticates requests (SPEC §8): browser sessions via the built-in OIDC login (Okta, Entra ID, Google…), identity-aware proxies (Google IAP, AWS ALB OIDC, trusted headers), Backyard API tokens, static tokens and IdP-issued bearer JWTs (device flow).
|
Package auth authenticates requests (SPEC §8): browser sessions via the built-in OIDC login (Okta, Entra ID, Google…), identity-aware proxies (Google IAP, AWS ALB OIDC, trusted headers), Backyard API tokens, static tokens and IdP-issued bearer JWTs (device flow). |
|
Package blob defines the object storage abstraction that holds site files, metadata and user uploads.
|
Package blob defines the object storage abstraction that holds site files, metadata and user uploads. |
|
azure
Package azure implements blob.Store on Azure Blob Storage (and Azurite).
|
Package azure implements blob.Store on Azure Blob Storage (and Azurite). |
|
backends
Package backends constructs a blob.Store from configuration.
|
Package backends constructs a blob.Store from configuration. |
|
blobtest
Package blobtest is a conformance test-suite for blob.Store implementations.
|
Package blobtest is a conformance test-suite for blob.Store implementations. |
|
fs
Package fs implements blob.Store on a local directory tree.
|
Package fs implements blob.Store on a local directory tree. |
|
gcs
Package gcs implements blob.Store on Google Cloud Storage.
|
Package gcs implements blob.Store on Google Cloud Storage. |
|
internal/blobutil
Package blobutil holds helpers shared by the blob.Store implementations: key/prefix validation, content-type detection on streams, exact-size enforcement, chunked reading for multi-part uploads, synthetic ETags, presign TTL clamping and small concurrency utilities.
|
Package blobutil holds helpers shared by the blob.Store implementations: key/prefix validation, content-type detection on streams, exact-size enforcement, chunked reading for multi-part uploads, synthetic ETags, presign TTL clamping and small concurrency utilities. |
|
s3
Package s3 implements blob.Store on Amazon S3 and S3-compatible object stores (MinIO, Cloudflare R2, Ceph RGW, Backblaze B2, ...).
|
Package s3 implements blob.Store on Amazon S3 and S3-compatible object stores (MinIO, Cloudflare R2, Ceph RGW, Backblaze B2, ...). |
|
Package cli implements the `backyard` command line (SPEC §13): the server entry points (serve, gateway, dev), the developer workflow (init, deploy, login, sites, open, pull, token, skill), the MCP server for agents, and `backyard cloudflare setup|domain|access|status` for the Workers edition.
|
Package cli implements the `backyard` command line (SPEC §13): the server entry points (serve, gateway, dev), the developer workflow (init, deploy, login, sites, open, pull, token, skill), the MCP server for agents, and `backyard cloudflare setup|domain|access|status` for the Workers edition. |
|
clitest
Package clitest provides an in-memory fake of a Backyard server's client surface (the deploy gateway protocol of SPEC §7, the CLI login handoff of §8.3 and POST /__backyard/api/tokens) for testing the CLI and the MCP server without running the real server.
|
Package clitest provides an in-memory fake of a Backyard server's client surface (the deploy gateway protocol of SPEC §7, the CLI login handoff of §8.3 and POST /__backyard/api/tokens) for testing the CLI and the MCP server without running the real server. |
|
scaffold
Package scaffold writes the files of a new Backyard project (`backyard init` and the MCP tool backyard_init) and provides SafeJoin, the path guard used whenever the CLI writes files whose names come from elsewhere (templates, `backyard pull`).
|
Package scaffold writes the files of a new Backyard project (`backyard init` and the MCP tool backyard_init) and provides SafeJoin, the path guard used whenever the CLI writes files whose names come from elsewhere (templates, `backyard pull`). |
|
Package clientconfig manages the local state of the Backyard CLI and MCP server (SPEC §13): the per-user config file with named profiles ($XDG_CONFIG_HOME/backyard/config.json, mode 0600), environment overrides, the per-project .backyard.json file, gateway URL resolution, token expiry awareness and the OAuth device-flow helpers used to obtain and refresh IdP-issued tokens.
|
Package clientconfig manages the local state of the Backyard CLI and MCP server (SPEC §13): the per-user config file with named profiles ($XDG_CONFIG_HOME/backyard/config.json, mode 0600), environment overrides, the per-project .backyard.json file, gateway URL resolution, token expiry awareness and the OAuth device-flow helpers used to obtain and refresh IdP-issued tokens. |
|
Package config defines Backyard's configuration schema, loading (YAML with ${ENV} expansion), defaults and validation.
|
Package config defines Backyard's configuration schema, loading (YAML with ${ENV} expansion), defaults and validation. |
|
Package deploy implements the deploy gateway protocol (SPEC §7): the server side (Gateway, mountable inside the main server, as `backyard gateway`, or as an AWS Lambda function), the Go client used by the CLI and MCP server, and the local file collection/ignore rules shared by every deploy method.
|
Package deploy implements the deploy gateway protocol (SPEC §7): the server side (Gateway, mountable inside the main server, as `backyard gateway`, or as an AWS Lambda function), the Go client used by the CLI and MCP server, and the local file collection/ignore rules shared by every deploy method. |
|
Package docstore defines Backyard's schemaless JSON document database (backyard.db).
|
Package docstore defines Backyard's schemaless JSON document database (backyard.db). |
|
backends
Package backends constructs a docstore.Store from configuration.
|
Package backends constructs a docstore.Store from configuration. |
|
conformance
Package conformance is the shared semantic test-suite for docstore.Store implementations.
|
Package conformance is the shared semantic test-suite for docstore.Store implementations. |
|
dynamodb
Package dynamodb is the docstore.Store for Amazon DynamoDB (and DynamoDB Local / LocalStack for development).
|
Package dynamodb is the docstore.Store for Amazon DynamoDB (and DynamoDB Local / LocalStack for development). |
|
internal/dsutil
Package dsutil holds helpers shared by the docstore backends: argument validation, canonicalisation of document bodies and JSON encoding.
|
Package dsutil holds helpers shared by the docstore backends: argument validation, canonicalisation of document bodies and JSON encoding. |
|
memory
Package memory is an in-process docstore.Store backed by maps.
|
Package memory is an in-process docstore.Store backed by maps. |
|
postgres
Package postgres is the docstore.Store for PostgreSQL (Cloud SQL, RDS, Aurora, Azure Database for PostgreSQL Flexible Server, self-hosted…) using pgx/v5 and JSONB.
|
Package postgres is the docstore.Store for PostgreSQL (Cloud SQL, RDS, Aurora, Azure Database for PostgreSQL Flexible Server, self-hosted…) using pgx/v5 and JSONB. |
|
sqlite
Package sqlite is the embedded, single-node docstore.Store backed by SQLite (modernc.org/sqlite, pure Go, driver name "sqlite").
|
Package sqlite is the embedded, single-node docstore.Store backed by SQLite (modernc.org/sqlite, pure Go, driver name "sqlite"). |
|
Package identity defines the user profile shared by authentication, the identity API (backyard.id), presence and audit logging.
|
Package identity defines the user profile shared by authentication, the identity API (backyard.id), presence and audit logging. |
|
identitytest
Package identitytest holds integration tests that run the identity user cache against the real docstore backends (memory, SQLite and, when the BACKYARD_TEST_* services are available, PostgreSQL and DynamoDB Local).
|
Package identitytest holds integration tests that run the identity user cache against the real docstore backends (memory, SQLite and, when the BACKYARD_TEST_* services are available, PostgreSQL and DynamoDB Local). |
|
Package keys derives purpose-specific keys from server.secret so that a session key can never be used to forge an API token or an upload URL.
|
Package keys derives purpose-specific keys from server.secret so that a session key can never be used to forge an API token or an upload URL. |
|
Package mcpserver implements `backyard mcp`: a Model Context Protocol server (stdio) that lets coding agents read the Backyard docs, scaffold sites, deploy them and look at — or reuse code from — other sites, using the credentials of the current CLI profile (SPEC §14).
|
Package mcpserver implements `backyard mcp`: a Model Context Protocol server (stdio) that lets coding agents read the Backyard docs, scaffold sites, deploy them and look at — or reuse code from — other sites, using the credentials of the current CLI profile (SPEC §14). |
|
Package pubsub is the cross-instance message bus used by realtime to fan out database events, room messages and presence between server instances.
|
Package pubsub is the cross-instance message bus used by realtime to fan out database events, room messages and presence between server instances. |
|
backends
Package backends constructs a pubsub.Broker from configuration.
|
Package backends constructs a pubsub.Broker from configuration. |
|
internal/fanout
Package fanout is the local delivery engine shared by the pubsub brokers.
|
Package fanout is the local delivery engine shared by the pubsub brokers. |
|
memory
Package memory is the in-process pubsub.Broker used for single-instance deployments, development and tests.
|
Package memory is the in-process pubsub.Broker used for single-instance deployments, development and tests. |
|
postgres
Package postgres implements pubsub.Broker on PostgreSQL LISTEN/NOTIFY, so a horizontally scaled deployment that already uses Postgres for documents needs no extra infrastructure.
|
Package postgres implements pubsub.Broker on PostgreSQL LISTEN/NOTIFY, so a horizontally scaled deployment that already uses Postgres for documents needs no extra infrastructure. |
|
pubsubtest
Package pubsubtest is the conformance suite every pubsub.Broker implementation must pass.
|
Package pubsubtest is the conformance suite every pubsub.Broker implementation must pass. |
|
redis
Package redis implements pubsub.Broker on Redis (or Valkey, ElastiCache, Memorystore) PUBLISH/SUBSCRIBE.
|
Package redis implements pubsub.Broker on Redis (or Valkey, ElastiCache, Memorystore) PUBLISH/SUBSCRIBE. |
|
Package ratelimit implements Backyard's per-instance request limits (SPEC §11): token buckets per category and key, and a daily budget of AI tokens.
|
Package ratelimit implements Backyard's per-instance request limits (SPEC §11): token buckets per category and key, and a daily budget of AI tokens. |
|
Package realtime implements the per-site websocket hub described in docs/spec/SPEC.md §6: database change subscriptions, rooms with broadcast/direct messages and presence, fanned out across instances through a pubsub.Broker.
|
Package realtime implements the per-site websocket hub described in docs/spec/SPEC.md §6: database change subscriptions, rooms with broadcast/direct messages and presence, fanned out across instances through a pubsub.Broker. |
|
Package server is Backyard's HTTP layer (SPEC §2–§6): host/path routing, static site serving, the site API (identity, db, files, ai, warehouse, websocket), the hub (UI, docs, llms.txt, site list, tokens), the embedded deploy gateway mount, health checks, rate limiting and metrics.
|
Package server is Backyard's HTTP layer (SPEC §2–§6): host/path routing, static site serving, the site API (identity, db, files, ai, warehouse, websocket), the hub (UI, docs, llms.txt, site list, tokens), the embedded deploy gateway mount, health checks, rate limiting and metrics. |
|
servertest
Package servertest holds end-to-end tests that run the HTTP server against real components: the filesystem blob store, the SQLite (and, when BACKYARD_TEST_POSTGRES_DSN is set, PostgreSQL) document store, the realtime hub over in-memory (and, when BACKYARD_TEST_REDIS_URL is set, Redis) pub/sub, the auth package in mode "none" and the embedded deploy gateway.
|
Package servertest holds end-to-end tests that run the HTTP server against real components: the filesystem blob store, the SQLite (and, when BACKYARD_TEST_POSTGRES_DSN is set, PostgreSQL) document store, the realtime hub over in-memory (and, when BACKYARD_TEST_REDIS_URL is set, Redis) pub/sub, the auth package in mode "none" and the embedded deploy gateway. |
|
Package sites owns site naming, metadata and manifests stored in the blob store (SPEC §7.2, §9).
|
Package sites owns site naming, metadata and manifests stored in the blob store (SPEC §7.2, §9). |
|
sitestest
Package sitestest provides test helpers for code built on the sites registry and the deploy gateway: an in-memory blob.Store with optional presigned uploads served by an http.Handler.
|
Package sitestest provides test helpers for code built on the sites registry and the deploy gateway: an in-memory blob.Store with optional presigned uploads served by an http.Handler. |
|
Package version holds build information injected with -ldflags.
|
Package version holds build information injected with -ldflags. |
|
Package warehouse provides read-only analytics queries (backyard.warehouse) against BigQuery, Postgres-compatible databases (incl.
|
Package warehouse provides read-only analytics queries (backyard.warehouse) against BigQuery, Postgres-compatible databases (incl. |
|
athena
Package athena implements warehouse.Source for Amazon Athena (Trino SQL) with the AWS SDK for Go v2.
|
Package athena implements warehouse.Source for Amazon Athena (Trino SQL) with the AWS SDK for Go v2. |
|
bigquery
Package bigquery implements warehouse.Source for Google BigQuery (GoogleSQL) with cloud.google.com/go/bigquery.
|
Package bigquery implements warehouse.Source for Google BigQuery (GoogleSQL) with cloud.google.com/go/bigquery. |
|
internal/conv
Package conv holds JSON-friendly value conversions shared by the warehouse sources (sqlsource, bigquery, athena), so every engine renders numbers, decimals, bytes and timestamps the same way (SPEC §5.5).
|
Package conv holds JSON-friendly value conversions shared by the warehouse sources (sqlsource, bigquery, athena), so every engine renders numbers, decimals, bytes and timestamps the same way (SPEC §5.5). |
|
service
Package service implements warehouse.Service on top of the configured sources (SPEC §5.5).
|
Package service implements warehouse.Service on top of the configured sources (SPEC §5.5). |
|
sqlsource
Package sqlsource implements warehouse.Source for PostgreSQL and Postgres-compatible engines (Amazon Redshift, AlloyDB, Aurora, Neon, CockroachDB, …) on a pgx/v5 connection pool.
|
Package sqlsource implements warehouse.Source for PostgreSQL and Postgres-compatible engines (Amazon Redshift, AlloyDB, Aurora, Neon, CockroachDB, …) on a pgx/v5 connection pool. |
Click to show internal directories.
Click to hide internal directories.