Documentation
¶
Overview ¶
Package api mounts the REST surface. It owns route registration and the middleware chain (JSON errors, then x-api-key auth); the operations themselves live in api/v1, which declares each route and its OpenAPI entry from the same call so the published spec cannot drift from what is enforced.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
RegisterRoutes registers all API route handlers on the server.
Types ¶
type Deps ¶
type Deps struct {
Store repo.Store
Engine *deploy.Engine
Runtime *runtime.Runtime
Cluster *cluster.Cluster // one door for every docker call (docs/plans/35-cluster.md)
Proxy *proxy.Proxy
Jobs *jobs.Service
Backups *backup.Service
Forwards *forward.Registry
Notifier *notify.Notifier
// Applier drives config-as-code. Shared with the web router so the plan
// the canvas shows and the plan the API approves are the same object.
Applier stackconf.Applier
// Work is the durable job runner; applies are enqueued, not run inline.
Work *workqueue.Queue
// RegistrySigner mints managed-registry tokens; nil when it would not load.
RegistrySigner *registry.Signer
// Nodes takes the host metrics samples the node agents push.
Nodes *nodes.Service
// DataDir is where the panel keeps its copy of the agent runtime key,
// which is what the sample push is authenticated against.
DataDir string
// Version is the panel's build, reported by /api/health.
Version string
}
Deps holds the dependencies for API route registration.
Click to show internal directories.
Click to hide internal directories.