Documentation
¶
Overview ¶
Package admin is the shell: the pages a person sees, as opposed to the routes a program calls.
It writes almost no screens. ARCHITECTURE.md's eighth idea is that list, detail and form come from an entity's schema, and kit/httpx now carries that schema for every resource kit/rest mounted — so this module asks the API what exists and generates seven pages for each answer. What is written by hand is the frame around them, the dashboard, the health page, the sign-in page and the gallery: five screens for the whole application, and a sixth arrives only when an interaction cannot be derived.
It is composed last, and that is load-bearing rather than tidy: kit/app calls each module's Routes in composition order, so a module mounted after this one registers a resource whose screens were already generated — which is to say, were not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Module ¶
Module is the manifest.
It declares no permissions and no events: every page is guarded by a permission the module that owns the data defined, which is the point — a screen that could be reached by somebody the API would refuse is a screen that leaks. It declares no nav entry either, because the shell is not a destination.
Types ¶
type Deps ¶
type Deps struct {
// Modules is the composition, for navigation. The shell draws the sidebar
// from every module's Nav, so it needs the list main built; a copy
// maintained here would be a second answer to "what is in this
// application", and the one that goes stale.
Modules []module.Module
// Authorize is the same value the kernel enforces with. The sidebar shows a
// link only when the caller may follow it, and asking the authorizer is
// what makes that the same answer the route would give — a nav filter with
// rules of its own is a menu that lies in one direction or the other.
Authorize httpx.Authorizer
// Tenants is the control plane, for the switcher. It is the one cross-tenant
// read in this module, and it needs the token Routes is handed.
Tenants tenantcontracts.Service
// Theme is the installation's two palettes. The zero value is the palette
// this repository ships; a client with its own colours sets this and
// changes nothing else, because every rule above the tokens is written in
// terms of a role. See design.Pair.
Theme design.Pair
}
Deps is what the shell cannot make for itself.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package internal is the shell's implementation: the frame, the pages written by hand, and the screens generated from every resource kit/rest registered.
|
Package internal is the shell's implementation: the frame, the pages written by hand, and the screens generated from every resource kit/rest registered. |