- Build-time discovery (D-028, the Caddy pattern): a module self-registers from init(); internal/modules/imports_gen.go (go:generate) blank-imports every module directory, so THE DIRECTORY IS THE SOURCE OF TRUTH - The registry: deterministic registration order, config-backed enable/disable (D-038), required modules, name-prefixed migrations, Mount() into the door - The name-collision guard now also fails a module named for a reserved level-1 workflow (SPEC-009 §13 Q-1) — access · static · api · media · ws · dev — derived from routing.ReservedWorkflows, `home` excepted (D-2) - home: the reference dashboard module, and the core Modules page
16 lines
582 B
Go
16 lines
582 B
Go
package home
|
|
|
|
import "git.lohmar.co.uk/cclohmar/NextMyDay/internal/core/module"
|
|
|
|
// Routes are the module's path-mode functions (SPEC-008 §4). The dashboard is
|
|
// the module DEFAULT: SPEC-002 §4.4 makes `home` a PARAM2 case at level 2, and
|
|
// with PARAM3 absent the module's default runs — so BOTH /{GUID} and
|
|
// /{GUID}/home reach it.
|
|
func (*Module) Routes() []module.Route {
|
|
return []module.Route{
|
|
{Function: "dashboard", Handler: dashboard, Default: true},
|
|
}
|
|
}
|
|
|
|
// Actions is empty: the dashboard has no mutations.
|
|
func (*Module) Actions() []module.Action { return nil }
|