Documentation
¶
Index ¶
- Constants
- Variables
- func AddDebugPanels(cfg *admin.Config, panels ...string)
- func ApplyAdapterIntegrations(adm *admin.Admin, result *AdapterResult, hooks AdapterHooks)
- func ApplyScopeConfig(cfg *admin.Config, scope ScopeConfig)
- func ApplyScopeDefaultsToMetadata(metadata map[string]any, cfg admin.Config) map[string]any
- func ApplySecureLinkManager(cfg *userssvc.Config, manager userstypes.SecureLinkManager, ...)
- func ApplySecureLinkManagerToAuth(target SecureLinkManagerSetter, manager userstypes.SecureLinkManager)
- func AttachDebugLogHandler(cfg admin.Config, adm *admin.Admin)
- func AttachDebugMiddleware[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin)
- func AttachGoAuthActivitySink(auther *auth.Auther, sink admin.ActivitySink, opts ...GoAuthActivitySinkOption)
- func AuthUIViewContext(cfg admin.Config, state AuthUIState, paths AuthUIPaths) router.ViewContext
- func BuildNavItems(adm *admin.Admin, cfg admin.Config, ctx context.Context, active string) []map[string]any
- func BuildNavItemsForPlacement(adm *admin.Admin, cfg admin.Config, placements PlacementConfig, ...) []map[string]any
- func BuildPanelDataGridConfig(opts PanelDataGridConfigOptions) map[string]any
- func BuildPanelExportConfig(cfg admin.Config, opts PanelViewCapabilityOptions) map[string]any
- func BuildPanelViewCapabilities(cfg admin.Config, opts PanelViewCapabilityOptions) router.ViewContext
- func ConfigureDebugPanels(cfg *admin.Config, deps DebugPanelDeps, catalog DebugPanelCatalog)
- func ConfigureExportRenderers(bundle *ExportBundle, templatesFS fs.FS, opts ...ExportTemplateOption) error
- func DashboardTemplatesFS() fs.FS
- func DebugWSAuthMiddleware(auther *auth.Auther, cfg admin.DebugConfig, config ...router.WSAuthConfig) router.WebSocketMiddleware
- func DefaultAdminFeatures() map[string]bool
- func DefaultContentParentPermissions() []string
- func DefaultContentTypePreviewFallback() admin.SchemaPreviewFallback
- func DefaultMenuParents(menuCode string) []admin.MenuItem
- func DefaultMinimalFeatures() map[string]bool
- func DefaultScopeFilter(cfg admin.Config) userstypes.ScopeFilter
- func DefaultSecureLinkRoutes(basePath string) map[string]string
- func DefaultTemplateFuncs(opts ...TemplateFuncOption) map[string]any
- func DefaultThemeTokens() map[string]string
- func EnsureDefaultMenuParents(ctx context.Context, menuSvc admin.CMSMenuService, menuCode, locale string) error
- func IconRendererFunc(renderer TemplateIconRenderer) func(ref string, variant string) string
- func MergeComponentDescriptors(base, override components.Descriptor) components.Descriptor
- func MergeTemplateFuncs(overrides map[string]any, opts ...TemplateFuncOption) map[string]any
- func NewActivityModule(opts ...ActivityModuleOption) *admin.ActivityModule
- func NewAdminConfig(basePath, title, defaultLocale string, opts ...AdminConfigOption) admin.Config
- func NewCompositeActivitySink(primary admin.ActivitySink, hooks dashboardactivity.Hooks, ...) admin.ActivitySink
- func NewContentTypeBuilderModule(cfg admin.Config, menuParent string, opts ...admin.ContentTypeBuilderOption) admin.Module
- func NewDashboardTemplateRenderer(opts ...DashboardRendererOption) (admin.DashboardRenderer, error)
- func NewDebugModule(cfg admin.DebugConfig, opts ...DebugModuleOption) *admin.DebugModule
- func NewFeatureFlagsModule(opts ...FeatureFlagsModuleOption) *admin.FeatureFlagsModule
- func NewFiberErrorHandler(adm *admin.Admin, cfg admin.Config, isDev bool, ...) fiber.ErrorHandler
- func NewFiberServer(viewEngine fiber.Views, cfg admin.Config, adm *admin.Admin, isDev bool, ...) (router.Server[*fiber.App], router.Router[*fiber.App])
- func NewFormGenerator(openapiFS fs.FS, templatesFS fs.FS, opts ...FormGeneratorOption) (*formgenorchestrator.Orchestrator, error)
- func NewGoAuthActivitySink(sink admin.ActivitySink, opts ...GoAuthActivitySinkOption) auth.ActivitySink
- func NewModuleRegistrar(adm *admin.Admin, cfg admin.Config, modules []admin.Module, isDev bool, ...) error
- func NewNotificationsSecureLinkManager(cfg SecureLinkConfig) (links.SecureLinkManager, error)
- func NewPreferencesModule(cfg admin.Config, menuParent string, opts ...PreferencesModuleOption) admin.Module
- func NewSecureLinkManager(cfg SecureLinkConfig) (userstypes.SecureLinkManager, error)
- func NewSecureLinkNotificationBuilder(manager links.SecureLinkManager, opts ...linknotifications.Option) links.LinkBuilder
- func NewStaticAssets[T any](r router.Router[T], cfg admin.Config, assetsFS fs.FS, ...)
- func NewThemeSelector(name, variant string, tokenOverrides map[string]string, opts ...ThemeOption) (theme.Selector, *theme.Manifest, error)
- func NewTranslationPolicy(cfg TranslationPolicyConfig, services TranslationPolicyServices) admin.TranslationPolicy
- func NewTranslationQueueAutoCreateHook(cfg TranslationQueueConfig) admin.TranslationQueueAutoCreateHook
- func NewUploadHandler(cfg UploadHandlerConfig) router.HandlerFunc
- func NewUsersModule(opts ...admin.UserManagementModuleOption) *admin.UserManagementModule
- func NewViewEngine(baseFS fs.FS, opts ...ViewEngineOption) (fiber.Views, error)
- func OAuthNeedsReauthorization(isExpired, isExpiringSoon, canAutoRefresh bool) bool
- func PathViewContext(cfg admin.Config, pathCfg PathViewContextConfig) router.ViewContext
- func RecommendedContentEntryDefaultRenderers() map[string]string
- func RegisterAdminPageRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterAdminUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterAuthUIRoutes[T any](r router.Router[T], cfg admin.Config, auther *auth.Auther, cookieName string, ...) error
- func RegisterContentEntryAliasRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterContentEntryUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterContentTypeBuilderAPIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterContentTypeBuilderUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterDebugPanelCatalog(cfg *admin.Config, deps DebugPanelDeps, catalog DebugPanelCatalog)
- func RegisterOnboardingRoutes[T any](r router.Router[T], cfg admin.Config, handlers OnboardingHandlers, ...) error
- func RegisterPreferencesPermissions(register PermissionRegisterFunc) error
- func RegisterRegistrationUIRoutes[T any](r router.Router[T], cfg admin.Config, opts ...RegistrationUIOption) error
- func RegisterRolesUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, opts ...RolesUIOption) error
- func RegisterScopeDebugPanel(buffer *ScopeDebugBuffer)
- func RegisterSettingsUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, ...) error
- func RegisterTranslationExchangePermissions(register PermissionRegisterFunc) error
- func RegisterTranslationExchangeWiring(adm *admin.Admin, cfg TranslationExchangeConfig) error
- func RegisterTranslationQueuePermissions(register PermissionRegisterFunc) error
- func RegisterTranslationQueueWiring(adm *admin.Admin, cfg TranslationQueueConfig, ...) error
- func RegisterUserMigrations(client *persistence.Client, opts ...UserMigrationsOption) error
- func RegisterUserRoleBulkRoutes(r admin.AdminRouter, cfg admin.Config, adm *admin.Admin) error
- func ResolveAdminAPIBasePath(urls urlkit.Resolver, cfg admin.Config, fallbackBase string) string
- func ResolveAdminAPIGroupName(cfg admin.Config) string
- func ResolveAdminBasePath(urls urlkit.Resolver, fallback string) string
- func ResolveAdminBaseURL(urls urlkit.Resolver, fallback string) string
- func ResolveAdminPanelAPICollectionPath(urls urlkit.Resolver, cfg admin.Config, fallbackBase, panel string) string
- func ResolveAdminPanelAPIDetailPath(urls urlkit.Resolver, cfg admin.Config, fallbackBase, panel, id string) string
- func ResolveAdminPanelDetailURL(urls urlkit.Resolver, fallback, panel, id string) string
- func ResolveAdminPanelEditURL(urls urlkit.Resolver, fallback, panel, id string) string
- func ResolveAdminPanelPreviewURL(urls urlkit.Resolver, fallback, panel, id string) string
- func ResolveAdminPanelURL(urls urlkit.Resolver, fallback, panel string) string
- func ResolveAdminRoutePath(urls urlkit.Resolver, fallback, route string) string
- func ResolveAdminURL(urls urlkit.Resolver, fallback, path string) string
- func ResolveDiskAssetsDir(marker string, candidates ...string) string
- func ResolveRequestIP(c RequestIPContext, opts RequestIPOptions) string
- func ScopeBuilder(cfg admin.Config) func(context.Context) userstypes.ScopeFilter
- func ScopeDebugHandler(buffer *ScopeDebugBuffer) router.HandlerFunc
- func ScopeDebugWrap(authn *admin.GoAuthAuthenticator, cfg *admin.Config, buffer *ScopeDebugBuffer) func(router.HandlerFunc) router.HandlerFunc
- func ScopeFromContext(ctx context.Context) userstypes.ScopeFilter
- func SeedLocalizedNavigation(ctx context.Context, opts SeedLocalizedNavigationOptions) error
- func SeedNavigation(ctx context.Context, opts SeedNavigationOptions) error
- func SeedWorkflowRuntimeFromConfig(ctx context.Context, runtime admin.WorkflowRuntime, cfg WorkflowConfig) error
- func ServeBinaryObject(c router.Context, cfg BinaryObjectResponseConfig) error
- func SidebarAssetsFS() fs.FS
- func SidebarTemplatesFS() fs.FS
- func TranslationCapabilities(adm *admin.Admin) map[string]any
- func TranslationCapabilitiesForContext(adm *admin.Admin, reqCtx context.Context) map[string]any
- func ValidateWorkflowConfig(cfg WorkflowConfig) error
- func WithAdminUIViewContext(ctx router.ViewContext, adm *admin.Admin, cfg admin.Config, active string, ...) router.ViewContext
- func WithAuthUIViewContext(ctx router.ViewContext, cfg admin.Config, state AuthUIState, paths AuthUIPaths) router.ViewContext
- func WithAuthUIViewThemeAssets(ctx router.ViewContext, assets map[string]string, assetPrefix string) router.ViewContext
- func WithDefaultDashboardRenderer(adm *admin.Admin, viewEngine fiber.Views, cfg admin.Config, ...) error
- func WithFallbackFS(primary fs.FS, fallbacks ...fs.FS) fs.FS
- func WithFeatureTemplateContext(ctx router.ViewContext, reqCtx context.Context, scope any, snapshot any) router.ViewContext
- func WithGoAuth(adm *admin.Admin, routeAuth *auth.RouteAuthenticator, cfg auth.Config, ...) (*admin.GoAuthAuthenticator, *admin.GoAuthAuthorizer)
- func WithNav(ctx router.ViewContext, adm *admin.Admin, cfg admin.Config, active string, ...) router.ViewContext
- func WithNavPlacements(ctx router.ViewContext, adm *admin.Admin, cfg admin.Config, ...) router.ViewContext
- func WithPathViewContext(ctx router.ViewContext, cfg admin.Config, pathCfg PathViewContextConfig) router.ViewContext
- func WithThemeContext(ctx router.ViewContext, adm *admin.Admin, req router.Context) router.ViewContext
- func WorkflowBindingsFromConfig(cfg WorkflowConfig) []admin.WorkflowBinding
- func WorkflowDefinitionsFromConfig(cfg WorkflowConfig) map[string]admin.WorkflowDefinition
- func WorkflowTraitDefaultsFromConfig(cfg WorkflowConfig) map[string]string
- type ActivityModuleOption
- type AdapterFlags
- type AdapterHooks
- type AdapterResult
- func ConfigureAdapters(ctx context.Context, cfg admin.Config, hooks AdapterHooks) (admin.Config, AdapterResult)
- func ConfigureAdaptersWithFlags(ctx context.Context, cfg admin.Config, hooks AdapterHooks, flags AdapterFlags) (admin.Config, AdapterResult)
- func NewAdmin(cfg admin.Config, hooks AdapterHooks, opts ...AdminOption) (*admin.Admin, AdapterResult, error)
- type AdminConfigOption
- func WithDebugConfig(debugCfg admin.DebugConfig) AdminConfigOption
- func WithDebugOptions(opt DebugOption) AdminConfigOption
- func WithDefaultScope(tenantID, orgID string) AdminConfigOption
- func WithErrorConfig(errorCfg admin.ErrorConfig) AdminConfigOption
- func WithErrorOptions(opt ErrorOption) AdminConfigOption
- func WithFeatureCatalogPath(path string) AdminConfigOption
- func WithNavDebug(enabled bool) AdminConfigOption
- func WithNavDebugLog(enabled bool) AdminConfigOption
- func WithNavMenuCode(code string) AdminConfigOption
- func WithScopeConfig(scope ScopeConfig) AdminConfigOption
- func WithScopeMode(mode ScopeMode) AdminConfigOption
- func WithTheme(name, variant string) AdminConfigOption
- func WithThemeAssetPrefix(prefix string) AdminConfigOption
- func WithThemeTokens(tokens map[string]string) AdminConfigOption
- type AdminOption
- func EnableFeature(feature admin.FeatureKey) AdminOption
- func EnablePreferences() AdminOption
- func WithAdapterFlags(flags AdapterFlags) AdminOption
- func WithAdminContext(ctx context.Context) AdminOption
- func WithAdminDependencies(deps admin.Dependencies) AdminOption
- func WithDoctorChecks(checks ...admin.DoctorCheck) AdminOption
- func WithFeatureDefaults(defaults map[string]bool) AdminOption
- func WithGoUsersPreferencesRepository(repo types.PreferenceRepository) AdminOption
- func WithGoUsersPreferencesRepositoryFactory(factory func() (types.PreferenceRepository, error)) AdminOption
- func WithGoUsersUserManagement(cfg GoUsersUserManagementConfig) AdminOption
- func WithStartupPolicy(policy StartupPolicy) AdminOption
- func WithThemeSelector(selector theme.ThemeSelector, manifest *theme.Manifest) AdminOption
- func WithTraitWorkflowDefaults(defaults map[string]string) AdminOption
- func WithTranslationExchangeConfig(cfg TranslationExchangeConfig) AdminOption
- func WithTranslationLocaleLabels(labels map[string]string) AdminOption
- func WithTranslationPolicyConfig(cfg TranslationPolicyConfig) AdminOption
- func WithTranslationPolicyServices(services TranslationPolicyServices) AdminOption
- func WithTranslationProductConfig(cfg TranslationProductConfig) AdminOption
- func WithTranslationProfile(profile TranslationProfile) AdminOption
- func WithTranslationQueueConfig(cfg TranslationQueueConfig) AdminOption
- func WithWorkflowConfig(cfg WorkflowConfig) AdminOption
- func WithWorkflowConfigFile(path string) AdminOption
- func WithWorkflowRuntime(runtime admin.WorkflowRuntime) AdminOption
- type AdminPageSpec
- type AsyncRequesterFactory
- type AuthUIOption
- func WithAuthUIBasePath(basePath string) AuthUIOption
- func WithAuthUICookie(cookie router.Cookie) AuthUIOption
- func WithAuthUIFeatureGate(gate fggate.FeatureGate) AuthUIOption
- func WithAuthUILoginPath(route string) AuthUIOption
- func WithAuthUILoginRedirect(route string) AuthUIOption
- func WithAuthUILogoutPath(route string) AuthUIOption
- func WithAuthUILogoutRedirect(route string) AuthUIOption
- func WithAuthUIPasswordResetConfirmPath(route string) AuthUIOption
- func WithAuthUIPasswordResetConfirmTemplate(name string) AuthUIOption
- func WithAuthUIPasswordResetConfirmTitle(title string) AuthUIOption
- func WithAuthUIPasswordResetEnabled(fn func(admin.Config) bool) AuthUIOption
- func WithAuthUIPasswordResetPath(route string) AuthUIOption
- func WithAuthUIRegisterPath(route string) AuthUIOption
- func WithAuthUISelfRegistrationEnabled(fn func(admin.Config) bool) AuthUIOption
- func WithAuthUITemplates(loginTemplate, passwordResetTemplate string) AuthUIOption
- func WithAuthUIThemeAssets(prefix string, assets map[string]string) AuthUIOption
- func WithAuthUITitles(loginTitle, passwordResetTitle string) AuthUIOption
- func WithAuthUIViewContextBuilder(builder AuthUIViewContextBuilder) AuthUIOption
- type AuthUIPaths
- type AuthUIState
- type AuthUIViewContextBuilder
- type BinaryObjectResponseConfig
- type BinaryObjectStore
- type ContentAliasRouteOption
- type ContentEntryUIOption
- func WithContentEntryDataGridStateStore(cfg PanelDataGridStateStoreOptions) ContentEntryUIOption
- func WithContentEntryDataGridURLState(cfg PanelDataGridURLStateOptions) ContentEntryUIOption
- func WithContentEntryDefaultRenderers(renderers map[string]string) ContentEntryUIOption
- func WithContentEntryFormRenderer(renderer *admin.FormgenSchemaValidator) ContentEntryUIOption
- func WithContentEntryMergeDefaultRenderers(renderers map[string]string) ContentEntryUIOption
- func WithContentEntryRecommendedDefaults() ContentEntryUIOption
- func WithContentEntryTranslationUX(enabled bool) ContentEntryUIOption
- func WithContentEntryUIAuthResource(resource string) ContentEntryUIOption
- func WithContentEntryUIBasePath(basePath string) ContentEntryUIOption
- func WithContentEntryUIPermission(permission string) ContentEntryUIOption
- func WithContentEntryUITemplateExists(checker func(name string) bool) ContentEntryUIOption
- func WithContentEntryUITemplateFS(fsys ...fs.FS) ContentEntryUIOption
- func WithContentEntryUITemplates(listTemplate, formTemplate, detailTemplate string) ContentEntryUIOption
- func WithContentEntryUIViewContext(builder UIViewContextBuilder) ContentEntryUIOption
- type ContentTypeBuilderAPIOption
- type ContentTypeBuilderUIOption
- func WithContentTypeBuilderUIAuthResource(resource string) ContentTypeBuilderUIOption
- func WithContentTypeBuilderUIBasePath(basePath string) ContentTypeBuilderUIOption
- func WithContentTypeBuilderUIPermission(permission string) ContentTypeBuilderUIOption
- func WithContentTypeBuilderUITemplates(contentTypes, blockDefinitions string) ContentTypeBuilderUIOption
- func WithContentTypeBuilderUIViewContext(builder UIViewContextBuilder) ContentTypeBuilderUIOption
- type DashboardRendererOption
- func WithDashboardEmbeddedTemplates(enabled bool) DashboardRendererOption
- func WithDashboardTemplateFuncOptions(options ...TemplateFuncOption) DashboardRendererOption
- func WithDashboardTemplateFuncs(funcs map[string]any) DashboardRendererOption
- func WithDashboardTemplatesFS(fsys fs.FS) DashboardRendererOption
- type DebugModuleOption
- type DebugOption
- type DebugPanelCatalog
- type DebugPanelDeps
- type DebugPanelRegistrar
- type ErrorOption
- type ExportBundle
- type ExportBundleOption
- func WithExportActorProvider(provider export.ActorProvider) ExportBundleOption
- func WithExportAsyncInProcess(timeout time.Duration) ExportBundleOption
- func WithExportAsyncRequester(factory AsyncRequesterFactory) ExportBundleOption
- func WithExportBasePath(path string) ExportBundleOption
- func WithExportDeliveryPolicy(policy export.DeliveryPolicy) ExportBundleOption
- func WithExportGuard(guard export.Guard) ExportBundleOption
- func WithExportHistoryPath(path string) ExportBundleOption
- func WithExportLogger(logger export.Logger) ExportBundleOption
- func WithExportMaxBufferBytes(maxBytes int64) ExportBundleOption
- func WithExportPathSuffix(suffix string) ExportBundleOption
- func WithExportQueryRequestDecoder(decoder exportapi.RequestDecoder) ExportBundleOption
- func WithExportRequestDecoder(decoder exportapi.RequestDecoder) ExportBundleOption
- func WithExportStore(store export.ArtifactStore) ExportBundleOption
- func WithExportTracker(tracker export.ProgressTracker) ExportBundleOption
- type ExportPDFConfig
- type ExportTemplateOption
- func WithExportPDFConfig(cfg ExportPDFConfig) ExportTemplateOption
- func WithExportPDFRenderer(builder func(exporttemplate.Renderer) (exportpdf.Renderer, error)) ExportTemplateOption
- func WithExportTemplateFuncs(funcs map[string]any) ExportTemplateOption
- func WithExportTemplateMaxRows(rows int) ExportTemplateOption
- func WithExportTemplateName(name string) ExportTemplateOption
- type FeatureFlagsModuleOption
- type FiberErrorHandlerOption
- type FiberRuntimeConfig
- type FiberServerOption
- func WithFiberAdapterConfig(mutator func(*router.FiberAdapterConfig)) FiberServerOption
- func WithFiberConfig(mutator func(*fiber.Config)) FiberServerOption
- func WithFiberErrorHandler(handler fiber.ErrorHandler) FiberServerOption
- func WithFiberLogger(enabled bool) FiberServerOption
- func WithFiberMiddleware(handlers ...fiber.Handler) FiberServerOption
- func WithFiberRuntimeConfig(runtime FiberRuntimeConfig) FiberServerOption
- type FormGeneratorOption
- type GoAuthActivitySinkOption
- type GoUsersPreferencesStore
- func (s *GoUsersPreferencesStore) Delete(ctx context.Context, input admin.PreferencesDeleteInput) error
- func (s *GoUsersPreferencesStore) Resolve(ctx context.Context, input admin.PreferencesResolveInput) (admin.PreferenceSnapshot, error)
- func (s *GoUsersPreferencesStore) Upsert(ctx context.Context, input admin.PreferencesUpsertInput) (admin.PreferenceSnapshot, error)
- type GoUsersUserManagementConfig
- type GoUsersUserManagementConfigError
- type LegacyLocalizedMenuMigrationOptions
- type LegacyLocalizedMenuMigrationReport
- type LocalizedMenuItemTranslation
- type LocalizedSeedMenuItem
- type ModuleRegistrarOption
- func WithDefaultSidebarUtilityItems(enabled bool) ModuleRegistrarOption
- func WithModuleFeatureDisabledHandler(handler func(feature, moduleID string) error) ModuleRegistrarOption
- func WithModuleFeatureGates(gates fggate.FeatureGate) ModuleRegistrarOption
- func WithModuleMenuItems(items ...admin.MenuItem) ModuleRegistrarOption
- func WithModuleRegistrarContext(ctx context.Context) ModuleRegistrarOption
- func WithSeedNavigation(enabled bool) ModuleRegistrarOption
- func WithSeedNavigationOptions(mutator func(*SeedNavigationOptions)) ModuleRegistrarOption
- func WithSidebarUtilityMenuCode(menuCode string) ModuleRegistrarOption
- func WithSidebarUtilityMenuItems(items ...admin.MenuItem) ModuleRegistrarOption
- func WithToolsMenuItems(items ...admin.MenuItem) ModuleRegistrarOption
- func WithTranslationCapabilityMenuMode(mode TranslationCapabilityMenuMode) ModuleRegistrarOption
- type MultiFS
- type OAuthTokenPolicyInput
- type OAuthTokenPolicyState
- type OnboardingHandlers
- type OnboardingRouteKey
- type OnboardingRouteOption
- func WithOnboardingAuth(auth admin.HandlerAuthenticator) OnboardingRouteOption
- func WithOnboardingBasePath(basePath string) OnboardingRouteOption
- func WithOnboardingProtectedRoutes(keys ...OnboardingRouteKey) OnboardingRouteOption
- func WithOnboardingRoutePaths(paths OnboardingRoutePaths) OnboardingRouteOption
- type OnboardingRoutePaths
- type PanelDataGridConfigOptions
- type PanelDataGridStateStoreOptions
- type PanelDataGridURLStateOptions
- type PanelViewCapabilityOptions
- type PathViewContextConfig
- type PermissionDefinition
- type PermissionRegisterFunc
- type PlacementConfig
- type PreferencesModuleOption
- type RegistrationUIOption
- func WithRegistrationUIBasePath(basePath string) RegistrationUIOption
- func WithRegistrationUIEnabled(fn func(admin.Config) bool) RegistrationUIOption
- func WithRegistrationUIFeatureGate(gate fggate.FeatureGate) RegistrationUIOption
- func WithRegistrationUIMode(fn func(admin.Config) string) RegistrationUIOption
- func WithRegistrationUIPasswordResetPath(route string) RegistrationUIOption
- func WithRegistrationUIRegisterPath(route string) RegistrationUIOption
- func WithRegistrationUITemplate(name string) RegistrationUIOption
- func WithRegistrationUIThemeAssets(prefix string, assets map[string]string) RegistrationUIOption
- func WithRegistrationUITitle(title string) RegistrationUIOption
- func WithRegistrationUIViewContextBuilder(builder RegistrationUIViewContextBuilder) RegistrationUIOption
- type RegistrationUIViewContextBuilder
- type RequestIPContext
- type RequestIPOptions
- type RolesUIOption
- type ScopeConfig
- type ScopeDebugActor
- type ScopeDebugBuffer
- type ScopeDebugClaims
- type ScopeDebugDefaults
- type ScopeDebugEntry
- type ScopeDebugScope
- type ScopeDebugSnapshot
- type ScopeMode
- type SecureLinkConfig
- func (c SecureLinkConfig) Enabled() bool
- func (c SecureLinkConfig) GetAsQuery() bool
- func (c SecureLinkConfig) GetBaseURL() string
- func (c SecureLinkConfig) GetExpiration() time.Duration
- func (c SecureLinkConfig) GetQueryKey() string
- func (c SecureLinkConfig) GetRoutes() map[string]string
- func (c SecureLinkConfig) GetSigningKey() string
- type SecureLinkManagerSetter
- type SecureLinkUIConfig
- type SecureLinkUsersOption
- type SeedLocalizedNavigationOptions
- type SeedNavigationOptions
- type SessionUser
- type SettingsUIOption
- type SharedActivitySinks
- type StartupPolicy
- type StaticAssetsOption
- func WithAssetsPrefix(prefix string) StaticAssetsOption
- func WithDiskAssetsDir(dir string) StaticAssetsOption
- func WithDiskAssetsFS(fsys fs.FS) StaticAssetsOption
- func WithEChartsPrefix(prefix string) StaticAssetsOption
- func WithExtraAssetsFS(fsys ...fs.FS) StaticAssetsOption
- func WithFormgenPrefix(prefix string) StaticAssetsOption
- func WithRuntimePrefix(prefix string) StaticAssetsOption
- func WithSidebarAssetsFS(fsys fs.FS) StaticAssetsOption
- type TemplateFuncOption
- func WithTemplateBasePath(basePath string) TemplateFuncOption
- func WithTemplateFeatureGate(gate fggate.FeatureGate, opts ...fgtemplates.HelperOption) TemplateFuncOption
- func WithTemplateIconRenderer(renderFunc func(ref string, variant string) string) TemplateFuncOption
- func WithTemplateURLResolver(urls urlkit.Resolver) TemplateFuncOption
- func WithWidgetTitleFunc(fn func(string) string) TemplateFuncOption
- func WithWidgetTitleMap(titles map[string]string) TemplateFuncOption
- func WithWidgetTitleOverrides(overrides map[string]string) TemplateFuncOption
- type TemplateIconRenderer
- type ThemeOption
- type TranslationCapabilityMenuMode
- type TranslationChecker
- type TranslationCriteria
- type TranslationExchangeAsyncApplyFunc
- type TranslationExchangeConfig
- type TranslationPolicyConfig
- type TranslationPolicyEntityCatalog
- type TranslationPolicyEntityConfig
- type TranslationPolicyServices
- type TranslationPolicyTransitionCatalog
- type TranslationPolicyTransitionConfig
- type TranslationPolicyValidationCatalog
- type TranslationPolicyValidationResult
- type TranslationProductConfig
- type TranslationProfile
- type TranslationQueueConfig
- type UIRouteOption
- func WithUIActivityActive(active string) UIRouteOption
- func WithUIActivityPath(route string) UIRouteOption
- func WithUIActivityRoute(enabled bool) UIRouteOption
- func WithUIActivityTemplate(name string) UIRouteOption
- func WithUIActivityTitle(title string) UIRouteOption
- func WithUIBasePath(basePath string) UIRouteOption
- func WithUIDashboardActive(active string) UIRouteOption
- func WithUIDashboardPath(route string) UIRouteOption
- func WithUIDashboardRoute(enabled bool) UIRouteOption
- func WithUIDashboardTemplate(name string) UIRouteOption
- func WithUIDashboardTitle(title string) UIRouteOption
- func WithUIFeatureFlagsActive(active string) UIRouteOption
- func WithUIFeatureFlagsPath(route string) UIRouteOption
- func WithUIFeatureFlagsRoute(enabled bool) UIRouteOption
- func WithUIFeatureFlagsTemplate(name string) UIRouteOption
- func WithUIFeatureFlagsTitle(title string) UIRouteOption
- func WithUINotificationsActive(active string) UIRouteOption
- func WithUINotificationsPath(route string) UIRouteOption
- func WithUINotificationsRoute(enabled bool) UIRouteOption
- func WithUINotificationsTemplate(name string) UIRouteOption
- func WithUINotificationsTitle(title string) UIRouteOption
- func WithUITranslationDashboardActive(active string) UIRouteOption
- func WithUITranslationDashboardPath(route string) UIRouteOption
- func WithUITranslationDashboardRoute(enabled bool) UIRouteOption
- func WithUITranslationDashboardTemplate(name string) UIRouteOption
- func WithUITranslationDashboardTitle(title string) UIRouteOption
- func WithUITranslationExchangeActive(active string) UIRouteOption
- func WithUITranslationExchangePath(route string) UIRouteOption
- func WithUITranslationExchangeRoute(enabled bool) UIRouteOption
- func WithUITranslationExchangeTemplate(name string) UIRouteOption
- func WithUITranslationExchangeTitle(title string) UIRouteOption
- func WithUIViewContextBuilder(builder UIViewContextBuilder) UIRouteOption
- type UIViewContextBuilder
- type UploadAuthorizeFunc
- type UploadHandlerConfig
- type UploadPublicURLFunc
- type UploadResponseFunc
- type UploadSubdirResolver
- type UserMigrationObserver
- type UserMigrationRegistration
- type UserMigrationsOption
- func WithUserMigrationsAuthBootstrapEnabled(enabled bool) UserMigrationsOption
- func WithUserMigrationsAuthBootstrapFS(fsys fs.FS) UserMigrationsOption
- func WithUserMigrationsAuthEnabled(enabled bool) UserMigrationsOption
- func WithUserMigrationsAuthExtrasEnabled(enabled bool) UserMigrationsOption
- func WithUserMigrationsAuthExtrasFS(fsys fs.FS) UserMigrationsOption
- func WithUserMigrationsAuthFS(fsys fs.FS) UserMigrationsOption
- func WithUserMigrationsCoreEnabled(enabled bool) UserMigrationsOption
- func WithUserMigrationsCoreFS(fsys fs.FS) UserMigrationsOption
- func WithUserMigrationsObserver(observer UserMigrationObserver) UserMigrationsOption
- func WithUserMigrationsProfile(profile UserMigrationsProfile) UserMigrationsOption
- func WithUserMigrationsValidationTargets(targets ...string) UserMigrationsOption
- type UserMigrationsProfile
- type ViewEngineOption
- func WithViewAssetsFS(fsys ...fs.FS) ViewEngineOption
- func WithViewBasePath(basePath string) ViewEngineOption
- func WithViewDebug(enabled bool) ViewEngineOption
- func WithViewEmbed(enabled bool) ViewEngineOption
- func WithViewExt(ext string) ViewEngineOption
- func WithViewFeatureGate(gate fggate.FeatureGate, helperOpts ...fgtemplates.HelperOption) ViewEngineOption
- func WithViewReload(enabled bool) ViewEngineOption
- func WithViewTemplateFuncs(funcs map[string]any) ViewEngineOption
- func WithViewTemplatesFS(fsys ...fs.FS) ViewEngineOption
- func WithViewURLPrefix(prefix string) ViewEngineOption
- func WithViewURLResolver(urls urlkit.Resolver) ViewEngineOption
- type WorkflowBindingSpec
- type WorkflowConfig
- func DefaultWorkflowConfig() WorkflowConfig
- func LoadWorkflowConfigFile(path string) (WorkflowConfig, error)
- func MergeWorkflowConfigs(base WorkflowConfig, override WorkflowConfig) WorkflowConfig
- func NormalizeWorkflowConfig(cfg WorkflowConfig) WorkflowConfig
- func ParseWorkflowConfigContents(raw []byte, ext string) (WorkflowConfig, error)
- type WorkflowConfigValidationError
- type WorkflowConfigValidationIssue
- type WorkflowDefinitionSpec
- type WorkflowTransitionSpec
Constants ¶
const ( // SidebarPlacementPrimary is the placement key used for the main sidebar tree. SidebarPlacementPrimary = "sidebar" // SidebarPlacementUtility is the placement key used for fixed utility links above the user pod. SidebarPlacementUtility = "sidebar_utility" FooterPlacement = "footer" NavigationGroupMainID = "nav-group-main" NavigationSectionContentID = NavigationGroupMainID + ".content" NavigationGroupToolsID = "nav-group-others" NavigationGroupOthersID = NavigationGroupToolsID NavigationGroupTranslationsID = "nav-group-translations" // DefaultSidebarUtilityMenuCode is the default menu code used for sidebar utility links. DefaultSidebarUtilityMenuCode = "admin.utility" )
const ( ScopeDebugPanelID = "scope" ScopeDebugHeader = "X-Admin-Resolved-Scope" )
const ( UserMigrationsSourceLabelAuth = "go-auth" UserMigrationsSourceLabelUsersCore = "go-users" UserMigrationsSourceLabelUsersAuthBootstrap = "go-users-auth" UserMigrationsSourceLabelUsersAuthExtras = "go-users-auth-extras" )
User migration source labels for dialect-aware registration.
const ( UserRoleBulkAssignRouteKey = "users.bulk.assign_role" UserRoleBulkUnassignRouteKey = "users.bulk.unassign_role" )
DefaultNavMenuCode is the quickstart default menu identifier.
const TranslationProductSchemaVersionCurrent = 1
TranslationProductSchemaVersionCurrent is the supported quickstart product schema version.
const TranslationProductSchemaVersionMinimumSupported = 0
TranslationProductSchemaVersionMinimumSupported is the minimum schema version accepted for deterministic up-conversion into the current version.
const WorkflowConfigSchemaVersionCurrent = 1
WorkflowConfigSchemaVersionCurrent is the current schema version for external workflow config.
const WorkflowConfigSchemaVersionMinimumSupported = 0
WorkflowConfigSchemaVersionMinimumSupported is the oldest accepted schema version.
Variables ¶
var ( // ErrBinaryObjectContextRequired signals a missing response context. ErrBinaryObjectContextRequired = errors.New("quickstart: response context required") // ErrBinaryObjectStoreRequired signals a missing object store. ErrBinaryObjectStoreRequired = errors.New("quickstart: object store is not configured") // ErrBinaryObjectKeyRequired signals a missing object key. ErrBinaryObjectKeyRequired = errors.New("quickstart: object key is required") ErrBinaryObjectUnavailable = errors.New("quickstart: object payload is unavailable") )
var ErrGoUsersUserManagementConfig = errors.New("go-users user management config invalid")
var ErrPersistentCMSSetupFailed = errors.New("quickstart: persistent CMS setup failed")
var ErrTranslationExchangeConfig = errors.New("translation exchange config invalid")
ErrTranslationExchangeConfig indicates invalid quickstart exchange wiring.
var ErrTranslationProductConfig = errors.New("translation product config invalid")
ErrTranslationProductConfig indicates invalid translation product profile wiring.
var ErrTranslationQueueConfig = errors.New("translation queue config invalid")
ErrTranslationQueueConfig indicates invalid quickstart queue wiring.
var ErrWorkflowConfig = errors.New("workflow config invalid")
ErrWorkflowConfig indicates workflow config parsing/normalization issues.
Functions ¶
func AddDebugPanels ¶ added in v0.24.0
AddDebugPanels appends panels to the debug config, preserving defaults.
func ApplyAdapterIntegrations ¶
func ApplyAdapterIntegrations(adm *admin.Admin, result *AdapterResult, hooks AdapterHooks)
ApplyAdapterIntegrations wires optional adapters post-admin initialization.
func ApplyScopeConfig ¶ added in v0.24.0
func ApplyScopeConfig(cfg *admin.Config, scope ScopeConfig)
ApplyScopeConfig writes scope defaults back into admin.Config.
func ApplyScopeDefaultsToMetadata ¶ added in v0.24.0
ApplyScopeDefaultsToMetadata injects default tenant/org metadata when enabled.
func ApplySecureLinkManager ¶ added in v0.19.0
func ApplySecureLinkManager(cfg *userssvc.Config, manager userstypes.SecureLinkManager, opts ...SecureLinkUsersOption)
ApplySecureLinkManager wires securelink settings into go-users config.
func ApplySecureLinkManagerToAuth ¶ added in v0.19.0
func ApplySecureLinkManagerToAuth(target SecureLinkManagerSetter, manager userstypes.SecureLinkManager)
ApplySecureLinkManagerToAuth wires the securelink manager into go-auth style handlers.
func AttachDebugLogHandler ¶ added in v0.15.0
AttachDebugLogHandler wires slog to the debug collector when CaptureLogs is enabled.
func AttachDebugMiddleware ¶ added in v0.15.0
AttachDebugMiddleware registers the debug request capture middleware on the router.
func AttachGoAuthActivitySink ¶ added in v0.19.0
func AttachGoAuthActivitySink(auther *auth.Auther, sink admin.ActivitySink, opts ...GoAuthActivitySinkOption)
AttachGoAuthActivitySink wires the go-auth activity adapter into the auther.
func AuthUIViewContext ¶ added in v0.19.0
func AuthUIViewContext(cfg admin.Config, state AuthUIState, paths AuthUIPaths) router.ViewContext
AuthUIViewContext builds a view context with auth flags + paths.
func BuildNavItems ¶
func BuildNavItems(adm *admin.Admin, cfg admin.Config, ctx context.Context, active string) []map[string]any
BuildNavItems builds navigation menu items from the admin menu service.
func BuildNavItemsForPlacement ¶
func BuildNavItemsForPlacement(adm *admin.Admin, cfg admin.Config, placements PlacementConfig, placement string, ctx context.Context, active string) []map[string]any
BuildNavItemsForPlacement resolves a menu for a placement and returns render-ready entries.
func BuildPanelDataGridConfig ¶ added in v0.25.0
func BuildPanelDataGridConfig(opts PanelDataGridConfigOptions) map[string]any
BuildPanelDataGridConfig resolves datagrid_config for datatable templates.
func BuildPanelExportConfig ¶ added in v0.25.0
func BuildPanelExportConfig(cfg admin.Config, opts PanelViewCapabilityOptions) map[string]any
BuildPanelExportConfig resolves export_config for datatable templates.
func BuildPanelViewCapabilities ¶ added in v0.25.0
func BuildPanelViewCapabilities(cfg admin.Config, opts PanelViewCapabilityOptions) router.ViewContext
BuildPanelViewCapabilities returns standard capability keys for panel templates.
Current keys: - export_config - datagrid_config
func ConfigureDebugPanels ¶ added in v0.24.0
func ConfigureDebugPanels(cfg *admin.Config, deps DebugPanelDeps, catalog DebugPanelCatalog)
ConfigureDebugPanels ensures debug panels are enabled in config and registered in the catalog.
func ConfigureExportRenderers ¶ added in v0.13.0
func ConfigureExportRenderers(bundle *ExportBundle, templatesFS fs.FS, opts ...ExportTemplateOption) error
ConfigureExportRenderers registers template + PDF renderers using the provided templates FS.
func DashboardTemplatesFS ¶
DashboardTemplatesFS returns the embedded dashboard templates filesystem.
func DebugWSAuthMiddleware ¶ added in v0.24.0
func DebugWSAuthMiddleware(auther *auth.Auther, cfg admin.DebugConfig, config ...router.WSAuthConfig) router.WebSocketMiddleware
DebugWSAuthMiddleware returns a go-auth backed WebSocket auth middleware with defaults aligned to debug remote settings.
func DefaultAdminFeatures ¶
DefaultAdminFeatures returns the baseline feature defaults for quickstart.
func DefaultContentParentPermissions ¶ added in v0.25.0
func DefaultContentParentPermissions() []string
DefaultContentParentPermissions returns the canonical permission set used for the sidebar "Content" parent node.
func DefaultContentTypePreviewFallback ¶ added in v0.24.0
func DefaultContentTypePreviewFallback() admin.SchemaPreviewFallback
DefaultContentTypePreviewFallback returns the standard preview error HTML.
func DefaultMenuParents ¶
DefaultMenuParents returns the baseline parents/groups used by quickstart modules.
func DefaultMinimalFeatures ¶
DefaultMinimalFeatures returns a Stage 1 friendly feature default set.
func DefaultScopeFilter ¶ added in v0.24.0
func DefaultScopeFilter(cfg admin.Config) userstypes.ScopeFilter
DefaultScopeFilter returns the default scope for single-tenant mode.
func DefaultSecureLinkRoutes ¶ added in v0.19.0
DefaultSecureLinkRoutes builds the route map used by securelink managers.
func DefaultTemplateFuncs ¶
func DefaultTemplateFuncs(opts ...TemplateFuncOption) map[string]any
DefaultTemplateFuncs returns shared template functions for view rendering.
func DefaultThemeTokens ¶
DefaultThemeTokens returns the baseline theme tokens used by quickstart.
func EnsureDefaultMenuParents ¶
func EnsureDefaultMenuParents(ctx context.Context, menuSvc admin.CMSMenuService, menuCode, locale string) error
EnsureDefaultMenuParents scaffolds the default parents so module menus can nest without seeds.
func IconRendererFunc ¶ added in v0.25.0
func IconRendererFunc(renderer TemplateIconRenderer) func(ref string, variant string) string
IconRendererFunc creates a template-compatible render function from a TemplateIconRenderer. Template-driven values are treated as untrusted by default.
func MergeComponentDescriptors ¶
func MergeComponentDescriptors(base, override components.Descriptor) components.Descriptor
MergeComponentDescriptors combines a default descriptor with an override. Renderer uses the override when provided; assets are appended.
func MergeTemplateFuncs ¶
func MergeTemplateFuncs(overrides map[string]any, opts ...TemplateFuncOption) map[string]any
MergeTemplateFuncs combines default functions with caller overrides.
func NewActivityModule ¶ added in v0.25.0
func NewActivityModule(opts ...ActivityModuleOption) *admin.ActivityModule
NewActivityModule returns the built-in activity module under the quickstart Tools group.
func NewAdminConfig ¶
func NewAdminConfig(basePath, title, defaultLocale string, opts ...AdminConfigOption) admin.Config
NewAdminConfig builds a baseline admin config with quickstart defaults.
func NewCompositeActivitySink ¶
func NewCompositeActivitySink(primary admin.ActivitySink, hooks dashboardactivity.Hooks, cfg dashboardactivity.Config) admin.ActivitySink
NewCompositeActivitySink forwards admin activity entries to the primary sink and dashboard hooks.
func NewContentTypeBuilderModule ¶ added in v0.24.0
func NewContentTypeBuilderModule(cfg admin.Config, menuParent string, opts ...admin.ContentTypeBuilderOption) admin.Module
NewContentTypeBuilderModule builds a content type builder module with quickstart defaults.
func NewDashboardTemplateRenderer ¶ added in v0.25.0
func NewDashboardTemplateRenderer(opts ...DashboardRendererOption) (admin.DashboardRenderer, error)
NewDashboardTemplateRenderer builds the default dashboard SSR renderer.
func NewDebugModule ¶ added in v0.25.0
func NewDebugModule(cfg admin.DebugConfig, opts ...DebugModuleOption) *admin.DebugModule
NewDebugModule returns the built-in debug module under the quickstart Tools group.
func NewFeatureFlagsModule ¶ added in v0.25.0
func NewFeatureFlagsModule(opts ...FeatureFlagsModuleOption) *admin.FeatureFlagsModule
NewFeatureFlagsModule returns the built-in feature flags module under the quickstart Tools group.
func NewFiberErrorHandler ¶
func NewFiberErrorHandler(adm *admin.Admin, cfg admin.Config, isDev bool, opts ...FiberErrorHandlerOption) fiber.ErrorHandler
NewFiberErrorHandler returns a default error handler that renders JSON for API paths and an HTML error page (with nav + theme) for non-API paths.
func NewFiberServer ¶
func NewFiberServer(viewEngine fiber.Views, cfg admin.Config, adm *admin.Admin, isDev bool, opts ...FiberServerOption) (router.Server[*fiber.App], router.Router[*fiber.App])
NewFiberServer constructs a Fiber-backed router adapter with quickstart defaults.
func NewFormGenerator ¶
func NewFormGenerator(openapiFS fs.FS, templatesFS fs.FS, opts ...FormGeneratorOption) (*formgenorchestrator.Orchestrator, error)
NewFormGenerator creates a form generator from OpenAPI and template filesystems.
func NewGoAuthActivitySink ¶ added in v0.19.0
func NewGoAuthActivitySink(sink admin.ActivitySink, opts ...GoAuthActivitySinkOption) auth.ActivitySink
NewGoAuthActivitySink adapts go-auth activity events into the admin activity sink.
func NewModuleRegistrar ¶
func NewModuleRegistrar(adm *admin.Admin, cfg admin.Config, modules []admin.Module, isDev bool, opts ...ModuleRegistrarOption) error
NewModuleRegistrar seeds navigation and registers modules deterministically.
func NewNotificationsSecureLinkManager ¶ added in v0.19.0
func NewNotificationsSecureLinkManager(cfg SecureLinkConfig) (links.SecureLinkManager, error)
NewNotificationsSecureLinkManager builds a go-notifications compatible securelink manager.
func NewPreferencesModule ¶ added in v0.24.0
func NewPreferencesModule(cfg admin.Config, menuParent string, opts ...PreferencesModuleOption) admin.Module
NewPreferencesModule builds a Preferences module with quickstart defaults.
func NewSecureLinkManager ¶ added in v0.19.0
func NewSecureLinkManager(cfg SecureLinkConfig) (userstypes.SecureLinkManager, error)
NewSecureLinkManager builds a go-users compatible securelink manager.
func NewSecureLinkNotificationBuilder ¶ added in v0.19.0
func NewSecureLinkNotificationBuilder(manager links.SecureLinkManager, opts ...linknotifications.Option) links.LinkBuilder
NewSecureLinkNotificationBuilder builds a securelink link builder for go-notifications.
func NewStaticAssets ¶
func NewStaticAssets[T any](r router.Router[T], cfg admin.Config, assetsFS fs.FS, opts ...StaticAssetsOption)
NewStaticAssets registers static asset routes with quickstart defaults.
func NewThemeSelector ¶
func NewThemeSelector(name, variant string, tokenOverrides map[string]string, opts ...ThemeOption) (theme.Selector, *theme.Manifest, error)
NewThemeSelector registers a default theme manifest and returns a selector.
func NewTranslationPolicy ¶ added in v0.24.0
func NewTranslationPolicy(cfg TranslationPolicyConfig, services TranslationPolicyServices) admin.TranslationPolicy
NewTranslationPolicy builds a quickstart translation policy from config + services.
func NewTranslationQueueAutoCreateHook ¶ added in v0.25.0
func NewTranslationQueueAutoCreateHook(cfg TranslationQueueConfig) admin.TranslationQueueAutoCreateHook
NewTranslationQueueAutoCreateHook builds an auto-create hook for queue assignments. When enabled, workflow transitions blocked by missing translations will automatically create/reuse queue assignments for the missing locales.
func NewUploadHandler ¶ added in v0.25.0
func NewUploadHandler(cfg UploadHandlerConfig) router.HandlerFunc
NewUploadHandler returns a generic multipart upload handler.
func NewUsersModule ¶ added in v0.24.0
func NewUsersModule(opts ...admin.UserManagementModuleOption) *admin.UserManagementModule
NewUsersModule returns the built-in user management module with options applied.
func NewViewEngine ¶
NewViewEngine builds a view engine with quickstart sidebar fallbacks.
func OAuthNeedsReauthorization ¶ added in v0.25.0
OAuthNeedsReauthorization returns true only when manual action is required.
func PathViewContext ¶ added in v0.25.0
func PathViewContext(cfg admin.Config, pathCfg PathViewContextConfig) router.ViewContext
PathViewContext returns canonical template path keys: - base_path - api_base_path - asset_base_path - preferences_api_path
func RecommendedContentEntryDefaultRenderers ¶ added in v0.25.0
RecommendedContentEntryDefaultRenderers returns a copy of the recommended default renderer map used by WithContentEntryRecommendedDefaults.
func RegisterAdminPageRoutes ¶ added in v0.24.0
func RegisterAdminPageRoutes[T any]( r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, specs ...AdminPageSpec, ) error
RegisterAdminPageRoutes registers simple admin HTML page routes with URLKit resolution.
func RegisterAdminUIRoutes ¶ added in v0.13.0
func RegisterAdminUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, opts ...UIRouteOption) error
RegisterAdminUIRoutes registers default UI routes (dashboard + notifications).
func RegisterAuthUIRoutes ¶ added in v0.13.0
func RegisterAuthUIRoutes[T any](r router.Router[T], cfg admin.Config, auther *auth.Auther, cookieName string, opts ...AuthUIOption) error
RegisterAuthUIRoutes registers login, logout, and password reset UI routes.
func RegisterContentEntryAliasRoutes ¶ added in v0.24.0
func RegisterContentEntryAliasRoutes[T any]( r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, opts ...ContentAliasRouteOption, ) error
RegisterContentEntryAliasRoutes registers content entry alias routes for content panels.
func RegisterContentEntryUIRoutes ¶ added in v0.24.0
func RegisterContentEntryUIRoutes[T any]( r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, opts ...ContentEntryUIOption, ) error
RegisterContentEntryUIRoutes registers HTML routes for content entries.
func RegisterContentTypeBuilderAPIRoutes ¶ added in v0.24.0
func RegisterContentTypeBuilderAPIRoutes[T any]( r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, opts ...ContentTypeBuilderAPIOption, ) error
RegisterContentTypeBuilderAPIRoutes registers API helper routes for content types and block definitions.
func RegisterContentTypeBuilderUIRoutes ¶ added in v0.24.0
func RegisterContentTypeBuilderUIRoutes[T any]( r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, opts ...ContentTypeBuilderUIOption, ) error
RegisterContentTypeBuilderUIRoutes registers HTML routes for the content type builder.
func RegisterDebugPanelCatalog ¶ added in v0.24.0
func RegisterDebugPanelCatalog(cfg *admin.Config, deps DebugPanelDeps, catalog DebugPanelCatalog)
RegisterDebugPanelCatalog registers panels defined in the provided catalog.
func RegisterOnboardingRoutes ¶ added in v0.19.0
func RegisterOnboardingRoutes[T any](r router.Router[T], cfg admin.Config, handlers OnboardingHandlers, opts ...OnboardingRouteOption) error
RegisterOnboardingRoutes registers onboarding API endpoints.
func RegisterPreferencesPermissions ¶
func RegisterPreferencesPermissions(register PermissionRegisterFunc) error
RegisterPreferencesPermissions registers the default preferences permissions.
func RegisterRegistrationUIRoutes ¶ added in v0.19.0
func RegisterRegistrationUIRoutes[T any](r router.Router[T], cfg admin.Config, opts ...RegistrationUIOption) error
RegisterRegistrationUIRoutes registers the registration UI route.
func RegisterRolesUIRoutes ¶ added in v0.22.0
func RegisterRolesUIRoutes[T any](r router.Router[T], cfg admin.Config, adm *admin.Admin, opts ...RolesUIOption) error
RegisterRolesUIRoutes registers HTML routes for role management.
func RegisterScopeDebugPanel ¶ added in v0.24.0
func RegisterScopeDebugPanel(buffer *ScopeDebugBuffer)
RegisterScopeDebugPanel registers the scope debug panel with the registry.
func RegisterSettingsUIRoutes ¶ added in v0.24.0
func RegisterSettingsUIRoutes[T any]( r router.Router[T], cfg admin.Config, adm *admin.Admin, auth admin.HandlerAuthenticator, opts ...SettingsUIOption, ) error
RegisterSettingsUIRoutes registers a read-only settings page rendered from templates.
func RegisterTranslationExchangePermissions ¶ added in v0.25.0
func RegisterTranslationExchangePermissions(register PermissionRegisterFunc) error
RegisterTranslationExchangePermissions registers translation exchange permissions.
func RegisterTranslationExchangeWiring ¶ added in v0.25.0
func RegisterTranslationExchangeWiring(adm *admin.Admin, cfg TranslationExchangeConfig) error
RegisterTranslationExchangeWiring wires commands and optional permission registration.
func RegisterTranslationQueuePermissions ¶ added in v0.25.0
func RegisterTranslationQueuePermissions(register PermissionRegisterFunc) error
RegisterTranslationQueuePermissions registers translation queue permissions.
func RegisterTranslationQueueWiring ¶ added in v0.25.0
func RegisterTranslationQueueWiring(adm *admin.Admin, cfg TranslationQueueConfig, policyCfg TranslationPolicyConfig, hasPolicyCfg bool) error
RegisterTranslationQueueWiring wires queue panels, commands, and optional permissions.
func RegisterUserMigrations ¶ added in v0.19.0
func RegisterUserMigrations(client *persistence.Client, opts ...UserMigrationsOption) error
RegisterUserMigrations registers go-auth and go-users migrations with sensible defaults. By default it registers go-auth migrations plus go-users core migrations.
func RegisterUserRoleBulkRoutes ¶ added in v0.22.0
RegisterUserRoleBulkRoutes registers bulk assign/unassign endpoints.
func ResolveAdminAPIBasePath ¶ added in v0.24.0
ResolveAdminAPIBasePath returns the base admin API path using URLKit when available.
func ResolveAdminAPIGroupName ¶ added in v0.24.0
ResolveAdminAPIGroupName returns the URLKit group name for admin API routes.
func ResolveAdminBasePath ¶ added in v0.24.0
ResolveAdminBasePath returns the admin base path using URLKit when available.
func ResolveAdminBaseURL ¶ added in v0.24.0
ResolveAdminBaseURL returns the admin base URL using URLKit when available.
func ResolveAdminPanelAPICollectionPath ¶ added in v0.25.0
func ResolveAdminPanelAPICollectionPath(urls urlkit.Resolver, cfg admin.Config, fallbackBase, panel string) string
ResolveAdminPanelAPICollectionPath returns the canonical admin API collection path for a panel.
func ResolveAdminPanelAPIDetailPath ¶ added in v0.25.0
func ResolveAdminPanelAPIDetailPath(urls urlkit.Resolver, cfg admin.Config, fallbackBase, panel, id string) string
ResolveAdminPanelAPIDetailPath returns the canonical admin API detail path for a panel record.
func ResolveAdminPanelDetailURL ¶ added in v0.25.0
ResolveAdminPanelDetailURL returns the canonical admin UI detail path for a panel record.
func ResolveAdminPanelEditURL ¶ added in v0.25.0
ResolveAdminPanelEditURL returns the canonical admin UI edit path for a panel record.
func ResolveAdminPanelPreviewURL ¶ added in v0.25.0
ResolveAdminPanelPreviewURL returns the canonical admin UI preview path for a panel record.
func ResolveAdminPanelURL ¶ added in v0.25.0
ResolveAdminPanelURL returns the canonical admin UI path for a panel.
func ResolveAdminRoutePath ¶ added in v0.24.0
ResolveAdminRoutePath returns a resolved admin route path using URLKit when available.
func ResolveAdminURL ¶ added in v0.24.0
ResolveAdminURL prefixes the admin base URL to the provided path.
func ResolveDiskAssetsDir ¶ added in v0.13.0
ResolveDiskAssetsDir returns the first candidate directory that contains the marker file.
func ResolveRequestIP ¶ added in v0.26.0
func ResolveRequestIP(c RequestIPContext, opts RequestIPOptions) string
ResolveRequestIP resolves the best-effort client IP for a request context. By default it returns the direct peer IP and ignores forwarded headers.
func ScopeBuilder ¶ added in v0.24.0
func ScopeBuilder(cfg admin.Config) func(context.Context) userstypes.ScopeFilter
ScopeBuilder returns a scope resolver that applies defaults for single-tenant mode.
func ScopeDebugHandler ¶ added in v0.24.0
func ScopeDebugHandler(buffer *ScopeDebugBuffer) router.HandlerFunc
ScopeDebugHandler returns a handler that serves scope debug snapshots.
func ScopeDebugWrap ¶ added in v0.24.0
func ScopeDebugWrap(authn *admin.GoAuthAuthenticator, cfg *admin.Config, buffer *ScopeDebugBuffer) func(router.HandlerFunc) router.HandlerFunc
ScopeDebugWrap captures scope debug info for authenticated requests.
func ScopeFromContext ¶ added in v0.24.0
func ScopeFromContext(ctx context.Context) userstypes.ScopeFilter
ScopeFromContext extracts scope from go-auth actor/claims metadata.
func SeedLocalizedNavigation ¶ added in v0.26.0
func SeedLocalizedNavigation(ctx context.Context, opts SeedLocalizedNavigationOptions) error
SeedLocalizedNavigation seeds canonical menu IDs and applies locale-specific translations.
This is the preferred package-level API for localized site menus. It prevents locale-specific IDs such as "about.es" by keeping identity stable and attaching locale variants as translations.
func SeedNavigation ¶
func SeedNavigation(ctx context.Context, opts SeedNavigationOptions) error
SeedNavigation seeds a menu using the public admin CMS menu contract.
func SeedWorkflowRuntimeFromConfig ¶ added in v0.26.0
func SeedWorkflowRuntimeFromConfig(ctx context.Context, runtime admin.WorkflowRuntime, cfg WorkflowConfig) error
SeedWorkflowRuntimeFromConfig upserts canonical workflow definitions + bindings into a runtime service.
func ServeBinaryObject ¶ added in v0.25.0
func ServeBinaryObject(c router.Context, cfg BinaryObjectResponseConfig) error
ServeBinaryObject resolves an object from storage and writes it as an HTTP response body.
func SidebarAssetsFS ¶
SidebarAssetsFS returns the embedded sidebar assets (sidebar.js, sidebar.css).
func SidebarTemplatesFS ¶
SidebarTemplatesFS returns the embedded sidebar templates (partials/sidebar.html).
func TranslationCapabilities ¶ added in v0.25.0
TranslationCapabilities returns a stable translation capability snapshot for the admin instance.
func TranslationCapabilitiesForContext ¶ added in v0.25.0
TranslationCapabilitiesForContext returns a translation capability snapshot merged with request-scoped permission and action states.
func ValidateWorkflowConfig ¶ added in v0.25.0
func ValidateWorkflowConfig(cfg WorkflowConfig) error
ValidateWorkflowConfig validates external workflow config structure and constraints.
func WithAdminUIViewContext ¶ added in v0.24.0
func WithAdminUIViewContext(ctx router.ViewContext, adm *admin.Admin, cfg admin.Config, active string, c router.Context) router.ViewContext
WithAdminUIViewContext applies the default admin UI view-context builder.
func WithAuthUIViewContext ¶ added in v0.19.0
func WithAuthUIViewContext(ctx router.ViewContext, cfg admin.Config, state AuthUIState, paths AuthUIPaths) router.ViewContext
WithAuthUIViewContext merges auth flags + paths into an existing view context.
func WithAuthUIViewThemeAssets ¶ added in v0.19.0
func WithAuthUIViewThemeAssets(ctx router.ViewContext, assets map[string]string, assetPrefix string) router.ViewContext
WithAuthUIViewThemeAssets merges theme assets into an existing view context. It creates or extends the "theme" map with an "assets" sub-map containing the provided asset paths. If assetPrefix is provided, each asset filename is resolved to a full path by joining with the prefix.
This function does not add query-string theme/variant handling; it only provides static asset paths for auth UI templates.
func WithDefaultDashboardRenderer ¶
func WithDefaultDashboardRenderer(adm *admin.Admin, viewEngine fiber.Views, cfg admin.Config, opts ...DashboardRendererOption) error
WithDefaultDashboardRenderer registers a basic dashboard SSR renderer when none is set.
func WithFallbackFS ¶
WithFallbackFS builds a MultiFS preferring the primary FS first.
func WithFeatureTemplateContext ¶ added in v0.20.0
func WithFeatureTemplateContext(ctx router.ViewContext, reqCtx context.Context, scope any, snapshot any) router.ViewContext
WithFeatureTemplateContext injects feature helper keys into a view context when missing.
func WithGoAuth ¶
func WithGoAuth(adm *admin.Admin, routeAuth *auth.RouteAuthenticator, cfg auth.Config, authz admin.GoAuthAuthorizerConfig, authCfg *admin.AuthConfig, opts ...admin.GoAuthAuthenticatorOption) (*admin.GoAuthAuthenticator, *admin.GoAuthAuthorizer)
WithGoAuth wires go-auth adapters into the admin instance.
func WithNav ¶
func WithNav(ctx router.ViewContext, adm *admin.Admin, cfg admin.Config, active string, reqCtx context.Context) router.ViewContext
WithNav adds session, theme, and navigation payload to the view context.
func WithNavPlacements ¶
func WithNavPlacements(ctx router.ViewContext, adm *admin.Admin, cfg admin.Config, placements PlacementConfig, placement string, active string, reqCtx context.Context) router.ViewContext
WithNavPlacements is like WithNav but allows selecting a placement-specific menu.
func WithPathViewContext ¶ added in v0.25.0
func WithPathViewContext(ctx router.ViewContext, cfg admin.Config, pathCfg PathViewContextConfig) router.ViewContext
WithPathViewContext merges canonical template path keys into an existing context.
func WithThemeContext ¶ added in v0.13.0
func WithThemeContext(ctx router.ViewContext, adm *admin.Admin, req router.Context) router.ViewContext
WithThemeContext resolves the active theme (with optional query overrides) and adds it to the view context.
func WorkflowBindingsFromConfig ¶ added in v0.26.0
func WorkflowBindingsFromConfig(cfg WorkflowConfig) []admin.WorkflowBinding
WorkflowBindingsFromConfig converts runtime binding config into canonical admin workflow bindings.
func WorkflowDefinitionsFromConfig ¶ added in v0.25.0
func WorkflowDefinitionsFromConfig(cfg WorkflowConfig) map[string]admin.WorkflowDefinition
WorkflowDefinitionsFromConfig converts workflow config into admin workflow definitions.
func WorkflowTraitDefaultsFromConfig ¶ added in v0.25.0
func WorkflowTraitDefaultsFromConfig(cfg WorkflowConfig) map[string]string
WorkflowTraitDefaultsFromConfig returns a cloned trait->workflow default map.
Types ¶
type ActivityModuleOption ¶ added in v0.25.0
type ActivityModuleOption func(*admin.ActivityModule)
ActivityModuleOption customizes quickstart activity module defaults.
type AdapterFlags ¶
AdapterFlags captures adapter switches (config or env).
type AdapterHooks ¶
type AdapterHooks struct {
// PersistentCMS should build CMSOptions when persistent storage is desired.
// Return backend label (for logging) alongside options.
PersistentCMS func(ctx context.Context, defaultLocale string) (admin.CMSOptions, string, error)
// GoOptions should swap settings to go-options backend.
GoOptions func(adm *admin.Admin) (string, error)
// GoUsersActivity should build an activity sink backed by go-users (or nil).
GoUsersActivity func() admin.ActivitySink
}
AdapterHooks supplies host-specific builders for optional adapters.
type AdapterResult ¶
type AdapterResult struct {
Flags AdapterFlags
CMSBackend string
SettingsBackend string
ActivityBackend string
ActivitySink admin.ActivitySink
PersistentCMSSet bool
PersistentCMSError error
Config admin.Config
}
AdapterResult describes applied adapters/backends.
func ConfigureAdapters ¶
func ConfigureAdapters(ctx context.Context, cfg admin.Config, hooks AdapterHooks) (admin.Config, AdapterResult)
ConfigureAdapters mutates the admin config (CMS) using explicit defaults and available hooks.
func ConfigureAdaptersWithFlags ¶
func ConfigureAdaptersWithFlags(ctx context.Context, cfg admin.Config, hooks AdapterHooks, flags AdapterFlags) (admin.Config, AdapterResult)
ConfigureAdaptersWithFlags mutates the admin config (CMS) based on supplied flags.
func NewAdmin ¶
func NewAdmin(cfg admin.Config, hooks AdapterHooks, opts ...AdminOption) (*admin.Admin, AdapterResult, error)
NewAdmin constructs an admin instance with adapter wiring applied.
type AdminConfigOption ¶
AdminConfigOption mutates the base admin config.
func WithDebugConfig ¶ added in v0.15.0
func WithDebugConfig(debugCfg admin.DebugConfig) AdminConfigOption
WithDebugConfig merges a debug config into the admin config.
func WithDebugOptions ¶ added in v0.26.0
func WithDebugOptions(opt DebugOption) AdminConfigOption
WithDebugOptions applies explicit debug options into admin config.
func WithDefaultScope ¶ added in v0.24.0
func WithDefaultScope(tenantID, orgID string) AdminConfigOption
WithDefaultScope sets the default tenant/org identifiers for single-tenant mode.
func WithErrorConfig ¶ added in v0.24.0
func WithErrorConfig(errorCfg admin.ErrorConfig) AdminConfigOption
WithErrorConfig merges an error config into the admin config.
func WithErrorOptions ¶ added in v0.26.0
func WithErrorOptions(opt ErrorOption) AdminConfigOption
WithErrorOptions applies explicit error options to the admin config.
func WithFeatureCatalogPath ¶ added in v0.22.0
func WithFeatureCatalogPath(path string) AdminConfigOption
WithFeatureCatalogPath sets the feature catalog config file path.
func WithNavDebug ¶ added in v0.26.0
func WithNavDebug(enabled bool) AdminConfigOption
WithNavDebug enables/disables navigation debug payloads in view context.
func WithNavDebugLog ¶ added in v0.26.0
func WithNavDebugLog(enabled bool) AdminConfigOption
WithNavDebugLog enables/disables navigation debug logging.
func WithNavMenuCode ¶
func WithNavMenuCode(code string) AdminConfigOption
WithNavMenuCode overrides the default navigation menu code.
func WithScopeConfig ¶ added in v0.24.0
func WithScopeConfig(scope ScopeConfig) AdminConfigOption
WithScopeConfig applies scope defaults for single/multi tenant behavior.
func WithScopeMode ¶ added in v0.24.0
func WithScopeMode(mode ScopeMode) AdminConfigOption
WithScopeMode sets the scope mode (single or multi).
func WithTheme ¶
func WithTheme(name, variant string) AdminConfigOption
WithTheme overrides the base theme name/variant.
func WithThemeAssetPrefix ¶
func WithThemeAssetPrefix(prefix string) AdminConfigOption
WithThemeAssetPrefix sets a default asset prefix used by themes.
func WithThemeTokens ¶
func WithThemeTokens(tokens map[string]string) AdminConfigOption
WithThemeTokens merges custom theme tokens.
type AdminOption ¶
type AdminOption func(*adminOptions)
AdminOption customizes NewAdmin behavior.
func EnableFeature ¶
func EnableFeature(feature admin.FeatureKey) AdminOption
EnableFeature enables a single admin feature key for quickstart.NewAdmin.
func EnablePreferences ¶
func EnablePreferences() AdminOption
EnablePreferences enables the preferences feature gate.
func WithAdapterFlags ¶
func WithAdapterFlags(flags AdapterFlags) AdminOption
WithAdapterFlags overrides env-driven adapter flag resolution.
func WithAdminContext ¶
func WithAdminContext(ctx context.Context) AdminOption
WithAdminContext sets the context used when resolving adapter hooks.
func WithAdminDependencies ¶
func WithAdminDependencies(deps admin.Dependencies) AdminOption
WithAdminDependencies sets the admin dependencies passed to admin.New.
func WithDoctorChecks ¶ added in v0.25.0
func WithDoctorChecks(checks ...admin.DoctorCheck) AdminOption
WithDoctorChecks registers app-specific doctor diagnostics checks.
func WithFeatureDefaults ¶ added in v0.20.0
func WithFeatureDefaults(defaults map[string]bool) AdminOption
WithFeatureDefaults overrides or extends the feature defaults used to build the gate.
func WithGoUsersPreferencesRepository ¶ added in v0.24.0
func WithGoUsersPreferencesRepository(repo types.PreferenceRepository) AdminOption
WithGoUsersPreferencesRepository sets a go-users preference repository to be wrapped into an admin PreferencesStore when preferences dependencies are not already provided.
func WithGoUsersPreferencesRepositoryFactory ¶ added in v0.24.0
func WithGoUsersPreferencesRepositoryFactory(factory func() (types.PreferenceRepository, error)) AdminOption
WithGoUsersPreferencesRepositoryFactory sets a lazy go-users preference repository builder.
func WithGoUsersUserManagement ¶ added in v0.24.0
func WithGoUsersUserManagement(cfg GoUsersUserManagementConfig) AdminOption
WithGoUsersUserManagement wires go-users repositories into admin dependencies.
func WithStartupPolicy ¶ added in v0.25.0
func WithStartupPolicy(policy StartupPolicy) AdminOption
WithStartupPolicy configures module startup validation handling policy.
func WithThemeSelector ¶ added in v0.24.0
func WithThemeSelector(selector theme.ThemeSelector, manifest *theme.Manifest) AdminOption
WithThemeSelector wires a go-theme selector + manifest into admin.
func WithTraitWorkflowDefaults ¶ added in v0.25.0
func WithTraitWorkflowDefaults(defaults map[string]string) AdminOption
WithTraitWorkflowDefaults sets trait->workflow defaults applied to the admin instance.
func WithTranslationExchangeConfig ¶ added in v0.25.0
func WithTranslationExchangeConfig(cfg TranslationExchangeConfig) AdminOption
WithTranslationExchangeConfig configures opt-in translation exchange command/permission wiring.
func WithTranslationLocaleLabels ¶ added in v0.25.0
func WithTranslationLocaleLabels(labels map[string]string) AdminOption
WithTranslationLocaleLabels overrides locale labels used by create_translation action payload options.
func WithTranslationPolicyConfig ¶ added in v0.24.0
func WithTranslationPolicyConfig(cfg TranslationPolicyConfig) AdminOption
WithTranslationPolicyConfig sets the translation policy config for quickstart defaults.
func WithTranslationPolicyServices ¶ added in v0.24.0
func WithTranslationPolicyServices(services TranslationPolicyServices) AdminOption
WithTranslationPolicyServices overrides the translation check services used by the default policy.
func WithTranslationProductConfig ¶ added in v0.25.0
func WithTranslationProductConfig(cfg TranslationProductConfig) AdminOption
WithTranslationProductConfig applies productized translation module configuration.
func WithTranslationProfile ¶ added in v0.25.0
func WithTranslationProfile(profile TranslationProfile) AdminOption
WithTranslationProfile applies a productized translation profile.
func WithTranslationQueueConfig ¶ added in v0.25.0
func WithTranslationQueueConfig(cfg TranslationQueueConfig) AdminOption
WithTranslationQueueConfig configures opt-in translation queue feature and command/panel wiring.
func WithWorkflowConfig ¶ added in v0.25.0
func WithWorkflowConfig(cfg WorkflowConfig) AdminOption
WithWorkflowConfig sets external workflow definitions + trait defaults.
func WithWorkflowConfigFile ¶ added in v0.25.0
func WithWorkflowConfigFile(path string) AdminOption
WithWorkflowConfigFile loads external workflow definitions + trait defaults from file.
func WithWorkflowRuntime ¶ added in v0.25.0
func WithWorkflowRuntime(runtime admin.WorkflowRuntime) AdminOption
WithWorkflowRuntime wires persisted workflow runtime management into admin bootstrap.
type AdminPageSpec ¶ added in v0.24.0
type AdminPageSpec struct {
Route string
Path string
Template string
Title string
Active string
Feature string
Permission string
ViewContextBuilder UIViewContextBuilder
BuildContext func(router.Context) (router.ViewContext, error)
Guard func(router.Context) error
}
AdminPageSpec configures a simple admin HTML page route.
type AsyncRequesterFactory ¶
type AsyncRequesterFactory func(service export.Service, logger export.Logger) exportapi.AsyncRequester
AsyncRequesterFactory builds an async requester after the export service is initialized.
type AuthUIOption ¶ added in v0.13.0
type AuthUIOption func(*authUIOptions)
AuthUIOption customizes the auth UI routes.
func WithAuthUIBasePath ¶ added in v0.13.0
func WithAuthUIBasePath(basePath string) AuthUIOption
WithAuthUIBasePath overrides the base path used by auth UI routes.
func WithAuthUICookie ¶ added in v0.13.0
func WithAuthUICookie(cookie router.Cookie) AuthUIOption
WithAuthUICookie overrides the auth cookie defaults.
func WithAuthUIFeatureGate ¶ added in v0.20.0
func WithAuthUIFeatureGate(gate fggate.FeatureGate) AuthUIOption
WithAuthUIFeatureGate sets the feature gate used for default guards.
func WithAuthUILoginPath ¶ added in v0.13.0
func WithAuthUILoginPath(route string) AuthUIOption
WithAuthUILoginPath overrides the login route path.
func WithAuthUILoginRedirect ¶ added in v0.13.0
func WithAuthUILoginRedirect(route string) AuthUIOption
WithAuthUILoginRedirect overrides the redirect path after login.
func WithAuthUILogoutPath ¶ added in v0.13.0
func WithAuthUILogoutPath(route string) AuthUIOption
WithAuthUILogoutPath overrides the logout route path.
func WithAuthUILogoutRedirect ¶ added in v0.13.0
func WithAuthUILogoutRedirect(route string) AuthUIOption
WithAuthUILogoutRedirect overrides the redirect path after logout.
func WithAuthUIPasswordResetConfirmPath ¶ added in v0.19.0
func WithAuthUIPasswordResetConfirmPath(route string) AuthUIOption
WithAuthUIPasswordResetConfirmPath overrides the password reset confirm route path.
func WithAuthUIPasswordResetConfirmTemplate ¶ added in v0.19.0
func WithAuthUIPasswordResetConfirmTemplate(name string) AuthUIOption
WithAuthUIPasswordResetConfirmTemplate overrides the password reset confirm template name.
func WithAuthUIPasswordResetConfirmTitle ¶ added in v0.19.0
func WithAuthUIPasswordResetConfirmTitle(title string) AuthUIOption
WithAuthUIPasswordResetConfirmTitle overrides the view title for the confirm reset page.
func WithAuthUIPasswordResetEnabled ¶ added in v0.13.0
func WithAuthUIPasswordResetEnabled(fn func(admin.Config) bool) AuthUIOption
WithAuthUIPasswordResetEnabled overrides the password reset feature guard.
func WithAuthUIPasswordResetPath ¶ added in v0.13.0
func WithAuthUIPasswordResetPath(route string) AuthUIOption
WithAuthUIPasswordResetPath overrides the password reset route path.
func WithAuthUIRegisterPath ¶ added in v0.19.0
func WithAuthUIRegisterPath(route string) AuthUIOption
WithAuthUIRegisterPath overrides the self-registration route path.
func WithAuthUISelfRegistrationEnabled ¶ added in v0.19.0
func WithAuthUISelfRegistrationEnabled(fn func(admin.Config) bool) AuthUIOption
WithAuthUISelfRegistrationEnabled overrides the self-registration feature guard.
func WithAuthUITemplates ¶ added in v0.13.0
func WithAuthUITemplates(loginTemplate, passwordResetTemplate string) AuthUIOption
WithAuthUITemplates overrides the login and password reset templates.
func WithAuthUIThemeAssets ¶ added in v0.19.0
func WithAuthUIThemeAssets(prefix string, assets map[string]string) AuthUIOption
WithAuthUIThemeAssets sets theme assets (logo, favicon, etc.) for auth UI templates. The prefix is prepended to each asset filename to form the full URL path. Assets are exposed in templates as theme.assets.logo, theme.assets.favicon, etc.
func WithAuthUITitles ¶ added in v0.13.0
func WithAuthUITitles(loginTitle, passwordResetTitle string) AuthUIOption
WithAuthUITitles overrides the view titles for login and password reset.
func WithAuthUIViewContextBuilder ¶ added in v0.13.0
func WithAuthUIViewContextBuilder(builder AuthUIViewContextBuilder) AuthUIOption
WithAuthUIViewContextBuilder overrides the default view context builder.
type AuthUIPaths ¶ added in v0.19.0
type AuthUIPaths struct {
BasePath string
PasswordResetPath string
PasswordResetConfirmPath string
RegisterPath string
}
AuthUIPaths captures common auth-related route paths for templates.
type AuthUIState ¶ added in v0.19.0
AuthUIState captures feature-guarded flags used by auth templates.
func AuthUIStateFromGate ¶ added in v0.20.0
func AuthUIStateFromGate(ctx context.Context, gate fggate.FeatureGate, scope fggate.ScopeChain) AuthUIState
AuthUIStateFromGate derives auth UI flags from the feature gate.
type AuthUIViewContextBuilder ¶ added in v0.13.0
type AuthUIViewContextBuilder func(ctx router.ViewContext, c router.Context) router.ViewContext
AuthUIViewContextBuilder mutates the view context for auth UI routes.
type BinaryObjectResponseConfig ¶ added in v0.25.0
type BinaryObjectResponseConfig struct {
Store BinaryObjectStore
ObjectKey string
ContentType string
Filename string
Disposition string
CacheControl string
Pragma string
StatusCode int
Headers map[string]string
}
BinaryObjectResponseConfig configures object-backed binary responses.
type BinaryObjectStore ¶ added in v0.25.0
BinaryObjectStore resolves raw object bytes by key.
type ContentAliasRouteOption ¶ added in v0.24.0
type ContentAliasRouteOption func(*contentAliasRouteOptions)
ContentAliasRouteOption customizes the content entry alias route registration.
func WithContentAliasBasePath ¶ added in v0.24.0
func WithContentAliasBasePath(basePath string) ContentAliasRouteOption
WithContentAliasBasePath overrides the base path used to build alias routes.
func WithContentAliasRoutes ¶ added in v0.24.0
func WithContentAliasRoutes(aliases ...string) ContentAliasRouteOption
WithContentAliasRoutes overrides the aliases that should be registered.
type ContentEntryUIOption ¶ added in v0.24.0
type ContentEntryUIOption func(*contentEntryUIOptions)
ContentEntryUIOption customizes content entry UI routes.
func WithContentEntryDataGridStateStore ¶ added in v0.25.0
func WithContentEntryDataGridStateStore(cfg PanelDataGridStateStoreOptions) ContentEntryUIOption
WithContentEntryDataGridStateStore configures DataGrid persisted-state storage for content list templates.
func WithContentEntryDataGridURLState ¶ added in v0.25.0
func WithContentEntryDataGridURLState(cfg PanelDataGridURLStateOptions) ContentEntryUIOption
WithContentEntryDataGridURLState configures DataGrid URL-state limits for content list templates.
func WithContentEntryDefaultRenderers ¶ added in v0.25.0
func WithContentEntryDefaultRenderers(renderers map[string]string) ContentEntryUIOption
WithContentEntryDefaultRenderers replaces the configured default renderer map. Values are used when ui_schema does not specify a renderer.
func WithContentEntryFormRenderer ¶ added in v0.24.0
func WithContentEntryFormRenderer(renderer *admin.FormgenSchemaValidator) ContentEntryUIOption
WithContentEntryFormRenderer overrides the form renderer used for content entry forms.
func WithContentEntryMergeDefaultRenderers ¶ added in v0.25.0
func WithContentEntryMergeDefaultRenderers(renderers map[string]string) ContentEntryUIOption
WithContentEntryMergeDefaultRenderers merges renderer defaults into the existing map. Keys in renderers override existing configured values.
func WithContentEntryRecommendedDefaults ¶ added in v0.25.0
func WithContentEntryRecommendedDefaults() ContentEntryUIOption
WithContentEntryRecommendedDefaults merges recommended content-entry defaults.
func WithContentEntryTranslationUX ¶ added in v0.25.0
func WithContentEntryTranslationUX(enabled bool) ContentEntryUIOption
WithContentEntryTranslationUX enables translation list UX enhancements (grouped/matrix view mode wiring and grouped URL sync) for translation-enabled panels.
func WithContentEntryUIAuthResource ¶ added in v0.24.0
func WithContentEntryUIAuthResource(resource string) ContentEntryUIOption
WithContentEntryUIAuthResource overrides the go-auth resource used for checks.
func WithContentEntryUIBasePath ¶ added in v0.24.0
func WithContentEntryUIBasePath(basePath string) ContentEntryUIOption
WithContentEntryUIBasePath overrides the base path used to build content entry routes.
func WithContentEntryUIPermission ¶ added in v0.24.0
func WithContentEntryUIPermission(permission string) ContentEntryUIOption
WithContentEntryUIPermission sets the permission used for authz checks.
func WithContentEntryUITemplateExists ¶ added in v0.25.0
func WithContentEntryUITemplateExists(checker func(name string) bool) ContentEntryUIOption
WithContentEntryUITemplateExists sets a template existence checker used to resolve panel template fallbacks.
func WithContentEntryUITemplateFS ¶ added in v0.25.0
func WithContentEntryUITemplateFS(fsys ...fs.FS) ContentEntryUIOption
WithContentEntryUITemplateFS configures deterministic template fallback resolution from filesystem sources.
func WithContentEntryUITemplates ¶ added in v0.24.0
func WithContentEntryUITemplates(listTemplate, formTemplate, detailTemplate string) ContentEntryUIOption
WithContentEntryUITemplates overrides template names for content entry routes.
func WithContentEntryUIViewContext ¶ added in v0.24.0
func WithContentEntryUIViewContext(builder UIViewContextBuilder) ContentEntryUIOption
WithContentEntryUIViewContext overrides the view context builder for content entry routes.
type ContentTypeBuilderAPIOption ¶ added in v0.24.0
type ContentTypeBuilderAPIOption func(*contentTypeBuilderAPIOptions)
ContentTypeBuilderAPIOption customizes content type builder API routes.
func WithContentTypeBuilderAPIAuthResource ¶ added in v0.24.0
func WithContentTypeBuilderAPIAuthResource(resource string) ContentTypeBuilderAPIOption
WithContentTypeBuilderAPIAuthResource overrides the go-auth resource used for checks.
func WithContentTypeBuilderAPIBasePath ¶ added in v0.24.0
func WithContentTypeBuilderAPIBasePath(basePath string) ContentTypeBuilderAPIOption
WithContentTypeBuilderAPIBasePath overrides the base path used to build API routes.
func WithContentTypeBuilderAPIPermission ¶ added in v0.24.0
func WithContentTypeBuilderAPIPermission(permission string) ContentTypeBuilderAPIOption
WithContentTypeBuilderAPIPermission sets the permission used for authz checks.
type ContentTypeBuilderUIOption ¶ added in v0.24.0
type ContentTypeBuilderUIOption func(*contentTypeBuilderUIOptions)
ContentTypeBuilderUIOption customizes content type builder UI routes.
func WithContentTypeBuilderUIAuthResource ¶ added in v0.24.0
func WithContentTypeBuilderUIAuthResource(resource string) ContentTypeBuilderUIOption
WithContentTypeBuilderUIAuthResource overrides the go-auth resource used for checks.
func WithContentTypeBuilderUIBasePath ¶ added in v0.24.0
func WithContentTypeBuilderUIBasePath(basePath string) ContentTypeBuilderUIOption
WithContentTypeBuilderUIBasePath overrides the base path used to build UI routes.
func WithContentTypeBuilderUIPermission ¶ added in v0.24.0
func WithContentTypeBuilderUIPermission(permission string) ContentTypeBuilderUIOption
WithContentTypeBuilderUIPermission sets the permission used for authz checks.
func WithContentTypeBuilderUITemplates ¶ added in v0.24.0
func WithContentTypeBuilderUITemplates(contentTypes, blockDefinitions string) ContentTypeBuilderUIOption
WithContentTypeBuilderUITemplates overrides template names for UI routes.
func WithContentTypeBuilderUIViewContext ¶ added in v0.24.0
func WithContentTypeBuilderUIViewContext(builder UIViewContextBuilder) ContentTypeBuilderUIOption
WithContentTypeBuilderUIViewContext overrides the view context builder for UI routes.
type DashboardRendererOption ¶
type DashboardRendererOption func(*dashboardRendererOptions)
DashboardRendererOption customizes the default dashboard renderer setup.
func WithDashboardEmbeddedTemplates ¶
func WithDashboardEmbeddedTemplates(enabled bool) DashboardRendererOption
WithDashboardEmbeddedTemplates toggles the embedded dashboard templates.
func WithDashboardTemplateFuncOptions ¶ added in v0.25.0
func WithDashboardTemplateFuncOptions(options ...TemplateFuncOption) DashboardRendererOption
WithDashboardTemplateFuncOptions configures quickstart.DefaultTemplateFuncs when no explicit template function map is provided.
func WithDashboardTemplateFuncs ¶ added in v0.25.0
func WithDashboardTemplateFuncs(funcs map[string]any) DashboardRendererOption
WithDashboardTemplateFuncs overrides template functions used by the dashboard renderer.
func WithDashboardTemplatesFS ¶
func WithDashboardTemplatesFS(fsys fs.FS) DashboardRendererOption
WithDashboardTemplatesFS appends a template filesystem to the renderer.
type DebugModuleOption ¶ added in v0.25.0
type DebugModuleOption func(*admin.DebugModule)
DebugModuleOption customizes quickstart debug module defaults.
type DebugOption ¶ added in v0.26.0
type DebugOption struct {
Enabled *bool
AllowedIPs []string
AllowedOrigins []string
AppID string
AppName string
Environment string
RemoteEnabled *bool
TokenTTL *time.Duration
SessionTracking *bool
SessionIncludeGlobalPanels *bool
SessionCookieName string
SessionInactivityExpiry *time.Duration
CaptureSQL *bool
CaptureLogs *bool
CaptureJSErrors *bool
CaptureRequestBody *bool
ToolbarMode *bool
ToolbarPanels []string
LayoutMode string
ReplEnabled *bool
ReplReadOnly *bool
}
DebugOption applies explicit debug configuration overrides.
type DebugPanelCatalog ¶ added in v0.24.0
type DebugPanelCatalog map[string]DebugPanelRegistrar
DebugPanelCatalog maps panel IDs to registration callbacks.
func DefaultDebugPanelCatalog ¶ added in v0.24.0
func DefaultDebugPanelCatalog() DebugPanelCatalog
DefaultDebugPanelCatalog returns the built-in quickstart debug panel catalog.
type DebugPanelDeps ¶ added in v0.24.0
type DebugPanelDeps struct {
ScopeBuffer *ScopeDebugBuffer
IsDevelopment *bool
DoctorEnabled *bool
}
DebugPanelDeps provides optional dependencies for debug panel registration.
type DebugPanelRegistrar ¶ added in v0.24.0
type DebugPanelRegistrar func(cfg *admin.Config, deps DebugPanelDeps)
DebugPanelRegistrar registers a debug panel definition.
type ErrorOption ¶ added in v0.26.0
ErrorOption applies explicit error configuration overrides.
type ExportBundle ¶
type ExportBundle struct {
Runner *export.Runner
Service export.Service
Registry admin.ExportRegistry
Registrar admin.ExportHTTPRegistrar
Metadata admin.ExportMetadataProvider
}
ExportBundle wires go-export integrations for go-admin.
func NewExportBundle ¶
func NewExportBundle(opts ...ExportBundleOption) *ExportBundle
NewExportBundle constructs default go-export wiring for go-admin.
type ExportBundleOption ¶
type ExportBundleOption func(*exportBundleOptions)
ExportBundleOption customizes NewExportBundle behavior.
func WithExportActorProvider ¶
func WithExportActorProvider(provider export.ActorProvider) ExportBundleOption
WithExportActorProvider sets the actor provider for export requests.
func WithExportAsyncInProcess ¶
func WithExportAsyncInProcess(timeout time.Duration) ExportBundleOption
WithExportAsyncInProcess enables in-process async exports using a background goroutine. This is suitable for demos; production should use a job runner/queue.
func WithExportAsyncRequester ¶
func WithExportAsyncRequester(factory AsyncRequesterFactory) ExportBundleOption
WithExportAsyncRequester configures async export requests (for 202 + status/download URLs).
func WithExportBasePath ¶
func WithExportBasePath(path string) ExportBundleOption
WithExportBasePath overrides the default export base path. Provide a full path ("/admin/exports") or a suffix ("exports").
func WithExportDeliveryPolicy ¶
func WithExportDeliveryPolicy(policy export.DeliveryPolicy) ExportBundleOption
WithExportDeliveryPolicy overrides the delivery policy defaults.
func WithExportGuard ¶
func WithExportGuard(guard export.Guard) ExportBundleOption
WithExportGuard sets the go-export guard.
func WithExportHistoryPath ¶
func WithExportHistoryPath(path string) ExportBundleOption
WithExportHistoryPath overrides the history endpoint path.
func WithExportLogger ¶
func WithExportLogger(logger export.Logger) ExportBundleOption
WithExportLogger sets the go-export logger.
func WithExportMaxBufferBytes ¶
func WithExportMaxBufferBytes(maxBytes int64) ExportBundleOption
WithExportMaxBufferBytes sets the max buffer size for sync downloads.
func WithExportPathSuffix ¶
func WithExportPathSuffix(suffix string) ExportBundleOption
WithExportPathSuffix overrides the default base path suffix when no base path is set.
func WithExportQueryRequestDecoder ¶
func WithExportQueryRequestDecoder(decoder exportapi.RequestDecoder) ExportBundleOption
WithExportQueryRequestDecoder overrides the querystring request decoder.
func WithExportRequestDecoder ¶
func WithExportRequestDecoder(decoder exportapi.RequestDecoder) ExportBundleOption
WithExportRequestDecoder overrides the JSON request decoder.
func WithExportStore ¶
func WithExportStore(store export.ArtifactStore) ExportBundleOption
WithExportStore sets the artifact store used by go-export.
func WithExportTracker ¶
func WithExportTracker(tracker export.ProgressTracker) ExportBundleOption
WithExportTracker sets the progress tracker used by go-export.
type ExportPDFConfig ¶ added in v0.26.0
type ExportPDFConfig struct {
Engine string
WKHTMLToPDFPath string
BrowserPath string
Timeout time.Duration
PageSize string
PrintBackground bool
PreferCSSPageSize bool
Headless bool
Args []string
}
ExportPDFConfig controls default PDF renderer behavior.
func DefaultExportPDFConfig ¶ added in v0.26.0
func DefaultExportPDFConfig() ExportPDFConfig
DefaultExportPDFConfig returns baseline PDF settings.
type ExportTemplateOption ¶ added in v0.13.0
type ExportTemplateOption func(*exportTemplateOptions)
ExportTemplateOption customizes the default export template renderers.
func WithExportPDFConfig ¶ added in v0.26.0
func WithExportPDFConfig(cfg ExportPDFConfig) ExportTemplateOption
WithExportPDFConfig overrides default PDF renderer settings.
func WithExportPDFRenderer ¶ added in v0.13.0
func WithExportPDFRenderer(builder func(exporttemplate.Renderer) (exportpdf.Renderer, error)) ExportTemplateOption
WithExportPDFRenderer overrides the default PDF renderer builder.
func WithExportTemplateFuncs ¶ added in v0.13.0
func WithExportTemplateFuncs(funcs map[string]any) ExportTemplateOption
WithExportTemplateFuncs sets the template helpers used by the export renderer.
func WithExportTemplateMaxRows ¶ added in v0.13.0
func WithExportTemplateMaxRows(rows int) ExportTemplateOption
WithExportTemplateMaxRows overrides the buffered template row limit.
func WithExportTemplateName ¶ added in v0.13.0
func WithExportTemplateName(name string) ExportTemplateOption
WithExportTemplateName overrides the default template name ("export").
type FeatureFlagsModuleOption ¶ added in v0.25.0
type FeatureFlagsModuleOption func(*admin.FeatureFlagsModule)
FeatureFlagsModuleOption customizes quickstart feature flags module defaults.
type FiberErrorHandlerOption ¶ added in v0.19.0
type FiberErrorHandlerOption func(*fiberErrorHandlerOptions)
FiberErrorHandlerOption customizes the quickstart Fiber error handler.
func WithFiberErrorMappers ¶ added in v0.19.0
func WithFiberErrorMappers(mappers ...goerrors.ErrorMapper) FiberErrorHandlerOption
WithFiberErrorMappers appends custom error mappers to the defaults.
type FiberRuntimeConfig ¶ added in v0.26.0
type FiberRuntimeConfig struct {
StrictRoutes *bool
RouteConflictPolicy string
PathConflictMode string
ReadBufferSize int
}
FiberRuntimeConfig captures typed runtime overrides for Fiber and router adapter behavior.
type FiberServerOption ¶
type FiberServerOption func(*fiberServerOptions)
FiberServerOption customizes the Fiber server defaults.
func WithFiberAdapterConfig ¶ added in v0.24.0
func WithFiberAdapterConfig(mutator func(*router.FiberAdapterConfig)) FiberServerOption
WithFiberAdapterConfig overrides the go-router adapter configuration.
func WithFiberConfig ¶
func WithFiberConfig(mutator func(*fiber.Config)) FiberServerOption
WithFiberConfig overrides the default Fiber config.
func WithFiberErrorHandler ¶
func WithFiberErrorHandler(handler fiber.ErrorHandler) FiberServerOption
WithFiberErrorHandler overrides the default error handler.
func WithFiberLogger ¶
func WithFiberLogger(enabled bool) FiberServerOption
WithFiberLogger toggles the default logger middleware.
func WithFiberMiddleware ¶
func WithFiberMiddleware(handlers ...fiber.Handler) FiberServerOption
WithFiberMiddleware appends middleware to the default stack.
func WithFiberRuntimeConfig ¶ added in v0.26.0
func WithFiberRuntimeConfig(runtime FiberRuntimeConfig) FiberServerOption
WithFiberRuntimeConfig applies typed runtime overrides for Fiber defaults.
type FormGeneratorOption ¶
type FormGeneratorOption func(*formGeneratorConfig)
FormGeneratorOption configures the form generator.
func WithComponentRegistry ¶
func WithComponentRegistry(reg *components.Registry) FormGeneratorOption
WithComponentRegistry replaces the default component registry.
func WithComponentRegistryMergeDefaults ¶
func WithComponentRegistryMergeDefaults(reg *components.Registry) FormGeneratorOption
WithComponentRegistryMergeDefaults merges a custom registry into defaults. Custom components override built-ins with the same name.
func WithVanillaOption ¶
func WithVanillaOption(opt formgenvanilla.Option) FormGeneratorOption
WithVanillaOption appends a vanilla renderer option. These are applied last to allow overrides.
type GoAuthActivitySinkOption ¶ added in v0.19.0
type GoAuthActivitySinkOption func(*goAuthActivitySinkOptions)
GoAuthActivitySinkOption customizes how go-auth activity events are mapped.
func WithGoAuthActivityChannel ¶ added in v0.19.0
func WithGoAuthActivityChannel(channel string) GoAuthActivitySinkOption
WithGoAuthActivityChannel overrides the channel used for go-auth events.
func WithGoAuthActivityObjectType ¶ added in v0.19.0
func WithGoAuthActivityObjectType(objectType string) GoAuthActivitySinkOption
WithGoAuthActivityObjectType overrides the object type used for go-auth events.
type GoUsersPreferencesStore ¶
type GoUsersPreferencesStore struct {
// contains filtered or unexported fields
}
GoUsersPreferencesStore bridges go-users preferences into the admin preferences contract.
func NewGoUsersPreferencesStore ¶
func NewGoUsersPreferencesStore(repo types.PreferenceRepository) (*GoUsersPreferencesStore, error)
NewGoUsersPreferencesStore builds a preferences store backed by go-users.
func (*GoUsersPreferencesStore) Delete ¶
func (s *GoUsersPreferencesStore) Delete(ctx context.Context, input admin.PreferencesDeleteInput) error
func (*GoUsersPreferencesStore) Resolve ¶
func (s *GoUsersPreferencesStore) Resolve(ctx context.Context, input admin.PreferencesResolveInput) (admin.PreferenceSnapshot, error)
func (*GoUsersPreferencesStore) Upsert ¶
func (s *GoUsersPreferencesStore) Upsert(ctx context.Context, input admin.PreferencesUpsertInput) (admin.PreferenceSnapshot, error)
type GoUsersUserManagementConfig ¶ added in v0.24.0
type GoUsersUserManagementConfig struct {
AuthRepo userstypes.AuthRepository
InventoryRepo userstypes.UserInventoryRepository
RoleRegistry userstypes.RoleRegistry
ProfileRepo userstypes.ProfileRepository
ScopeResolver func(context.Context) userstypes.ScopeFilter
}
GoUsersUserManagementConfig captures go-users adapters used by quickstart user management.
type GoUsersUserManagementConfigError ¶ added in v0.24.0
type GoUsersUserManagementConfigError struct {
Missing []string
}
func (GoUsersUserManagementConfigError) Error ¶ added in v0.24.0
func (e GoUsersUserManagementConfigError) Error() string
func (GoUsersUserManagementConfigError) Unwrap ¶ added in v0.24.0
func (e GoUsersUserManagementConfigError) Unwrap() error
type LegacyLocalizedMenuMigrationOptions ¶ added in v0.26.0
type LegacyLocalizedMenuMigrationOptions struct {
MenuSvc admin.CMSMenuService
MenuCode string
Locales []string
}
LegacyLocalizedMenuMigrationOptions configures migration from locale-suffixed menu IDs.
type LegacyLocalizedMenuMigrationReport ¶ added in v0.26.0
type LegacyLocalizedMenuMigrationReport struct {
MigratedTranslations int
DeletedLegacyItems int
SkippedLegacyItems int
LegacyItemIDs []string
}
LegacyLocalizedMenuMigrationReport summarizes migration effects.
func MigrateLegacyLocalizedMenuItems ¶ added in v0.26.0
func MigrateLegacyLocalizedMenuItems(ctx context.Context, opts LegacyLocalizedMenuMigrationOptions) (LegacyLocalizedMenuMigrationReport, error)
MigrateLegacyLocalizedMenuItems folds legacy locale-suffixed item IDs (for example "site_main.about.es") into canonical base IDs by transferring localized translations and then removing the suffix nodes.
type LocalizedMenuItemTranslation ¶ added in v0.26.0
type LocalizedMenuItemTranslation struct {
Locale string
Label string
LabelKey string
GroupTitle string
GroupTitleKey string
URLOverride string
}
LocalizedMenuItemTranslation captures per-locale display and URL override values.
type LocalizedSeedMenuItem ¶ added in v0.26.0
type LocalizedSeedMenuItem struct {
Item admin.MenuItem
Translations []LocalizedMenuItemTranslation
}
LocalizedSeedMenuItem represents one canonical menu item and its localized variants.
type ModuleRegistrarOption ¶
type ModuleRegistrarOption func(*moduleRegistrarOptions)
ModuleRegistrarOption customizes module registration behavior.
func WithDefaultSidebarUtilityItems ¶ added in v0.25.0
func WithDefaultSidebarUtilityItems(enabled bool) ModuleRegistrarOption
WithDefaultSidebarUtilityItems toggles quickstart-provided utility links.
func WithModuleFeatureDisabledHandler ¶
func WithModuleFeatureDisabledHandler(handler func(feature, moduleID string) error) ModuleRegistrarOption
WithModuleFeatureDisabledHandler configures how feature-disabled modules are handled.
func WithModuleFeatureGates ¶
func WithModuleFeatureGates(gates fggate.FeatureGate) ModuleRegistrarOption
WithModuleFeatureGates enables feature-gated module filtering.
func WithModuleMenuItems ¶
func WithModuleMenuItems(items ...admin.MenuItem) ModuleRegistrarOption
WithModuleMenuItems appends base menu items before seeding.
func WithModuleRegistrarContext ¶
func WithModuleRegistrarContext(ctx context.Context) ModuleRegistrarOption
WithModuleRegistrarContext sets the context used for navigation seeding.
func WithSeedNavigation ¶
func WithSeedNavigation(enabled bool) ModuleRegistrarOption
WithSeedNavigation toggles navigation seeding.
func WithSeedNavigationOptions ¶
func WithSeedNavigationOptions(mutator func(*SeedNavigationOptions)) ModuleRegistrarOption
WithSeedNavigationOptions mutates the seed options before execution.
func WithSidebarUtilityMenuCode ¶ added in v0.25.0
func WithSidebarUtilityMenuCode(menuCode string) ModuleRegistrarOption
WithSidebarUtilityMenuCode overrides the menu code used for utility links.
func WithSidebarUtilityMenuItems ¶ added in v0.25.0
func WithSidebarUtilityMenuItems(items ...admin.MenuItem) ModuleRegistrarOption
WithSidebarUtilityMenuItems appends utility links for the fixed sidebar utility zone.
func WithToolsMenuItems ¶ added in v0.25.0
func WithToolsMenuItems(items ...admin.MenuItem) ModuleRegistrarOption
WithToolsMenuItems appends menu items to the quickstart Tools group.
func WithTranslationCapabilityMenuMode ¶ added in v0.25.0
func WithTranslationCapabilityMenuMode(mode TranslationCapabilityMenuMode) ModuleRegistrarOption
WithTranslationCapabilityMenuMode controls how translation capability links are seeded into server-side navigation menus.
type MultiFS ¶
MultiFS tries each filesystem in order until one succeeds.
type OAuthTokenPolicyInput ¶ added in v0.25.0
OAuthTokenPolicyInput captures provider token status flags used by UI warnings.
type OAuthTokenPolicyState ¶ added in v0.25.0
OAuthTokenPolicyState contains derived UI policy for token warnings.
func ResolveOAuthTokenPolicy ¶ added in v0.25.0
func ResolveOAuthTokenPolicy(input OAuthTokenPolicyInput) OAuthTokenPolicyState
ResolveOAuthTokenPolicy derives UI flags from backend token state.
type OnboardingHandlers ¶ added in v0.19.0
type OnboardingHandlers struct {
Invite router.HandlerFunc
VerifyInvite router.HandlerFunc
AcceptInvite router.HandlerFunc
SelfRegister router.HandlerFunc
ConfirmRegistration router.HandlerFunc
RequestPasswordReset router.HandlerFunc
ConfirmPasswordReset router.HandlerFunc
TokenMetadata router.HandlerFunc
}
OnboardingHandlers provides handlers for onboarding routes.
type OnboardingRouteKey ¶ added in v0.19.0
type OnboardingRouteKey string
OnboardingRouteKey identifies a specific onboarding endpoint.
const ( OnboardingRouteInvite OnboardingRouteKey = "invite" OnboardingRouteInviteVerify OnboardingRouteKey = "invite.verify" OnboardingRouteInviteAccept OnboardingRouteKey = "invite.accept" OnboardingRouteRegister OnboardingRouteKey = "register" OnboardingRouteRegisterConfirm OnboardingRouteKey = "register.confirm" OnboardingRoutePasswordResetRequest OnboardingRouteKey = "password.reset.request" OnboardingRoutePasswordResetConfirm OnboardingRouteKey = "password.reset.confirm" OnboardingRouteTokenMetadata OnboardingRouteKey = "token.metadata" )
type OnboardingRouteOption ¶ added in v0.19.0
type OnboardingRouteOption func(*onboardingRouteOptions)
OnboardingRouteOption customizes onboarding route registration.
func WithOnboardingAuth ¶ added in v0.19.0
func WithOnboardingAuth(auth admin.HandlerAuthenticator) OnboardingRouteOption
WithOnboardingAuth configures the handler authenticator for protected routes.
func WithOnboardingBasePath ¶ added in v0.19.0
func WithOnboardingBasePath(basePath string) OnboardingRouteOption
WithOnboardingBasePath overrides the onboarding API base path.
func WithOnboardingProtectedRoutes ¶ added in v0.19.0
func WithOnboardingProtectedRoutes(keys ...OnboardingRouteKey) OnboardingRouteOption
WithOnboardingProtectedRoutes overrides which routes should be auth-wrapped.
func WithOnboardingRoutePaths ¶ added in v0.19.0
func WithOnboardingRoutePaths(paths OnboardingRoutePaths) OnboardingRouteOption
WithOnboardingRoutePaths overrides specific onboarding route paths.
type OnboardingRoutePaths ¶ added in v0.19.0
type OnboardingRoutePaths struct {
Invite string
InviteVerify string
InviteAccept string
Register string
RegisterConfirm string
PasswordResetRequest string
PasswordResetConfirm string
TokenMetadata string
}
OnboardingRoutePaths captures full route paths for onboarding endpoints.
func DefaultOnboardingRoutePaths ¶ added in v0.19.0
func DefaultOnboardingRoutePaths(basePath string) OnboardingRoutePaths
DefaultOnboardingRoutePaths builds onboarding API paths from the base path.
type PanelDataGridConfigOptions ¶ added in v0.25.0
type PanelDataGridConfigOptions struct {
TableID string
APIEndpoint string
ActionBase string
PreferencesEndpoint string
ColumnStorageKey string
EnableGroupedMode bool
DefaultViewMode string
GroupByField string
TranslationUX bool
StateStore PanelDataGridStateStoreOptions
URLState PanelDataGridURLStateOptions
}
PanelDataGridConfigOptions configures datagrid wiring for panel templates.
type PanelDataGridStateStoreOptions ¶ added in v0.25.0
PanelDataGridStateStoreOptions configures datagrid state store wiring for templates.
type PanelDataGridURLStateOptions ¶ added in v0.25.0
type PanelDataGridURLStateOptions struct {
MaxURLLength int
MaxFiltersLength int
EnableStateToken *bool
}
PanelDataGridURLStateOptions configures datagrid URL sync limits.
type PanelViewCapabilityOptions ¶ added in v0.25.0
type PanelViewCapabilityOptions struct {
BasePath string
URLResolver urlkit.Resolver
Definition string
Variant string
ExportEndpoint string
DataGrid PanelDataGridConfigOptions
}
PanelViewCapabilityOptions configures capability context derived for panel templates.
type PathViewContextConfig ¶ added in v0.25.0
type PathViewContextConfig struct {
BasePath string
APIBasePath string
AssetBasePath string
URLResolver urlkit.Resolver
}
PathViewContextConfig describes how base/api/asset paths should be injected into a view context.
type PermissionDefinition ¶
PermissionDefinition describes a permission entry for registration.
func PreferencesPermissions ¶
func PreferencesPermissions() []PermissionDefinition
PreferencesPermissions returns the default permissions for preferences.
func TranslationExchangePermissions ¶ added in v0.25.0
func TranslationExchangePermissions() []PermissionDefinition
TranslationExchangePermissions returns default permissions for translation exchange flows.
func TranslationQueuePermissions ¶ added in v0.25.0
func TranslationQueuePermissions() []PermissionDefinition
TranslationQueuePermissions returns default permissions for translation queue flows.
type PermissionRegisterFunc ¶
type PermissionRegisterFunc func(def PermissionDefinition) error
PermissionRegisterFunc registers a permission definition with a host registry.
type PlacementConfig ¶
PlacementConfig maps logical placements to menu codes and dashboard areas.
func DefaultPlacements ¶
func DefaultPlacements(cfg admin.Config) PlacementConfig
DefaultPlacements builds a placement map seeded with defaults.
func (PlacementConfig) DashboardAreaFor ¶
func (p PlacementConfig) DashboardAreaFor(placement, fallback string) string
DashboardAreaFor returns the dashboard area for a placement, with fallback support.
func (PlacementConfig) MenuCodeFor ¶
func (p PlacementConfig) MenuCodeFor(placement, fallback string) string
MenuCodeFor returns the menu code for a placement, falling back to the provided default.
type PreferencesModuleOption ¶ added in v0.24.0
type PreferencesModuleOption func(*admin.PreferencesModule)
PreferencesModuleOption customizes the Preferences module wiring in quickstart.
func WithPreferencesJSONEditorStrict ¶ added in v0.24.0
func WithPreferencesJSONEditorStrict(strict bool) PreferencesModuleOption
WithPreferencesJSONEditorStrict toggles client-side JSON editor strictness.
func WithPreferencesSchemaPath ¶ added in v0.24.0
func WithPreferencesSchemaPath(path string) PreferencesModuleOption
WithPreferencesSchemaPath overrides the preferences form schema path.
type RegistrationUIOption ¶ added in v0.19.0
type RegistrationUIOption func(*registrationUIOptions)
RegistrationUIOption customizes the registration UI route.
func WithRegistrationUIBasePath ¶ added in v0.19.0
func WithRegistrationUIBasePath(basePath string) RegistrationUIOption
WithRegistrationUIBasePath overrides the base path used by registration UI routes.
func WithRegistrationUIEnabled ¶ added in v0.19.0
func WithRegistrationUIEnabled(fn func(admin.Config) bool) RegistrationUIOption
WithRegistrationUIEnabled overrides the self-registration feature guard.
func WithRegistrationUIFeatureGate ¶ added in v0.20.0
func WithRegistrationUIFeatureGate(gate fggate.FeatureGate) RegistrationUIOption
WithRegistrationUIFeatureGate sets the feature gate used for default guards.
func WithRegistrationUIMode ¶ added in v0.19.0
func WithRegistrationUIMode(fn func(admin.Config) string) RegistrationUIOption
WithRegistrationUIMode overrides the registration mode label in the view context.
func WithRegistrationUIPasswordResetPath ¶ added in v0.19.0
func WithRegistrationUIPasswordResetPath(route string) RegistrationUIOption
WithRegistrationUIPasswordResetPath overrides the password reset route path.
func WithRegistrationUIRegisterPath ¶ added in v0.19.0
func WithRegistrationUIRegisterPath(route string) RegistrationUIOption
WithRegistrationUIRegisterPath overrides the registration route path.
func WithRegistrationUITemplate ¶ added in v0.19.0
func WithRegistrationUITemplate(name string) RegistrationUIOption
WithRegistrationUITemplate overrides the registration template name.
func WithRegistrationUIThemeAssets ¶ added in v0.19.0
func WithRegistrationUIThemeAssets(prefix string, assets map[string]string) RegistrationUIOption
WithRegistrationUIThemeAssets sets theme assets (logo, favicon, etc.) for registration UI templates. The prefix is prepended to each asset filename to form the full URL path. Assets are exposed in templates as theme.assets.logo, theme.assets.favicon, etc.
func WithRegistrationUITitle ¶ added in v0.19.0
func WithRegistrationUITitle(title string) RegistrationUIOption
WithRegistrationUITitle overrides the registration view title.
func WithRegistrationUIViewContextBuilder ¶ added in v0.19.0
func WithRegistrationUIViewContextBuilder(builder RegistrationUIViewContextBuilder) RegistrationUIOption
WithRegistrationUIViewContextBuilder overrides the default view context builder.
type RegistrationUIViewContextBuilder ¶ added in v0.19.0
type RegistrationUIViewContextBuilder func(ctx router.ViewContext, c router.Context) router.ViewContext
RegistrationUIViewContextBuilder mutates the view context for registration routes.
type RequestIPContext ¶ added in v0.26.0
RequestIPContext captures the request methods needed to resolve client IP.
type RequestIPOptions ¶ added in v0.26.0
type RequestIPOptions struct {
// TrustForwardedHeaders enables X-Forwarded-For, Forwarded, and X-Real-IP resolution.
// Keep disabled unless your runtime sits behind a trusted proxy that sanitizes these headers.
TrustForwardedHeaders bool
}
RequestIPOptions controls request IP extraction behavior.
type RolesUIOption ¶ added in v0.22.0
type RolesUIOption func(*rolesUIOptions)
func WithRolesBasePath ¶ added in v0.22.0
func WithRolesBasePath(basePath string) RolesUIOption
WithRolesBasePath overrides the base path used to build role routes.
func WithRolesFormGenerator ¶ added in v0.22.0
func WithRolesFormGenerator(formGen *formgenorchestrator.Orchestrator) RolesUIOption
WithRolesFormGenerator uses a custom form generator.
func WithRolesTemplates ¶ added in v0.22.0
func WithRolesTemplates(list, form, detail string) RolesUIOption
WithRolesTemplates overrides the template names for roles UI.
func WithRolesUIViewContext ¶ added in v0.22.0
func WithRolesUIViewContext(builder UIViewContextBuilder) RolesUIOption
WithRolesUIViewContext overrides the view context builder for roles routes.
type ScopeConfig ¶ added in v0.24.0
ScopeConfig captures the quickstart scope behavior.
func DefaultScopeConfig ¶ added in v0.24.0
func DefaultScopeConfig() ScopeConfig
DefaultScopeConfig returns single-tenant defaults aligned with demo seeds.
func NormalizeScopeConfig ¶ added in v0.24.0
func NormalizeScopeConfig(cfg ScopeConfig) ScopeConfig
NormalizeScopeConfig ensures mode/defaults are set consistently.
func ScopeConfigFromAdmin ¶ added in v0.24.0
func ScopeConfigFromAdmin(cfg admin.Config) ScopeConfig
ScopeConfigFromAdmin maps admin.Config into a normalized ScopeConfig.
type ScopeDebugActor ¶ added in v0.24.0
type ScopeDebugActor struct {
ID string `json:"id,omitempty"`
Subject string `json:"subject,omitempty"`
Role string `json:"role,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
ImpersonatorID string `json:"impersonator_id,omitempty"`
IsImpersonated bool `json:"is_impersonated,omitempty"`
ResourceRoles map[string]string `json:"resource_roles,omitempty"`
}
ScopeDebugActor captures actor context for a scope entry.
type ScopeDebugBuffer ¶ added in v0.24.0
type ScopeDebugBuffer struct {
// contains filtered or unexported fields
}
ScopeDebugBuffer stores recent scope debug entries.
func NewScopeDebugBuffer ¶ added in v0.24.0
func NewScopeDebugBuffer(limit int) *ScopeDebugBuffer
NewScopeDebugBuffer allocates a buffer for scope debug entries.
func (*ScopeDebugBuffer) Add ¶ added in v0.24.0
func (b *ScopeDebugBuffer) Add(entry ScopeDebugEntry)
Add appends a scope debug entry to the buffer.
func (*ScopeDebugBuffer) Clear ¶ added in v0.24.0
func (b *ScopeDebugBuffer) Clear() error
Clear removes all buffered scope debug entries.
func (*ScopeDebugBuffer) Snapshot ¶ added in v0.24.0
func (b *ScopeDebugBuffer) Snapshot() ScopeDebugSnapshot
Snapshot returns a copy of the buffered scope debug entries.
type ScopeDebugClaims ¶ added in v0.24.0
type ScopeDebugClaims struct {
Subject string `json:"subject,omitempty"`
UserID string `json:"user_id,omitempty"`
Role string `json:"role,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
ScopeDebugClaims captures JWT claims context for a scope entry.
type ScopeDebugDefaults ¶ added in v0.24.0
type ScopeDebugDefaults struct {
TenantID bool `json:"tenant_id,omitempty"`
OrgID bool `json:"org_id,omitempty"`
}
ScopeDebugDefaults records which defaults were applied.
type ScopeDebugEntry ¶ added in v0.24.0
type ScopeDebugEntry struct {
Timestamp time.Time `json:"timestamp"`
Method string `json:"method,omitempty"`
Path string `json:"path,omitempty"`
ScopeMode string `json:"scope_mode,omitempty"`
Actor ScopeDebugActor `json:"actor,omitempty"`
Claims ScopeDebugClaims `json:"claims,omitempty"`
RawScope ScopeDebugScope `json:"raw_scope,omitempty"`
ResolvedScope ScopeDebugScope `json:"resolved_scope,omitempty"`
DefaultScope ScopeDebugScope `json:"default_scope,omitempty"`
DefaultsApplied ScopeDebugDefaults `json:"defaults_applied,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Query map[string]string `json:"query,omitempty"`
RouteParams map[string]string `json:"route_params,omitempty"`
RequestID string `json:"request_id,omitempty"`
Extra map[string]any `json:"extra,omitempty"`
}
ScopeDebugEntry captures a request scope resolution snapshot.
type ScopeDebugScope ¶ added in v0.24.0
type ScopeDebugScope struct {
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
}
ScopeDebugScope represents tenant/org values in scope debug.
type ScopeDebugSnapshot ¶ added in v0.24.0
type ScopeDebugSnapshot struct {
UpdatedAt time.Time `json:"updated_at"`
Count int `json:"count"`
Limit int `json:"limit"`
Entries []ScopeDebugEntry `json:"entries"`
}
ScopeDebugSnapshot holds scope debug entries for the debug API.
type ScopeMode ¶ added in v0.24.0
type ScopeMode string
ScopeMode controls how tenant/org defaults are applied.
type SecureLinkConfig ¶ added in v0.19.0
type SecureLinkConfig struct {
SigningKey string
Expiration time.Duration
BaseURL string
QueryKey string
AsQuery bool
Routes map[string]string
}
SecureLinkConfig captures securelink defaults for onboarding flows.
func DefaultSecureLinkConfig ¶ added in v0.26.0
func DefaultSecureLinkConfig(basePath string) SecureLinkConfig
DefaultSecureLinkConfig returns securelink defaults for onboarding flows.
func (SecureLinkConfig) Enabled ¶ added in v0.19.0
func (c SecureLinkConfig) Enabled() bool
Enabled reports whether the config has enough data to build a manager.
func (SecureLinkConfig) GetAsQuery ¶ added in v0.19.0
func (c SecureLinkConfig) GetAsQuery() bool
func (SecureLinkConfig) GetBaseURL ¶ added in v0.19.0
func (c SecureLinkConfig) GetBaseURL() string
func (SecureLinkConfig) GetExpiration ¶ added in v0.19.0
func (c SecureLinkConfig) GetExpiration() time.Duration
func (SecureLinkConfig) GetQueryKey ¶ added in v0.19.0
func (c SecureLinkConfig) GetQueryKey() string
func (SecureLinkConfig) GetRoutes ¶ added in v0.19.0
func (c SecureLinkConfig) GetRoutes() map[string]string
func (SecureLinkConfig) GetSigningKey ¶ added in v0.19.0
func (c SecureLinkConfig) GetSigningKey() string
type SecureLinkManagerSetter ¶ added in v0.19.0
type SecureLinkManagerSetter interface {
WithSecureLinkManager(userstypes.SecureLinkManager)
}
SecureLinkManagerSetter allows injecting securelink managers into host components.
type SecureLinkUIConfig ¶ added in v0.19.0
SecureLinkUIConfig exposes link parsing details for templates.
func SecureLinkUIConfigFromConfig ¶ added in v0.26.0
func SecureLinkUIConfigFromConfig(cfg SecureLinkConfig) SecureLinkUIConfig
SecureLinkUIConfigFromConfig reads securelink parsing defaults from config.
type SecureLinkUsersOption ¶ added in v0.19.0
type SecureLinkUsersOption func(*secureLinkUsersOptions)
SecureLinkUsersOption customizes go-users securelink wiring.
func WithSecureLinkInviteRoute ¶ added in v0.19.0
func WithSecureLinkInviteRoute(route string) SecureLinkUsersOption
WithSecureLinkInviteRoute overrides the invite accept route key used by go-users.
func WithSecureLinkPasswordResetRoute ¶ added in v0.19.0
func WithSecureLinkPasswordResetRoute(route string) SecureLinkUsersOption
WithSecureLinkPasswordResetRoute overrides the password reset route key used by go-users.
func WithSecureLinkRegistrationRoute ¶ added in v0.19.0
func WithSecureLinkRegistrationRoute(route string) SecureLinkUsersOption
WithSecureLinkRegistrationRoute overrides the registration route key used by go-users.
type SeedLocalizedNavigationOptions ¶ added in v0.26.0
type SeedLocalizedNavigationOptions struct {
AutoCreateParents bool
}
SeedLocalizedNavigationOptions drives localized menu seeding with stable menu IDs.
type SeedNavigationOptions ¶
type SeedNavigationOptions struct {
AutoCreateParents bool
}
SeedNavigationOptions drives the quickstart menu seeding workflow.
type SessionUser ¶
type SessionUser struct {
ID string `json:"id,omitempty"`
Subject string `json:"subject,omitempty"`
Username string `json:"username,omitempty"`
Email string `json:"email,omitempty"`
Role string `json:"role,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
Environment string `json:"environment,omitempty"`
ResourceRoles map[string]string `json:"resource_roles,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Scopes []string `json:"scopes,omitempty"`
IssuedAt *time.Time `json:"issued_at,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
IsAuthenticated bool `json:"is_authenticated"`
DisplayName string `json:"display_name,omitempty"`
Subtitle string `json:"subtitle,omitempty"`
Initial string `json:"initial,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"`
}
SessionUser captures session metadata to expose in templates and APIs.
func ApplyScopeDefaultsToSession ¶ added in v0.24.0
func ApplyScopeDefaultsToSession(session SessionUser, cfg admin.Config) SessionUser
ApplyScopeDefaultsToSession backfills tenant/org values for single-tenant mode.
func BuildSessionUser ¶
func BuildSessionUser(ctx context.Context) SessionUser
BuildSessionUser extracts actor/claims data from the request context.
func FilterSessionUser ¶
func FilterSessionUser(session SessionUser, gate fggate.FeatureGate) SessionUser
FilterSessionUser hides tenant/org data when those features are disabled.
func (SessionUser) ToViewContext ¶
func (s SessionUser) ToViewContext() map[string]any
ToViewContext converts the session into snake_case keys for templates.
type SettingsUIOption ¶ added in v0.24.0
type SettingsUIOption func(*settingsUIOptions)
SettingsUIOption customizes the settings UI wiring.
func WithSettingsUIActive ¶ added in v0.24.0
func WithSettingsUIActive(active string) SettingsUIOption
WithSettingsUIActive overrides the active navigation key.
func WithSettingsUIRoute ¶ added in v0.24.0
func WithSettingsUIRoute(route string) SettingsUIOption
WithSettingsUIRoute overrides the URLKit admin route key.
func WithSettingsUITemplate ¶ added in v0.24.0
func WithSettingsUITemplate(name string) SettingsUIOption
WithSettingsUITemplate overrides the settings template name.
type SharedActivitySinks ¶ added in v0.19.0
type SharedActivitySinks struct {
}
SharedActivitySinks bundles the admin + go-auth adapters.
func NewSharedActivitySinks ¶ added in v0.19.0
func NewSharedActivitySinks(primary admin.ActivitySink, hooks dashboardactivity.Hooks, cfg dashboardactivity.Config, opts ...GoAuthActivitySinkOption) SharedActivitySinks
NewSharedActivitySinks builds a shared activity sink for admin/go-users/go-auth.
type StartupPolicy ¶ added in v0.25.0
type StartupPolicy = admin.ModuleStartupPolicy
StartupPolicy controls how module startup validation errors are handled.
const ( // StartupPolicyEnforce fails startup when module startup validation fails. StartupPolicyEnforce StartupPolicy = admin.ModuleStartupPolicyEnforce // StartupPolicyWarn logs startup validation failures and continues. StartupPolicyWarn StartupPolicy = admin.ModuleStartupPolicyWarn )
type StaticAssetsOption ¶
type StaticAssetsOption func(*staticAssetsOptions)
StaticAssetsOption customizes the asset mounting behavior.
func WithAssetsPrefix ¶
func WithAssetsPrefix(prefix string) StaticAssetsOption
WithAssetsPrefix overrides the base assets route prefix.
func WithDiskAssetsDir ¶
func WithDiskAssetsDir(dir string) StaticAssetsOption
WithDiskAssetsDir configures a disk-backed asset directory (for dev overrides).
func WithDiskAssetsFS ¶
func WithDiskAssetsFS(fsys fs.FS) StaticAssetsOption
WithDiskAssetsFS supplies a disk asset filesystem directly.
func WithEChartsPrefix ¶
func WithEChartsPrefix(prefix string) StaticAssetsOption
WithEChartsPrefix overrides the go-dashboard ECharts assets prefix.
func WithExtraAssetsFS ¶
func WithExtraAssetsFS(fsys ...fs.FS) StaticAssetsOption
WithExtraAssetsFS appends additional asset fallbacks.
func WithFormgenPrefix ¶
func WithFormgenPrefix(prefix string) StaticAssetsOption
WithFormgenPrefix overrides the formgen assets route prefix.
func WithRuntimePrefix ¶
func WithRuntimePrefix(prefix string) StaticAssetsOption
WithRuntimePrefix overrides the formgen runtime route prefix.
func WithSidebarAssetsFS ¶
func WithSidebarAssetsFS(fsys fs.FS) StaticAssetsOption
WithSidebarAssetsFS overrides the default quickstart sidebar assets.
type TemplateFuncOption ¶
type TemplateFuncOption func(*templateFuncOptions)
TemplateFuncOption customizes default template functions.
func WithTemplateBasePath ¶ added in v0.24.0
func WithTemplateBasePath(basePath string) TemplateFuncOption
WithTemplateBasePath configures the fallback base path used by adminURL helper.
func WithTemplateFeatureGate ¶ added in v0.20.0
func WithTemplateFeatureGate(gate fggate.FeatureGate, opts ...fgtemplates.HelperOption) TemplateFuncOption
WithTemplateFeatureGate registers feature template helpers using the provided gate.
func WithTemplateIconRenderer ¶ added in v0.25.0
func WithTemplateIconRenderer(renderFunc func(ref string, variant string) string) TemplateFuncOption
WithTemplateIconRenderer injects an icon renderer for template functions. The render function takes (ref string, variant string) and returns HTML. If not provided, templates use the built-in legacy icon rendering.
func WithTemplateURLResolver ¶ added in v0.24.0
func WithTemplateURLResolver(urls urlkit.Resolver) TemplateFuncOption
WithTemplateURLResolver configures the URLKit resolver used by adminURL helper.
func WithWidgetTitleFunc ¶
func WithWidgetTitleFunc(fn func(string) string) TemplateFuncOption
WithWidgetTitleFunc replaces the widget title resolver.
func WithWidgetTitleMap ¶
func WithWidgetTitleMap(titles map[string]string) TemplateFuncOption
WithWidgetTitleMap replaces the default widget title map.
func WithWidgetTitleOverrides ¶
func WithWidgetTitleOverrides(overrides map[string]string) TemplateFuncOption
WithWidgetTitleOverrides updates the default widget title map.
type TemplateIconRenderer ¶ added in v0.25.0
type TemplateIconRenderer interface {
RenderFromString(rawRef string, trusted bool, variant string) string
}
TemplateIconRenderer defines the interface for rendering icons in templates. This is satisfied by admin.IconService.
type ThemeOption ¶
type ThemeOption func(*themeOptions)
ThemeOption customizes the default theme manifest/registry.
func WithThemeAssets ¶
func WithThemeAssets(prefix string, files map[string]string) ThemeOption
WithThemeAssets configures default assets for the manifest.
func WithThemeManifest ¶
func WithThemeManifest(manifest *theme.Manifest) ThemeOption
WithThemeManifest overrides the default manifest entirely.
func WithThemeRegistry ¶
func WithThemeRegistry(registry theme.Registry) ThemeOption
WithThemeRegistry supplies a registry for theme registration.
func WithThemeVariants ¶
func WithThemeVariants(variants map[string]theme.Variant) ThemeOption
WithThemeVariants overrides the default variant definitions.
type TranslationCapabilityMenuMode ¶ added in v0.25.0
type TranslationCapabilityMenuMode string
TranslationCapabilityMenuMode controls whether quickstart seeds translation capability menu items into the server-side navigation tree.
const ( // TranslationCapabilityMenuModeNone keeps translation links out of server-seeded menus. // Use this when translation links are intentionally omitted from server-seeded navigation. TranslationCapabilityMenuModeNone TranslationCapabilityMenuMode = "none" // TranslationCapabilityMenuModeTools seeds translation links into a dedicated Translations group. // The name is retained for backward compatibility. TranslationCapabilityMenuModeTools TranslationCapabilityMenuMode = "tools" )
type TranslationChecker ¶ added in v0.24.0
type TranslationChecker interface {
CheckTranslations(ctx context.Context, id uuid.UUID, required []string, opts cmsinterfaces.TranslationCheckOptions) ([]string, error)
}
TranslationChecker is the minimal contract needed to validate translations.
type TranslationCriteria ¶ added in v0.24.0
type TranslationCriteria struct {
Locales []string `json:"locales,omitempty"`
RequiredFields map[string][]string `json:"required_fields,omitempty"`
}
TranslationCriteria captures locale/field requirements for a transition or environment.
type TranslationExchangeAsyncApplyFunc ¶ added in v0.25.0
type TranslationExchangeAsyncApplyFunc func(context.Context, admin.TranslationImportApplyInput) (admin.TranslationExchangeResult, error)
TranslationExchangeAsyncApplyFunc allows hosts to hand off apply flows to async backends. The implementation may enqueue work and return a queued/accepted result contract.
type TranslationExchangeConfig ¶ added in v0.25.0
type TranslationExchangeConfig struct {
Enabled bool `json:"enabled,omitempty"`
Store admin.TranslationExchangeStore `json:"-"`
Exporter admin.TranslationExchangeExporter `json:"-"`
Validator admin.TranslationExchangeValidator `json:"-"`
Applier admin.TranslationExchangeApplier `json:"-"`
AsyncApply TranslationExchangeAsyncApplyFunc `json:"-"`
PermissionRegister PermissionRegisterFunc `json:"-"`
}
TranslationExchangeConfig configures optional translation exchange wiring in quickstart.
type TranslationPolicyConfig ¶ added in v0.24.0
type TranslationPolicyConfig struct {
// DenyByDefault blocks transitions when no explicit requirements are configured.
DenyByDefault bool `json:"deny_by_default,omitempty"`
// RequiredFieldsStrategy controls how unknown required-field keys are handled.
// Valid values: error, warn, ignore (defaults to error).
RequiredFieldsStrategy admin.RequiredFieldsValidationStrategy `json:"required_fields_strategy,omitempty"`
// PageEntities declares policy entities that should prefer the page translation
// checker when both page/content checkers are configured.
PageEntities []string `json:"page_entities,omitempty"`
// EntityAliases maps input policy entities to canonical policy keys.
// Useful for irregular nouns or legacy names that singular/plural inflection
// cannot resolve deterministically.
EntityAliases map[string]string `json:"entity_aliases,omitempty"`
// Required maps entity -> transition -> requirements.
Required map[string]TranslationPolicyEntityConfig `json:"required,omitempty"`
}
TranslationPolicyConfig captures translation enforcement rules for workflow transitions. Defaults are permissive (no enforcement) unless requirements are configured.
func DefaultContentTranslationPolicyConfig ¶ added in v0.25.0
func DefaultContentTranslationPolicyConfig() TranslationPolicyConfig
DefaultContentTranslationPolicyConfig returns a permissive, content-type agnostic baseline with no built-in entity assumptions.
func DefaultTranslationPolicyConfig ¶ added in v0.24.0
func DefaultTranslationPolicyConfig() TranslationPolicyConfig
DefaultTranslationPolicyConfig returns permissive defaults (no enforcement).
func NormalizeTranslationPolicyConfig ¶ added in v0.24.0
func NormalizeTranslationPolicyConfig(cfg TranslationPolicyConfig) TranslationPolicyConfig
NormalizeTranslationPolicyConfig applies defaults and normalizes strategy values.
type TranslationPolicyEntityCatalog ¶ added in v0.25.0
type TranslationPolicyEntityCatalog struct {
Transitions map[string]TranslationPolicyTransitionCatalog
}
TranslationPolicyEntityCatalog describes known transitions and field keys for one entity.
type TranslationPolicyEntityConfig ¶ added in v0.24.0
type TranslationPolicyEntityConfig map[string]TranslationPolicyTransitionConfig
TranslationPolicyEntityConfig maps transition names to requirements.
type TranslationPolicyServices ¶ added in v0.24.0
type TranslationPolicyServices struct {
Pages TranslationChecker
Content TranslationChecker
}
TranslationPolicyServices supplies translation checkers for pages and content.
type TranslationPolicyTransitionCatalog ¶ added in v0.25.0
type TranslationPolicyTransitionCatalog struct {
RequiredFields []string
}
TranslationPolicyTransitionCatalog describes known required-field keys for one transition.
type TranslationPolicyTransitionConfig ¶ added in v0.24.0
type TranslationPolicyTransitionConfig struct {
Locales []string `json:"locales,omitempty"`
RequiredFields map[string][]string `json:"required_fields,omitempty"`
Environments map[string]TranslationCriteria `json:"environments,omitempty"`
}
TranslationPolicyTransitionConfig describes requirements for a transition and optional environments.
type TranslationPolicyValidationCatalog ¶ added in v0.25.0
type TranslationPolicyValidationCatalog struct {
Entities map[string]TranslationPolicyEntityCatalog
}
TranslationPolicyValidationCatalog describes known policy entities/transitions/fields. Validation is optional and used by hosts that want strict startup checks.
func DefaultTranslationPolicyValidationCatalog ¶ added in v0.25.0
func DefaultTranslationPolicyValidationCatalog() TranslationPolicyValidationCatalog
DefaultTranslationPolicyValidationCatalog is empty by default so hosts can supply their own entity catalogs.
type TranslationPolicyValidationResult ¶ added in v0.25.0
type TranslationPolicyValidationResult struct {
Warnings []string
}
TranslationPolicyValidationResult includes non-fatal warnings produced by validation.
func ValidateTranslationPolicyConfig ¶ added in v0.25.0
func ValidateTranslationPolicyConfig(cfg TranslationPolicyConfig, catalog TranslationPolicyValidationCatalog) (TranslationPolicyValidationResult, error)
ValidateTranslationPolicyConfig validates policy keys against a known catalog. Strategy controls unknown-key handling: - error: returns an error - warn: records warnings - ignore: suppresses unknown-key issues
type TranslationProductConfig ¶ added in v0.25.0
type TranslationProductConfig struct {
SchemaVersion int `json:"schema_version,omitempty"`
Profile TranslationProfile `json:"profile,omitempty"`
Exchange *TranslationExchangeConfig `json:"exchange,omitempty"`
Queue *TranslationQueueConfig `json:"queue,omitempty"`
}
TranslationProductConfig configures productized translation capabilities.
type TranslationProfile ¶ added in v0.25.0
type TranslationProfile string
TranslationProfile defines the quickstart translation capability profile.
const ( TranslationProfileNone TranslationProfile = "none" TranslationProfileCore TranslationProfile = "core" TranslationProfileCoreExchange TranslationProfile = "core+exchange" TranslationProfileCoreQueue TranslationProfile = "core+queue" TranslationProfileFull TranslationProfile = "full" )
type TranslationQueueConfig ¶ added in v0.25.0
type TranslationQueueConfig struct {
Enabled bool `json:"enabled,omitempty"`
EnableOpenPool bool `json:"enable_open_pool"`
EnableDashboard bool `json:"enable_dashboard_widget"`
EnableNotifications bool `json:"enable_notifications"`
EnableAutoCreate bool `json:"enable_auto_create"`
DefaultPriority string `json:"default_priority,omitempty"`
SupportedLocales []string `json:"supported_locales,omitempty"`
Repository admin.TranslationAssignmentRepository `json:"-"`
Service admin.TranslationQueueService `json:"-"`
PermissionRegister PermissionRegisterFunc `json:"-"`
}
TranslationQueueConfig configures optional translation queue wiring in quickstart.
type UIRouteOption ¶ added in v0.13.0
type UIRouteOption func(*uiRouteOptions)
UIRouteOption customizes the default UI route wiring.
func WithUIActivityActive ¶ added in v0.14.0
func WithUIActivityActive(active string) UIRouteOption
WithUIActivityActive sets the active menu key for the activity route.
func WithUIActivityPath ¶ added in v0.14.0
func WithUIActivityPath(route string) UIRouteOption
WithUIActivityPath overrides the activity route path.
func WithUIActivityRoute ¶ added in v0.14.0
func WithUIActivityRoute(enabled bool) UIRouteOption
WithUIActivityRoute toggles the activity route registration.
func WithUIActivityTemplate ¶ added in v0.14.0
func WithUIActivityTemplate(name string) UIRouteOption
WithUIActivityTemplate overrides the activity template name.
func WithUIActivityTitle ¶ added in v0.14.0
func WithUIActivityTitle(title string) UIRouteOption
WithUIActivityTitle overrides the activity view title.
func WithUIBasePath ¶ added in v0.13.0
func WithUIBasePath(basePath string) UIRouteOption
WithUIBasePath overrides the base path used to build default routes.
func WithUIDashboardActive ¶ added in v0.13.0
func WithUIDashboardActive(active string) UIRouteOption
WithUIDashboardActive sets the active menu key for the dashboard route.
func WithUIDashboardPath ¶ added in v0.13.0
func WithUIDashboardPath(route string) UIRouteOption
WithUIDashboardPath overrides the dashboard route path.
func WithUIDashboardRoute ¶ added in v0.13.0
func WithUIDashboardRoute(enabled bool) UIRouteOption
WithUIDashboardRoute toggles the dashboard route registration.
func WithUIDashboardTemplate ¶ added in v0.13.0
func WithUIDashboardTemplate(name string) UIRouteOption
WithUIDashboardTemplate overrides the dashboard template name.
func WithUIDashboardTitle ¶ added in v0.13.0
func WithUIDashboardTitle(title string) UIRouteOption
WithUIDashboardTitle overrides the dashboard view title.
func WithUIFeatureFlagsActive ¶ added in v0.21.0
func WithUIFeatureFlagsActive(active string) UIRouteOption
WithUIFeatureFlagsActive sets the active menu key for the feature flags route.
func WithUIFeatureFlagsPath ¶ added in v0.21.0
func WithUIFeatureFlagsPath(route string) UIRouteOption
WithUIFeatureFlagsPath overrides the feature flags route path.
func WithUIFeatureFlagsRoute ¶ added in v0.21.0
func WithUIFeatureFlagsRoute(enabled bool) UIRouteOption
WithUIFeatureFlagsRoute toggles the feature flags route registration.
func WithUIFeatureFlagsTemplate ¶ added in v0.21.0
func WithUIFeatureFlagsTemplate(name string) UIRouteOption
WithUIFeatureFlagsTemplate overrides the feature flags template name.
func WithUIFeatureFlagsTitle ¶ added in v0.21.0
func WithUIFeatureFlagsTitle(title string) UIRouteOption
WithUIFeatureFlagsTitle overrides the feature flags view title.
func WithUINotificationsActive ¶ added in v0.13.0
func WithUINotificationsActive(active string) UIRouteOption
WithUINotificationsActive sets the active menu key for the notifications route.
func WithUINotificationsPath ¶ added in v0.13.0
func WithUINotificationsPath(route string) UIRouteOption
WithUINotificationsPath overrides the notifications route path.
func WithUINotificationsRoute ¶ added in v0.13.0
func WithUINotificationsRoute(enabled bool) UIRouteOption
WithUINotificationsRoute toggles the notifications route registration.
func WithUINotificationsTemplate ¶ added in v0.13.0
func WithUINotificationsTemplate(name string) UIRouteOption
WithUINotificationsTemplate overrides the notifications template name.
func WithUINotificationsTitle ¶ added in v0.13.0
func WithUINotificationsTitle(title string) UIRouteOption
WithUINotificationsTitle overrides the notifications view title.
func WithUITranslationDashboardActive ¶ added in v0.25.0
func WithUITranslationDashboardActive(active string) UIRouteOption
WithUITranslationDashboardActive sets the active menu key for the translation dashboard route.
func WithUITranslationDashboardPath ¶ added in v0.25.0
func WithUITranslationDashboardPath(route string) UIRouteOption
WithUITranslationDashboardPath overrides the translation dashboard route path.
func WithUITranslationDashboardRoute ¶ added in v0.25.0
func WithUITranslationDashboardRoute(enabled bool) UIRouteOption
WithUITranslationDashboardRoute toggles the translation dashboard route registration.
func WithUITranslationDashboardTemplate ¶ added in v0.25.0
func WithUITranslationDashboardTemplate(name string) UIRouteOption
WithUITranslationDashboardTemplate overrides the translation dashboard template name.
func WithUITranslationDashboardTitle ¶ added in v0.25.0
func WithUITranslationDashboardTitle(title string) UIRouteOption
WithUITranslationDashboardTitle overrides the translation dashboard view title.
func WithUITranslationExchangeActive ¶ added in v0.25.0
func WithUITranslationExchangeActive(active string) UIRouteOption
WithUITranslationExchangeActive sets the active menu key for the translation exchange route.
func WithUITranslationExchangePath ¶ added in v0.25.0
func WithUITranslationExchangePath(route string) UIRouteOption
WithUITranslationExchangePath overrides the translation exchange route path.
func WithUITranslationExchangeRoute ¶ added in v0.25.0
func WithUITranslationExchangeRoute(enabled bool) UIRouteOption
WithUITranslationExchangeRoute toggles the translation exchange route registration.
func WithUITranslationExchangeTemplate ¶ added in v0.25.0
func WithUITranslationExchangeTemplate(name string) UIRouteOption
WithUITranslationExchangeTemplate overrides the translation exchange template name.
func WithUITranslationExchangeTitle ¶ added in v0.25.0
func WithUITranslationExchangeTitle(title string) UIRouteOption
WithUITranslationExchangeTitle overrides the translation exchange view title.
func WithUIViewContextBuilder ¶ added in v0.13.0
func WithUIViewContextBuilder(builder UIViewContextBuilder) UIRouteOption
WithUIViewContextBuilder overrides the default view context builder.
type UIViewContextBuilder ¶ added in v0.13.0
type UIViewContextBuilder func(ctx router.ViewContext, active string, c router.Context) router.ViewContext
UIViewContextBuilder mutates the view context for UI routes.
func DefaultAdminUIViewContextBuilder ¶ added in v0.24.0
func DefaultAdminUIViewContextBuilder(adm *admin.Admin, cfg admin.Config) UIViewContextBuilder
DefaultAdminUIViewContextBuilder returns the default admin UI view-context builder.
type UploadAuthorizeFunc ¶ added in v0.25.0
UploadAuthorizeFunc validates whether the request context can upload files. Return a non-nil error to block the upload.
type UploadHandlerConfig ¶ added in v0.25.0
type UploadHandlerConfig struct {
BasePath string
DiskAssetsDir string
FormField string
UploadSubdir string
ResolveUploadSubdir UploadSubdirResolver
MaxFileSize int64
AllowedMimeTypes map[string]bool
AllowedImageFormats map[string]bool
Provider uploader.Uploader
Validator *uploader.Validator
Manager *uploader.Manager
Authorize UploadAuthorizeFunc
PublicURL UploadPublicURLFunc
Response UploadResponseFunc
}
UploadHandlerConfig configures a multipart upload endpoint backed by go-uploader.
type UploadPublicURLFunc ¶ added in v0.25.0
UploadPublicURLFunc builds the public URL returned in the JSON response.
type UploadResponseFunc ¶ added in v0.25.0
UploadResponseFunc customizes the JSON response payload.
type UploadSubdirResolver ¶ added in v0.25.0
UploadSubdirResolver resolves the upload subdirectory for the current request.
type UserMigrationObserver ¶ added in v0.26.0
type UserMigrationObserver func(UserMigrationRegistration)
UserMigrationObserver receives ordered migration registration events.
type UserMigrationRegistration ¶ added in v0.26.0
type UserMigrationRegistration struct {
Label string
}
UserMigrationRegistration records one ordered migration registration step.
type UserMigrationsOption ¶ added in v0.19.0
type UserMigrationsOption func(*userMigrationsOptions)
UserMigrationsOption customizes user-related migrations registration.
func WithUserMigrationsAuthBootstrapEnabled ¶ added in v0.19.0
func WithUserMigrationsAuthBootstrapEnabled(enabled bool) UserMigrationsOption
WithUserMigrationsAuthBootstrapEnabled toggles go-users auth bootstrap migrations.
func WithUserMigrationsAuthBootstrapFS ¶ added in v0.19.0
func WithUserMigrationsAuthBootstrapFS(fsys fs.FS) UserMigrationsOption
WithUserMigrationsAuthBootstrapFS overrides go-users auth bootstrap migrations.
func WithUserMigrationsAuthEnabled ¶ added in v0.19.0
func WithUserMigrationsAuthEnabled(enabled bool) UserMigrationsOption
WithUserMigrationsAuthEnabled toggles go-auth migrations.
func WithUserMigrationsAuthExtrasEnabled ¶ added in v0.19.0
func WithUserMigrationsAuthExtrasEnabled(enabled bool) UserMigrationsOption
WithUserMigrationsAuthExtrasEnabled toggles go-users auth extras migrations.
func WithUserMigrationsAuthExtrasFS ¶ added in v0.19.0
func WithUserMigrationsAuthExtrasFS(fsys fs.FS) UserMigrationsOption
WithUserMigrationsAuthExtrasFS overrides go-users auth extras migrations.
func WithUserMigrationsAuthFS ¶ added in v0.19.0
func WithUserMigrationsAuthFS(fsys fs.FS) UserMigrationsOption
WithUserMigrationsAuthFS overrides the go-auth migrations filesystem (rooted at data/sql/migrations).
func WithUserMigrationsCoreEnabled ¶ added in v0.19.0
func WithUserMigrationsCoreEnabled(enabled bool) UserMigrationsOption
WithUserMigrationsCoreEnabled toggles go-users core migrations.
func WithUserMigrationsCoreFS ¶ added in v0.19.0
func WithUserMigrationsCoreFS(fsys fs.FS) UserMigrationsOption
WithUserMigrationsCoreFS overrides the go-users core migrations filesystem (rooted at data/sql/migrations).
func WithUserMigrationsObserver ¶ added in v0.26.0
func WithUserMigrationsObserver(observer UserMigrationObserver) UserMigrationsOption
WithUserMigrationsObserver captures ordered migration registration steps.
func WithUserMigrationsProfile ¶ added in v0.26.0
func WithUserMigrationsProfile(profile UserMigrationsProfile) UserMigrationsOption
WithUserMigrationsProfile sets the canonical user migration registration profile.
func WithUserMigrationsValidationTargets ¶ added in v0.19.0
func WithUserMigrationsValidationTargets(targets ...string) UserMigrationsOption
WithUserMigrationsValidationTargets overrides validation targets used by go-persistence-bun.
type UserMigrationsProfile ¶ added in v0.26.0
type UserMigrationsProfile string
UserMigrationsProfile controls which migration sources are registered.
const ( // UserMigrationsProfileCombined registers go-auth plus go-users core migrations. UserMigrationsProfileCombined UserMigrationsProfile = "combined" // UserMigrationsProfileAuthOnly registers only go-auth migrations. UserMigrationsProfileAuthOnly UserMigrationsProfile = "auth-only" // UserMigrationsProfileUsersStandalone registers go-users standalone tracks. UserMigrationsProfileUsersStandalone UserMigrationsProfile = "users-standalone" )
type ViewEngineOption ¶
type ViewEngineOption func(*viewEngineOptions)
ViewEngineOption customizes the view engine config.
func WithViewAssetsFS ¶
func WithViewAssetsFS(fsys ...fs.FS) ViewEngineOption
WithViewAssetsFS appends asset fallbacks.
func WithViewBasePath ¶ added in v0.24.0
func WithViewBasePath(basePath string) ViewEngineOption
WithViewBasePath sets the fallback admin base path used by template helpers (adminURL).
func WithViewDebug ¶
func WithViewDebug(enabled bool) ViewEngineOption
WithViewDebug toggles view engine debug mode.
func WithViewEmbed ¶
func WithViewEmbed(enabled bool) ViewEngineOption
WithViewEmbed toggles embedded filesystem usage.
func WithViewExt ¶
func WithViewExt(ext string) ViewEngineOption
WithViewExt sets the template extension.
func WithViewFeatureGate ¶ added in v0.20.0
func WithViewFeatureGate(gate fggate.FeatureGate, helperOpts ...fgtemplates.HelperOption) ViewEngineOption
WithViewFeatureGate registers feature template helpers using the provided gate.
func WithViewReload ¶
func WithViewReload(enabled bool) ViewEngineOption
WithViewReload toggles template reload behavior.
func WithViewTemplateFuncs ¶
func WithViewTemplateFuncs(funcs map[string]any) ViewEngineOption
WithViewTemplateFuncs overrides template functions.
func WithViewTemplatesFS ¶
func WithViewTemplatesFS(fsys ...fs.FS) ViewEngineOption
WithViewTemplatesFS appends template fallbacks.
func WithViewURLPrefix ¶
func WithViewURLPrefix(prefix string) ViewEngineOption
WithViewURLPrefix sets the assets URL prefix.
func WithViewURLResolver ¶ added in v0.24.0
func WithViewURLResolver(urls urlkit.Resolver) ViewEngineOption
WithViewURLResolver sets the URLKit resolver used by template helpers.
type WorkflowBindingSpec ¶ added in v0.26.0
type WorkflowBindingSpec struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
ScopeType string `json:"scope_type,omitempty" yaml:"scope_type,omitempty"`
ScopeRef string `json:"scope_ref,omitempty" yaml:"scope_ref,omitempty"`
WorkflowID string `json:"workflow_id,omitempty" yaml:"workflow_id,omitempty"`
Priority int `json:"priority,omitempty" yaml:"priority,omitempty"`
Status string `json:"status,omitempty" yaml:"status,omitempty"`
Environment string `json:"environment,omitempty" yaml:"environment,omitempty"`
}
WorkflowBindingSpec describes one canonical runtime binding in external config.
type WorkflowConfig ¶ added in v0.25.0
type WorkflowConfig struct {
SchemaVersion int `json:"schema_version,omitempty" yaml:"schema_version,omitempty"`
Workflows map[string]WorkflowDefinitionSpec `json:"workflows,omitempty" yaml:"workflows,omitempty"`
Bindings []WorkflowBindingSpec `json:"bindings,omitempty" yaml:"bindings,omitempty"`
TraitDefaults map[string]string `json:"trait_defaults,omitempty" yaml:"trait_defaults,omitempty"`
}
WorkflowConfig captures external workflow definitions and trait workflow defaults.
func DefaultWorkflowConfig ¶ added in v0.25.0
func DefaultWorkflowConfig() WorkflowConfig
DefaultWorkflowConfig returns an empty config with current schema version.
func LoadWorkflowConfigFile ¶ added in v0.25.0
func LoadWorkflowConfigFile(path string) (WorkflowConfig, error)
LoadWorkflowConfigFile parses a JSON/YAML workflow config file.
func MergeWorkflowConfigs ¶ added in v0.25.0
func MergeWorkflowConfigs(base WorkflowConfig, override WorkflowConfig) WorkflowConfig
MergeWorkflowConfigs merges two configs where override values win.
func NormalizeWorkflowConfig ¶ added in v0.25.0
func NormalizeWorkflowConfig(cfg WorkflowConfig) WorkflowConfig
NormalizeWorkflowConfig normalizes config maps and scalar fields.
func ParseWorkflowConfigContents ¶ added in v0.25.0
func ParseWorkflowConfigContents(raw []byte, ext string) (WorkflowConfig, error)
ParseWorkflowConfigContents parses JSON/YAML workflow config contents.
type WorkflowConfigValidationError ¶ added in v0.25.0
type WorkflowConfigValidationError struct {
Issues []WorkflowConfigValidationIssue `json:"issues"`
}
WorkflowConfigValidationError aggregates config validation issues.
func (WorkflowConfigValidationError) Error ¶ added in v0.25.0
func (e WorkflowConfigValidationError) Error() string
func (WorkflowConfigValidationError) Is ¶ added in v0.25.0
func (e WorkflowConfigValidationError) Is(target error) bool
type WorkflowConfigValidationIssue ¶ added in v0.25.0
type WorkflowConfigValidationIssue struct {
Field string `json:"field"`
Message string `json:"message"`
}
WorkflowConfigValidationIssue reports one actionable field-level validation issue.
type WorkflowDefinitionSpec ¶ added in v0.25.0
type WorkflowDefinitionSpec struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
MachineVersion string `json:"machine_version,omitempty" yaml:"machine_version,omitempty"`
InitialState string `json:"initial_state,omitempty" yaml:"initial_state,omitempty"`
Transitions []WorkflowTransitionSpec `json:"transitions,omitempty" yaml:"transitions,omitempty"`
}
WorkflowDefinitionSpec describes one workflow definition declared in config. The map key under WorkflowConfig.Workflows is treated as workflow ID unless ID is set.
type WorkflowTransitionSpec ¶ added in v0.25.0
type WorkflowTransitionSpec struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
From string `json:"from,omitempty" yaml:"from,omitempty"`
To string `json:"to,omitempty" yaml:"to,omitempty"`
Guard string `json:"guard,omitempty" yaml:"guard,omitempty"`
}
WorkflowTransitionSpec describes one workflow transition in external config.
Source Files
¶
- activity_shared.go
- activity_sink.go
- adapters.go
- admin_bootstrap.go
- admin_config.go
- admin_page_routes.go
- api_url_helpers.go
- asset_probe.go
- auth.go
- auth_ui.go
- auth_ui_context.go
- content_alias_routes.go
- content_entry_routes.go
- content_entry_routes_crud.go
- content_entry_routes_form_schema.go
- content_entry_routes_helpers.go
- content_entry_routes_query_detail.go
- content_entry_routes_schema_parsing.go
- content_entry_routes_translation.go
- content_type_builder.go
- content_type_builder_routes.go
- dashboard_renderer.go
- dashboard_templates.go
- debug.go
- debug_panels.go
- debug_remote.go
- doctor_checks.go
- environment_defaults.go
- error_fiber.go
- errors.go
- export_async.go
- export_bundle.go
- export_renderers.go
- feature_gate.go
- feature_helpers.go
- fiber_server.go
- form_generator.go
- fs.go
- go_users_preferences.go
- logging.go
- menu_scaffolder.go
- module_registrar.go
- nav_helpers.go
- navigation.go
- navigation_localized.go
- navigation_migration.go
- oauth_token_policy.go
- object_response.go
- onboarding_routes.go
- preferences_module.go
- preferences_options.go
- preferences_permissions.go
- registration_ui.go
- request_ip.go
- roles_ui.go
- scope.go
- scope_debug.go
- securelink.go
- session.go
- settings_ui.go
- sidebar_embed.go
- static_assets.go
- template_filter_aliases.go
- template_funcs.go
- template_site_helpers.go
- theme_selector.go
- theme_view.go
- tools_modules.go
- translation_capabilities.go
- translation_exchange.go
- translation_module_exposure.go
- translation_policy.go
- translation_policy_config.go
- translation_product.go
- translation_queue.go
- ui_feature_context.go
- ui_routes.go
- uploads.go
- url_helpers.go
- url_helpers_export.go
- user_migrations.go
- user_role_routes.go
- user_roles_context.go
- users_management.go
- util.go
- view_capabilities.go
- view_context_helpers.go
- view_context_paths.go
- view_engine.go
- workflow_config.go
- workflow_runtime_seed.go