Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DisabledErrorFactory ¶
DisabledErrorFactory builds feature-disabled errors for modules.
type FeatureGates ¶
type FeatureGates = fggate.FeatureGate
FeatureGates evaluates feature enablement.
type LoadOptions ¶
type LoadOptions struct {
Modules []Module
Gates FeatureGates
DefaultLocale string
Translator Translator
DisabledError DisabledErrorFactory
Register RegisterFunc
AddMenuItems MenuItemsFunc
RegisterDefaults func() error
}
LoadOptions configures module loading.
type Manifest ¶
type Manifest struct {
ID string
NameKey string
DescriptionKey string
Dependencies []string
FeatureFlags []string
}
Manifest captures identifying metadata and dependencies for a module.
type MenuContributor ¶
type MenuContributor interface {
MenuItems(locale string) []navinternal.MenuItem
}
MenuContributor optionally lets a module contribute navigation items.
type MenuItemsFunc ¶
type MenuItemsFunc func(ctx context.Context, items []navinternal.MenuItem) error
MenuItemsFunc forwards contributed menu items to the host.
type Module ¶
type Module interface {
Manifest() Manifest
}
Module exposes manifest metadata used for ordering and validation.
type RegisterFunc ¶
RegisterFunc executes module registration using host-provided context.
type Translator ¶
type Translator = helpers.Translator
Translator resolves i18n keys into localized strings.
type TranslatorAware ¶
type TranslatorAware interface {
WithTranslator(Translator)
}
TranslatorAware receives a translator before registration.
Click to show internal directories.
Click to hide internal directories.