Documentation
¶
Overview ¶
Package adminpanel is the official admin module: the admin SPA shell served at /admin plus the frozen admin API surface and the manifest endpoint aggregating every feature module's admin extensions.
Index ¶
- Constants
- type Module
- func (m *Module) AdminManifest() kernel.AdminExtensionManifest
- func (m *Module) Init(_ kernel.Kernel) error
- func (m *Module) Name() string
- func (m *Module) Optional() []string
- func (m *Module) Requires() []string
- func (m *Module) SPAHandler() *spa.Handler
- func (m *Module) Shutdown() error
- func (m *Module) Version() string
- type Option
Constants ¶
const Name = "adminpanel"
Name is the registry key for this module.
const Version = "0.1.0"
Version is the module version reported via Module.Version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is the adminpanel kernel module.
func New ¶
New builds the module, adopting the composition root's wiring. The SPA handler is built once here so every premise serves the same instance.
func (*Module) AdminManifest ¶
func (m *Module) AdminManifest() kernel.AdminExtensionManifest
AdminManifest declares this module's admin-shell extensions. The shell itself contributes no navigation: it renders what the other modules declare.
func (*Module) Init ¶
Init wires the module. The shell is static file serving plus the manifest aggregation, both attached in later slices; Init only validates presence.
func (*Module) Optional ¶
Optional lists soft dependencies. There are none: every feature module's admin extensions are discovered through the AdminExtensionProvider capability, never through a declared edge.
func (*Module) Requires ¶
Requires lists hard dependencies. The shell authenticates through the auth module, matching the retired wrapper edge.
func (*Module) SPAHandler ¶
SPAHandler exposes the admin SPA handler for core mounting. Core mounts it explicitly (rather than via RouteProvider) because the /admin premises share one mount point with the static server's nil-gated behavior, which a single RegisterRoutes call cannot express.
type Option ¶
type Option func(*Module)
Option configures a Module. The composition root supplies every option; direct construction without options yields a standalone module serving the embedded production build.
func WithAdminDevURL ¶
WithAdminDevURL sets the Vite dev server target used when dev mode is on.
func WithDevMode ¶
WithDevMode serves the admin SPA from the Vite dev server (reverse proxy) instead of the embedded production build.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for the shell itself.
|
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for the shell itself. |
|
Package spa serves the embedded admin single-page application: the production Vue build at rest plus the development-mode reverse proxy to the Vite server.
|
Package spa serves the embedded admin single-page application: the production Vue build at rest plus the development-mode reverse proxy to the Vite server. |
|
Package testutil provides the kernel fixture module tests run against.
|
Package testutil provides the kernel fixture module tests run against. |