Documentation
¶
Overview ¶
Package admin is the Admin API: its routes, administrator authentication and sessions, the Host, Origin and CSRF checks, the sign-in throttle, password hashing, the status, history, monitoring and security log reads, and the handlers that ask the controller for changes.
It changes state only through the controller's exported operations and reads the database only through store.Reads, so it can never write SQLite or publish a policy itself; a test fails if it names the store's database type or a function that opens one. It owns no listener: the controller serves its Handler on the loopback admin address. The gateway wiring builds it with New.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VersionText ¶
func VersionText() string
VersionText is the version command's output for the running binary.
Types ¶
type Deps ¶
type Deps struct {
Control *controller.Controller
Limiter *pipeline.Limiter
UI http.Handler
Plain bool
Logger *slog.Logger
JWKS []byte
}
Deps is what the Admin API serves: an opened controller, the data plane's rate counters (for the limits view), the dashboard files (nil: none) and the logger. Plain is true when the gateway serves the data plane itself over plain HTTP, so HSTS is never sent; false when a host program owns it. JWKS is the public key set of the identity assertion (nil: none signed).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the Admin API: routing, authentication, the Host, Origin and CSRF checks, the login throttle, password hashing and every handler. It changes state only through the controller's exported operations and reads the database only through store.Reads.