Documentation
¶
Overview ¶
Package admin serves the admin API under /admin: sign-in with local accounts, cookie sessions with CSRF tokens, and the GraphQL endpoint.
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
Introspect graph.Introspection
// 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
// 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 graph implements the admin GraphQL API.
|
Package graph implements the admin GraphQL API. |
|
Package scanjobs runs long administrative work, such as schema scans, on a bounded pool of workers 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 a bounded pool of workers 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.