Documentation
¶
Overview ¶
Package admin serves the admin API under /admin: sign-in with local accounts, cookie sessions with CSRF tokens, the GraphQL endpoint, and the configuration MCP endpoint at /admin/mcp for administrators' tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Store revision.Store
Accounts accounts.Store
// Catalog keeps what schema scans found; in memory when nil.
Catalog catalog.Store
// Plans keeps plan templates and MCP tokens; nil refuses them.
Plans configapp.PlanStore
Introspect configapp.Introspection
// Bus runs the scans and the console's event feed; optional (unbounded
// without one).
Bus *bus.Bus
// Status reports the serving process to the console; optional.
Status func() graph.RuntimeState
// Capabilities reports what the serving connections may do; optional.
Capabilities func() bootstrap.EntityCapabilities
// PathPrefix is the path a gateway serves the service under and strips
// from requests (server.pathPrefix); pages, the cookie and redirects
// carry it.
PathPrefix string
// SecureCookie marks the session cookie Secure; set it when serving TLS.
SecureCookie bool
// Playground mounts GraphiQL at /admin/playground and enables GraphQL
// schema introspection. It is a development aid.
Playground bool
Now func() time.Time
}
Config wires the admin API.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package accounts holds the business rules for administrator accounts.
|
Package accounts holds the business rules for administrator accounts. |
|
Package auth holds what the admin HTTP layer and the GraphQL resolvers share: argon2id password hashing, admin permissions and the signed-in principal on a request context.
|
Package auth holds what the admin HTTP layer and the GraphQL resolvers share: argon2id password hashing, admin permissions and the signed-in principal on a request context. |
|
Package configapp is the configuration service of the admin plane: the scanned catalog, schema scans and scan batches, plans and their previews, plan templates, pending work and administrators' MCP tokens.
|
Package configapp is the configuration service of the admin plane: the scanned catalog, schema scans and scan batches, plans and their previews, plan templates, pending work and administrators' MCP tokens. |
|
Package configmcp serves the configuration MCP endpoint at /admin/mcp: an agent, signed in with one of an administrator's tokens, acts for the administrator: it searches the scanned catalog, scans schemas, previews plans against the administrator's workspace and writes them into it (the one copy the administrator edits in the console, so they see the changes as if made there), and diffs and simulates configurations.
|
Package configmcp serves the configuration MCP endpoint at /admin/mcp: an agent, signed in with one of an administrator's tokens, acts for the administrator: it searches the scanned catalog, scans schemas, previews plans against the administrator's workspace and writes them into it (the one copy the administrator edits in the console, so they see the changes as if made there), and diffs and simulates configurations. |
|
Package graph implements the admin GraphQL API.
|
Package graph implements the admin GraphQL API. |
|
Package scanjobs runs long administrative work, such as schema scans, on the Scan lane of the execution bus, off the request path: a request starts a job and polls it, so a slow database ties up neither the request nor the service.
|
Package scanjobs runs long administrative work, such as schema scans, on the Scan lane of the execution bus, off the request path: a request starts a job and polls it, so a slow database ties up neither the request nor the service. |
|
Package ui embeds the built admin console (web/admin).
|
Package ui embeds the built admin console (web/admin). |
Click to show internal directories.
Click to hide internal directories.