Versions in this module Expand all Collapse all v1 v1.0.0 Oct 11, 2026 Changes in this version + var ErrCircularDependency = errors.New("kernel: circular module dependency") + var ErrDuplicateModule = errors.New("kernel: duplicate module") + var ErrInvalidPrincipalID = errors.New("kernel: invalid principal ID") + var ErrMissingDependency = errors.New("kernel: missing module dependency") + var ErrNilKernel = errors.New("kernel: host cannot be nil") + var ErrNilModule = errors.New("kernel: module cannot be nil") + func Capabilities[T any](r *Registry) []T + func ContextWithPrincipal(ctx context.Context, principal Principal) context.Context + type AdminExtensionManifest struct + EditorExtensions []string + MenuEntries []AdminMenuEntry + SettingsSections []string + func (m AdminExtensionManifest) Validate() error + type AdminExtensionProvider interface + AdminManifest func() AdminExtensionManifest + type AdminMenuEntry struct + Icon string + Label string + Path string + type CapabilityResolver func(principal Principal, capability string) bool + type ContentTypeProvider interface + PostTypes func() []PostTypeDef + type DroppedModule struct + Cause string + Direct bool + Name string + type Host struct + func NewHost(logger Logger) *Host + func (h *Host) Logger() Logger + func (h *Host) Registry() *Registry + type Kernel interface + Logger func() Logger + Registry func() *Registry + type Logger interface + Error func(format string, args ...any) + Info func(format string, args ...any) + type Migrator interface + Migrations func() fs.FS + type Module interface + Init func(kernel Kernel) error + Name func() string + Optional func() []string + Requires func() []string + Shutdown func() error + Version func() string + type PostTypeDef struct + Name string + Protected bool + Slug string + type Principal struct + ID string + Roles []string + Username string + func PrincipalFromContext(ctx context.Context) (principal Principal, ok bool) + func (p Principal) HasRole(role string) bool + func (p Principal) IsAnonymous() bool + type PruneResult struct + Dropped []DroppedModule + Kept []Module + func Prune(candidates []Module, disabled []string) PruneResult + type PublicRouteProvider interface + RegisterPublicRoutes func(router chi.Router) + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Get(name string) (Module, bool) + func (r *Registry) InitAll(kernel Kernel) error + func (r *Registry) InitOrder() []string + func (r *Registry) Initialized() bool + func (r *Registry) Names() []string + func (r *Registry) Register(module Module) error + func (r *Registry) ShutdownAll() error + type RoleProvider interface + Capabilities func() []string + type RouteProvider interface + RegisterRoutes func(router chi.Router) + type ThemeProvider interface + ThemeFiles func() fs.FS + ThemeFuncs func() template.FuncMap