Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
trustgate
command
Command trustgate starts a server selected by argv[1] (default proxy): "admin", "proxy", "mcp", or "run" (admin + proxy together in one process).
|
Command trustgate starts a server selected by argv[1] (default proxy): "admin", "proxy", "mcp", or "run" (admin + proxy together in one process). |
|
Package docs Code generated by swaggo/swag.
|
Package docs Code generated by swaggo/swag. |
|
pkg
|
|
|
common/strutil
Package strutil holds small, dependency-free string helpers.
|
Package strutil holds small, dependency-free string helpers. |
|
config
Package config loads configuration from environment variables.
|
Package config loads configuration from environment variables. |
|
container
Package container wraps uber/dig with per-context modules.
|
Package container wraps uber/dig with per-context modules. |
|
domain/provider
Package provider is the single source of truth for the LLM provider names the gateway can route to.
|
Package provider is the single source of truth for the LLM provider names the gateway can route to. |
|
infra/cache/cachetest
Package cachetest provides cache test doubles shared across app-layer tests.
|
Package cachetest provides cache test doubles shared across app-layer tests. |
|
infra/cache/semantic
Package semantic provides a Redis Stack (RediSearch) vector store used by the semantic cache plugin to look up and persist responses by embedding similarity, scoped per rule via a hashed tag.
|
Package semantic provides a Redis Stack (RediSearch) vector store used by the semantic cache plugin to look up and persist responses by embedding similarity, scoped per rule via a hashed tag. |
|
infra/configsync/grpc
Package grpc implements the config-sync gRPC transport: the control-plane server, the data-plane client, the connection hub, and the auth interceptors and credentials that secure the channel.
|
Package grpc implements the config-sync gRPC transport: the control-plane server, the data-plane client, the connection hub, and the auth interceptors and credentials that secure the channel. |
|
infra/database/migrations
Package migrations registers in-code schema migrations via init().
|
Package migrations registers in-code schema migrations via init(). |
|
infra/metrics/playground
Package playground stores the metrics Event of playground proxy requests in Redis so the dashboard can fetch the trace by TraceID (the X-AG-Trace-Id echoed in the proxy response).
|
Package playground stores the metrics Event of playground proxy requests in Redis so the dashboard can fetch the trace by TraceID (the X-AG-Trace-Id echoed in the proxy response). |
|
infra/plugins/cors
Package cors implements a PreRequest CORS plugin that validates the request origin, applies CORS response headers, and short-circuits preflight requests.
|
Package cors implements a PreRequest CORS plugin that validates the request origin, applies CORS response headers, and short-circuits preflight requests. |
|
infra/plugins/llmcost
Package llmcost holds the model-pricing primitives shared by the LLM budget and cost cap plugins: glob matching of model slugs, price resolution, model downgrade, and the stateless cost cap decision engine.
|
Package llmcost holds the model-pricing primitives shared by the LLM budget and cost cap plugins: glob matching of model slugs, price resolution, model downgrade, and the stateless cost cap decision engine. |
|
infra/plugins/semanticcache
Package semanticcache implements a semantic response cache: on PreRequest it serves a cached response when a semantically similar request is found, and on PostResponse it stores successful upstream responses for future hits.
|
Package semanticcache implements a semantic response cache: on PreRequest it serves a cached response when a semantically similar request is found, and on PostResponse it stores successful upstream responses for future hits. |
|
infra/providers/openaicompat
Package openaicompat implements a provider client for arbitrary OpenAI-compatible Chat Completions endpoints (Together, Fireworks, vLLM, Ollama, self-hosted gateways, ...).
|
Package openaicompat implements a provider client for arbitrary OpenAI-compatible Chat Completions endpoints (Together, Fireworks, vLLM, Ollama, self-hosted gateways, ...). |
|
infra/repository/configsyncconn
Package configsyncconn provides the pgx-backed adapter over config_sync_connections: the write side the config-sync Hub calls best-effort to record data-plane stream lifecycle, and the read side the admin API lists.
|
Package configsyncconn provides the pgx-backed adapter over config_sync_connections: the write side the config-sync Hub calls best-effort to record data-plane stream lifecycle, and the read side the admin API lists. |
|
infra/repository/outbox
Package outbox provides the pgx-backed adapter for the config-snapshot change-marker outbox: an in-transaction appender the admin repositories share, plus the drain/prune reads the dispatcher runs.
|
Package outbox provides the pgx-backed adapter for the config-snapshot change-marker outbox: an in-transaction appender the admin repositories share, plus the drain/prune reads the dispatcher runs. |
|
server
Package server hosts the shared HTTP server lifecycle for admin and proxy.
|
Package server hosts the shared HTTP server lifecycle for admin and proxy. |
|
server/router
Package router declares the ServerRouter contract wired into BaseServer.
|
Package router declares the ServerRouter contract wired into BaseServer. |
|
version
Package version exposes build metadata injected via ldflags.
|
Package version exposes build metadata injected via ldflags. |
|
metrics
module
|
|
|
seed
|
|
|
mcp-catalog
Package mcpcatalog embeds the curated catalog of enterprise remote MCP servers so it ships inside the binary as the single source of truth for the MCP servers catalog endpoint.
|
Package mcpcatalog embeds the curated catalog of enterprise remote MCP servers so it ships inside the binary as the single source of truth for the MCP servers catalog endpoint. |
Click to show internal directories.
Click to hide internal directories.