Documentation
¶
Index ¶
- Constants
- Variables
- func ActionDisabledReasonCodes() []string
- func AdminSemanticProfile() gotheme.TokenProfile
- func ApplyEntryNavigationReadContract(record map[string]any, policy EntryNavigationPolicy) map[string]any
- func ApplyEntryNavigationWriteContract(record map[string]any, policy EntryNavigationPolicy, always bool) error
- func AttachErrorContext(err error, mapped *goerrors.Error) *goerrors.Error
- func AuthenticatedRequestFromContext(ctx context.Context) bool
- func BackfillContentTypeNavigationDefaults(ctx context.Context, service CMSContentTypeService) (int, error)
- func BlockEditorDescriptor(basePath string) components.Descriptor
- func BlockLibraryPickerDescriptor(basePath string) components.Descriptor
- func BlockLibraryPickerDescriptorWithAPIBase(basePath, apiBase string) components.Descriptor
- func BoolPtr(value bool) *bool
- func BuildSitePreviewURL(targetPath, token string) string
- func BuildSitePreviewURLWithAllowedHosts(targetPath, token string, allowedHosts []string) string
- func CMSBlockDefinitionChannel(def CMSBlockDefinition) string
- func CMSContentTypeChannel(ct CMSContentType) string
- func CanAll(authorizer Authorizer, ctx context.Context, resource string, ...) bool
- func CanAny(authorizer Authorizer, ctx context.Context, resource string, ...) bool
- func CanonicalContentPath(contentType, slug string) string
- func CanonicalContentURL(baseURL, contentType, slug string) string
- func CanonicalPath(path, fallback string) string
- func CanonicalPolicyEntityKey(value string) string
- func CaptureJSErrorContext(collector *DebugCollector, c router.Context, viewCtx router.ViewContext) router.ViewContext
- func CaptureViewContext(collector *DebugCollector, viewCtx router.ViewContext) router.ViewContext
- func CaptureViewContextForRequest(collector *DebugCollector, c router.Context, viewCtx router.ViewContext) router.ViewContext
- func CollectIconContributions(contributor IconContributor, callbacks IconContributorCallbacks) error
- func CommandLauncherActionID(commandID string) string
- func CommandResultFailure(result any) error
- func ConfigureTranslationSuggestionServiceDependencies(service TranslationSuggestionService, ...)
- func ConsolePageRenderer(adm *Admin, template string, chrome AdminPageChrome) func(router.Context, console.Bootstrap) error
- func ContentChannelFromContext(ctx context.Context) string
- func ContentTypeCapabilityString(capabilities map[string]any, keys ...string) string
- func ContentTypeCapabilityValue(capabilities map[string]any, keys ...string) (any, bool)
- func ContentTypeCapabilityValues(capabilities map[string]any, keys ...string) []any
- func ContextWithActionDiagnostics(ctx context.Context, sink ActionDiagnosticSink) context.Context
- func ContextWithActionResponseCollector(ctx context.Context, collector *ActionResponseCollector) context.Context
- func DashboardPageAreaByCode(page dashcmp.Page, areaCode string) (dashcmp.PageArea, bool)
- func DashboardPageWidgetsForAreaCode(page dashcmp.Page, areaCode string) []dashcmp.WidgetFrame
- func DataActionKind(actionID string) (admindata.Kind, bool)
- func DataActionResult(kind admindata.Kind, result admindata.Result, err error) (console.PanelActionResult, error)
- func DataCheckRecord(view DataCheckView, revision uint64) console.Record
- func DataCoverageRecord(view DataCoverageView, revision uint64) console.Record
- func DataDatasetRecord(descriptor admindata.Descriptor, revision uint64) console.Record
- func DataOperationRecord(operation admindata.Operation) console.Record
- func DataOverviewRecord(view DataOverviewView, revision uint64) console.Record
- func DataPanelIDs() []string
- func DataScenarioRecord(view DataScenarioView, revision uint64) console.Record
- func DebugRequestMiddleware(collector *DebugCollector) router.MiddlewareFunc
- func DecodeWidgetConfig[T any](cfg map[string]any) (T, error)
- func DefaultDebugPanels() []string
- func DefaultDebugToolbarPanels() []string
- func DeliveryGraphQLControllers() []registrar.Controller
- func EffectivePreferencesPermission(cfg Config) string
- func EffectiveProfilePermission(cfg Config) string
- func EffectiveSettingsPermission(cfg Config) string
- func EnrichLayoutViewContext(adm *Admin, c router.Context, view router.ViewContext, active string) router.ViewContext
- func EnrichLayoutViewContextWithChrome(adm *Admin, c router.Context, view router.ViewContext, chrome AdminPageChrome) router.ViewContext
- func EnsureMenuParents(ctx context.Context, opts EnsureMenuParentsOptions) error
- func EnsureWorkflowAuthoringCutover(ctx context.Context, db *bun.DB) error
- func EnvironmentFromContext(ctx context.Context) string
- func EvaluateEntryNavigationVisibility(eligible []string, overrides map[string]string, defaultSet map[string]struct{}, ...) (map[string]bool, []string)
- func ExtractContentPath(data, metadata map[string]any, fallback string) string
- func FamilyDetailFragmentSelector(target FamilyDetailFragmentTarget) (string, bool)
- func GetSVGFieldTypeMapping() map[string]string
- func GetTranslationAssignmentMigrationsFS() fs.FS
- func GetTranslationFlowMigrationsFS() fs.FS
- func GetTranslationFlowSQLiteMigrationsFS() fs.FS
- func GetWorkflowRuntimeMigrationsFS() fs.FS
- func IsCMSPageContentRecord(contentType, contentTypeSlug string) bool
- func IsCMSPageContentTypeSlug(value string) bool
- func IsCMSPagePolicyEntity(value string) bool
- func IsTranslationMissing(err error) bool
- func LocaleFallbackAllowed(ctx context.Context) bool
- func LocaleFromContext(ctx context.Context) string
- func ManagementGraphQLControllers() []registrar.Controller
- func MenuUUIDFromSlug(slug string) string
- func NavigationOverrideModes() []string
- func NewAdminActivityEnricher(cfg AdminActivityEnricherConfig) usersactivity.ActivityEnricher
- func NewAdminObjectResolver(cfg AdminObjectResolverConfig) usersactivity.ObjectResolver
- func NewCRUDContext(ctx context.Context) crud.Context
- func NewDomainError(code, message string, meta map[string]any) *goerrors.Error
- func NewRoleFormGenerator(cfg Config) (*formgenorchestrator.Orchestrator, error)
- func NormalizeBasePath(basePath string) string
- func NormalizeContentTypeCapabilities(capabilities map[string]any) (map[string]any, map[string]string)
- func NormalizeFilterType(raw string) string
- func NormalizeMenuItemTranslationFields(item MenuItem) (label, labelKey, groupTitle, groupTitleKey string)
- func NormalizeMenuItemType(raw string) string
- func NormalizeMenuSlug(raw string) string
- func NormalizeNavigationOverrideMap(raw any) (map[string]string, error)
- func NormalizeNavigationOverrideMode(raw string) string
- func NotificationSystemAuthorityFromContext(ctx context.Context) bool
- func ParseListPredicateKey(key string) (string, string)
- func PermissionGrantMatches(grant, permission string) bool
- func PermissionMatrixDescriptor(basePath string) components.Descriptor
- func PrefixBasePath(basePath, routePath string) string
- func RateLimitError() error
- func RegisterActionDiagnosticsDebugPanel(admin *Admin)
- func RegisterBuiltinIconLibraries(svc *IconService) error
- func RegisterCommand[T any](bus *CommandBus, cmd command.Commander[T], runnerOpts ...runner.Option) (dispatcher.Subscription, error)
- func RegisterCommandLauncherDebugPanel(adm *Admin)
- func RegisterCommandLauncherDoctorCheck(adm *Admin)
- func RegisterCommandRunsDebugPanel(adm *Admin)
- func RegisterContextMessageFactory[T any](bus *CommandBus, name string, build contextMessageBuilder[T]) error
- func RegisterContextMessageResultFactory[T any, R any](bus *CommandBus, name string, build contextMessageBuilder[T]) error
- func RegisterCoreCommandFactories(bus *CommandBus) error
- func RegisterDashboardProviderFactory(bus *CommandBus, commandName, code string, defaultConfig map[string]any) error
- func RegisterDataPanels(registry *console.PanelRegistry, actions ...DataPanelActions) error
- func RegisterDefaultCMSWorkflows(registrar WorkflowRegistrar)
- func RegisterDeliveryGraphQLSchemas()
- func RegisterDeploymentDebugPanel(adm *Admin)
- func RegisterDoctorDebugPanel(admin *Admin)
- func RegisterDomainErrorCodes(codes ...DomainErrorCode)
- func RegisterManagementGraphQLSchemas()
- func RegisterMessageFactory[T any](bus *CommandBus, name string, build messageBuilder[T]) error
- func RegisterMessageResultFactory[T any, R any](bus *CommandBus, name string, build messageBuilder[T]) error
- func RegisterPermissionsDebugPanel(admin *Admin)
- func RegisterQuery[T any, R any](bus *CommandBus, qry command.Querier[T, R], runnerOpts ...runner.Option) (dispatcher.Subscription, error)
- func RegisterSetCommand[T any](set *CommandRegistrationSet, handler command.Commander[T], ...) error
- func RegisterSetContextMessageFactory[T any](set *CommandRegistrationSet, name string, build contextMessageBuilder[T]) error
- func RegisterSetContextMessageResultFactory[T any, R any](set *CommandRegistrationSet, name string, build contextMessageBuilder[T]) error
- func RegisterSetMessageFactory[T any](set *CommandRegistrationSet, name string, build messageBuilder[T]) error
- func RegisterSetMessageResultFactory[T any, R any](set *CommandRegistrationSet, name string, build messageBuilder[T]) error
- func RegisterTranslationExchangeCommandFactories(bus *CommandBus) error
- func RegisterTranslationProgressWidget(dash *Dashboard, stats TranslationQueueStatsService, urls urlkit.Resolver)
- func RegisterTranslationQueueCommandFactories(bus *CommandBus) error
- func RegisterTranslationQueueCommands(bus *CommandBus, service TranslationQueueService) error
- func RegisterTranslationQueueTabs(admin *Admin) error
- func RegisterTranslationSuggestionCommandFactories(bus *CommandBus) error
- func RegisterTranslationSuggestionCommands(bus *CommandBus, service TranslationSuggestionService) error
- func RequestIPFromContext(ctx context.Context) string
- func ResolveContentPath(content CMSContent, fallback string) string
- func ResolveContentPreviewPath(record map[string]any) string
- func ResolveContentPreviewPathWithOptions(record map[string]any, opts ContentPreviewPathOptions) string
- func ResolveEntryNavigationVisibility(location string, overrides map[string]string, defaultSet map[string]struct{}, ...) bool
- func ResolvedPermissionsFromAuthorizer(ctx context.Context, authorizer Authorizer) []string
- func SchemaEditorDescriptor(basePath string) components.Descriptor
- func SetDefaultErrorPresenter(presenter ErrorPresenter)
- func SyncTranslationFamilyStore(ctx context.Context, adm *Admin, environment string) error
- func SyncTranslationFamilyStoreForFamily(ctx context.Context, adm *Admin, environment string, familyID string) error
- func TranslationCapabilities(adm *Admin) map[string]any
- func TranslationCapabilitiesForContext(adm *Admin, reqCtx context.Context) map[string]any
- func TranslationDashboardContractPayload() map[string]any
- func TranslationDashboardQueryModels() map[string]any
- func TranslationEditorContractPayload() map[string]any
- func TranslationExchangeContractPayload() map[string]any
- func TranslationMatrixContractPayload() map[string]any
- func TranslationMatrixQueryModel() map[string]any
- func TranslationQueueContractPayload() map[string]any
- func TranslationQueuePresetQuery(presetID string) map[string]string
- func TranslationQueueReviewAggregateCountKeys() []string
- func TranslationQueueSavedFilterPresets() []map[string]any
- func TranslationQueueSavedReviewFilterPresets() []map[string]any
- func TranslationQueueSupportedFilterKeys() []string
- func TranslationQueueSupportedReviewStates() []string
- func TranslationQueueSupportedSortKeys() []string
- func TranslationSharedContractsPayload() map[string]any
- func TranslationSourceTargetDriftContract() map[string]any
- func TranslationStatusEnumContract() map[string]any
- func ValidateAndNormalizeContentTypeCapabilities(capabilities map[string]any) (map[string]any, error)
- func ValidateCommandRunRuntimeConfig(config CommandRunRuntimeConfig) error
- func ValidateCommandRunUpdate(update CommandRunUpdate, limits CommandRunContractLimits) error
- func ValidateEntryNavigationOverrides(overrides map[string]string, eligible []string, strict bool) (map[string]string, error)
- func ValidateJSONPointerFormat(pointer string) bool
- func WithActivityRetention(limit int) func(*ActivityFeed)
- func WithAuthenticatedRequest(ctx context.Context) context.Context
- func WithContentChannel(ctx context.Context, channel string) context.Context
- func WithEnvironment(ctx context.Context, environment string) context.Context
- func WithLocale(ctx context.Context, locale string) context.Context
- func WithLocaleFallback(ctx context.Context, allow bool) context.Context
- func WithMutationFocus(selector string) func(*MutationPresentation)
- func WithMutationFragment(fragment EnhancedFragment) func(*MutationPresentation)
- func WithMutationRedirect(redirect string) func(*MutationPresentation)
- func WithMutationStatus(status int) func(*MutationPresentation)
- func WithMutationToast(toast EnhancedToast) func(*MutationPresentation)
- func WithNotificationSystemAuthority(ctx context.Context) context.Context
- func WithRequestIP(ctx context.Context, requestIP string) context.Context
- func WithResolvedPermissionsCache(ctx context.Context) context.Context
- func WithStack(err error) error
- func WithThemeSelection(ctx context.Context, selector ThemeSelector) context.Context
- func WithThemeSelectionFromRequest(ctx context.Context, c RouterContext) context.Context
- type Action
- type ActionDiagnosticEntry
- type ActionDiagnosticSink
- type ActionDiagnosticsDebugPanel
- type ActionDiagnosticsStore
- type ActionGuard
- type ActionGuardContext
- type ActionRemediation
- type ActionResponse
- type ActionResponseCollector
- type ActionScope
- type ActionState
- type ActivityDisplayHintPolicy
- type ActivityDisplayHintPolicyFunc
- type ActivityEntry
- type ActivityFeed
- func (f *ActivityFeed) List(ctx context.Context, limit int, filters ...ActivityFilter) ([]ActivityEntry, error)
- func (f *ActivityFeed) ListRecords(ctx context.Context, limit int, filters ...ActivityFilter) ([]ActivityRecord, error)
- func (f *ActivityFeed) Log(ctx context.Context, record ActivityRecord) error
- func (f *ActivityFeed) Record(ctx context.Context, entry ActivityEntry) error
- type ActivityFeedQuerier
- type ActivityFeedWidgetPayload
- type ActivityFilter
- type ActivityFilterOption
- type ActivityFilterOptions
- type ActivityFilterOptionsConfig
- type ActivityFilterOptionsPolicy
- type ActivityFilterOptionsPolicyFunc
- type ActivityFilterOptionsProvider
- type ActivityFilterOptionsProviderFunc
- type ActivityFilterOptionsQuery
- type ActivityFilterSelection
- type ActivityLogger
- type ActivityModule
- func (m *ActivityModule) Manifest() ModuleManifest
- func (m *ActivityModule) MenuItems(locale string) []MenuItem
- func (m *ActivityModule) Register(ctx ModuleContext) error
- func (m *ActivityModule) RouteContract() routing.ModuleContract
- func (m *ActivityModule) WithMenuParent(parent string) *ActivityModule
- type ActivityNavigation
- type ActivityNavigationError
- type ActivityNavigationErrorHandler
- type ActivityNavigationResolver
- type ActivityNavigationResolverFunc
- type ActivityNavigationTarget
- type ActivityPageEnricher
- type ActivityPageEnricherFunc
- type ActivityReadContext
- type ActivityReadEntry
- type ActivityReadErrorHandler
- type ActivityRecord
- type ActivityRecordLister
- type ActivitySink
- type ActivitySinkAdapter
- type ActivityUserBatchReader
- type Admin
- func (a *Admin) ActivityFeatureEnabled() bool
- func (a *Admin) ActivityFeed() ActivitySink
- func (a *Admin) ActivityReadEnabled() bool
- func (a *Admin) ActivityWidget() error
- func (a *Admin) AddCMSBootstrapHook(hook CMSBootstrapHook)
- func (a *Admin) AddInitHook(hook func(AdminRouter) error)
- func (a *Admin) AddPreviewURLAllowedHost(host string)
- func (a *Admin) AdminAPIBasePath() string
- func (a *Admin) AdminAPIGroup() string
- func (a *Admin) AdminUIGroup() string
- func (a *Admin) ApplyMediaSchemaHints(schema map[string]any) int
- func (a *Admin) AttachDebugLogBridge()
- func (a *Admin) AuthWrapper() boot.HandlerWrapper
- func (a *Admin) Authenticator() Authenticator
- func (a *Admin) AuthorizedPanelBulkActions(ctx context.Context, panelName string, actions []Action) []Action
- func (a *Admin) Authorizer() Authorizer
- func (a *Admin) BasePath() string
- func (a *Admin) Boot(steps ...boot.Step) error
- func (a *Admin) BootActivity() boot.ActivityBinding
- func (a *Admin) BootBulk() boot.BulkBinding
- func (a *Admin) BootDashboard() boot.DashboardBinding
- func (a *Admin) BootFeatureOverrides() boot.FeatureOverridesBinding
- func (a *Admin) BootIcons() boot.IconsBinding
- func (a *Admin) BootJobs() boot.JobsBinding
- func (a *Admin) BootMedia() boot.MediaBinding
- func (a *Admin) BootNavigation() boot.NavigationBinding
- func (a *Admin) BootNotifications() boot.NotificationsBinding
- func (a *Admin) BootSchemaRegistry() boot.SchemaRegistryBinding
- func (a *Admin) BootSearch() boot.SearchBinding
- func (a *Admin) BootSettings() boot.SettingsBinding
- func (a *Admin) BootTranslationExchange() boot.TranslationExchangeBinding
- func (a *Admin) BootTranslationFamilies() boot.TranslationFamiliesBinding
- func (a *Admin) BootTranslationQueue() boot.TranslationQueueBinding
- func (a *Admin) BootUserImport() boot.UserImportBinding
- func (a *Admin) BootWithContext(ctx context.Context, steps ...boot.Step) error
- func (a *Admin) BootWorkflows() boot.WorkflowManagementBinding
- func (a *Admin) Bootstrap(ctx context.Context) error
- func (a *Admin) BuildSitePreviewURL(targetPath, token string) string
- func (a *Admin) BulkService() BulkService
- func (a *Admin) CloseCommandRunRuntime(ctx context.Context) error
- func (a *Admin) CloseNavigationContributions() NavigationLifecycleReport
- func (a *Admin) CommandRunRuntime() *CommandRunRuntime
- func (a *Admin) Commands() *CommandBus
- func (a *Admin) ConfigureTranslationSuggestionServiceDependencies(deps TranslationSuggestionServiceDependencies) *Admin
- func (a *Admin) ContentService() CMSContentService
- func (a *Admin) ContentTypeService() CMSContentTypeService
- func (a *Admin) Dashboard() *Dashboard
- func (a *Admin) DashboardService() *Dashboard
- func (a *Admin) Debug() *DebugCollector
- func (a *Admin) DebugQueryHook() bun.QueryHook
- func (a *Admin) DebugQueryHookOptions() []repository.Option
- func (a *Admin) DebugREPLSessionManager() *DebugREPLSessionManager
- func (a *Admin) DebugREPLSessions() DebugREPLSessionStore
- func (a *Admin) DebugUserSessions() DebugUserSessionStore
- func (a *Admin) DefaultLocale() string
- func (a *Admin) DeploymentIdentity() DeploymentIdentity
- func (a *Admin) DiagnoseNavigation(ctx context.Context, opts NavigationDoctorOptions) (NavigationDoctorReport, error)
- func (a *Admin) DoctorChecks() []DoctorCheck
- func (a *Admin) EffectiveScope(ctx context.Context, input ScopeInput) EffectiveScope
- func (a *Admin) EffectiveScopeFromRequest(c router.Context, input ScopeInput) EffectiveScope
- func (a *Admin) EnforceDashboardAreas(enable bool)
- func (a *Admin) EnhancedActionRuntimeOptions() EnhancedActionRuntimeOptions
- func (a *Admin) ErrorPresenter() ErrorPresenter
- func (a *Admin) ExportAPIAvailable() bool
- func (a *Admin) ExportHTTPRegistrar() ExportHTTPRegistrar
- func (a *Admin) ExportMetadataProvider() ExportMetadataProvider
- func (a *Admin) ExportRegistrar() boot.ExportRegistrar
- func (a *Admin) ExportRegistry() ExportRegistry
- func (a *Admin) FeatureCatalog() catalog.Catalog
- func (a *Admin) FeatureGate() fggate.FeatureGate
- func (a *Admin) FlushQueuedNavigationContributions(ctx context.Context) error
- func (a *Admin) FormTheme(ctx context.Context) *formrender.ThemeConfig
- func (a *Admin) Gates() boot.FeatureGates
- func (a *Admin) HasAuthenticator() bool
- func (a *Admin) IconService() *IconService
- func (a *Admin) Initialize(r AdminRouter) error
- func (a *Admin) InitializeWithContext(ctx context.Context, r AdminRouter) error
- func (a *Admin) Jobs() *JobRegistry
- func (a *Admin) LifecycleContext() context.Context
- func (a *Admin) Logger() Logger
- func (a *Admin) LoggerProvider() LoggerProvider
- func (a *Admin) MediaDeliveryURLs(id string) MediaDeliveryURLs
- func (a *Admin) MediaLibrary() MediaLibrary
- func (a *Admin) Menu() *Navigation
- func (a *Admin) MenuService() CMSMenuService
- func (a *Admin) NamedLogger(name string) Logger
- func (a *Admin) NavMenuCode() string
- func (a *Admin) Navigation() *Navigation
- func (a *Admin) NavigationLifecycleReport() NavigationLifecycleReport
- func (a *Admin) NavigationPermissionRegistry() *NavigationPermissionRegistry
- func (a *Admin) NotificationDeliveries() NotificationDeliveryInspector
- func (a *Admin) NotificationEvents() NotificationEventService
- func (a *Admin) NotificationReceipts() NotificationReceiptService
- func (a *Admin) NotificationRetention() NotificationRetentionService
- func (a *Admin) NotificationService() NotificationService
- func (a *Admin) NotificationsWidget() error
- func (a *Admin) OrganizationService() *OrganizationService
- func (a *Admin) Panel(_ string) *PanelBuilder
- func (a *Admin) PanelAPIAvailable(panelName string) bool
- func (a *Admin) Panels() []boot.PanelBinding
- func (a *Admin) ParseBody(c router.Context) (map[string]any, error)
- func (a *Admin) PreferencesAPIAvailable() bool
- func (a *Admin) PreferencesAPICapabilities(ctx context.Context) PreferencesAPICapabilities
- func (a *Admin) PreferencesAPIRequestCapabilities(ctx context.Context) (readable, writable bool)
- func (a *Admin) PreferencesService() *PreferencesService
- func (a *Admin) Prepare(ctx context.Context) error
- func (a *Admin) Preview() *PreviewService
- func (a *Admin) PreviewURLAllowedHosts() []string
- func (a *Admin) ProfileService() *ProfileService
- func (a *Admin) ProtectedRouter() AdminRouter
- func (a *Admin) PublicRouter() AdminRouter
- func (a *Admin) PublishCommandStatus(event CommandStatusEvent)
- func (a *Admin) PublishCommandStatusContext(ctx context.Context, event CommandStatusEvent)
- func (a *Admin) RPCServer() *cmdrpc.Server
- func (a *Admin) ReconcileDynamicCMS(ctx context.Context) error
- func (a *Admin) RefreshRoutingReport() routing.StartupReport
- func (a *Admin) RegisterCMSDemoPanels() error
- func (a *Admin) RegisterDashboardProviders() error
- func (a *Admin) RegisterDoctorChecks(checks ...DoctorCheck) *Admin
- func (a *Admin) RegisterMediaDeliveryAdapter(provider string, adapter MediaDeliveryAdapter) error
- func (a *Admin) RegisterModule(module Module) error
- func (a *Admin) RegisterNavigationPermissions(declarations ...NavigationPermissionDeclaration) *Admin
- func (a *Admin) RegisterPanel(name string, builder *PanelBuilder) (*Panel, error)
- func (a *Admin) RegisterPanelTab(panelName string, tab PanelTab) error
- func (a *Admin) RegisterPublicAPI(r AdminRouter)
- func (a *Admin) RegisterWidgetArea(def WidgetAreaDefinition)
- func (a *Admin) RegisterWidgetAreas() error
- func (a *Admin) RegisterWidgetDefinitions() error
- func (a *Admin) Registry() *Registry
- func (a *Admin) RemovePreviewURLAllowedHost(host string)
- func (a *Admin) ResolveLocaleFromRequest(c router.Context, fallback string) string
- func (a *Admin) ResolvePanelExportConfig(ctx context.Context, definition, variant string) *ExportConfig
- func (a *Admin) ResolvePanelTabs(ctx AdminContext, panelName string) ([]PanelTab, error)
- func (a *Admin) ResolvePanelTabsFromRequest(c router.Context, panelName, locale string) ([]PanelTab, error)
- func (a *Admin) Responder() boot.Responder
- func (a *Admin) Router() boot.Router
- func (a *Admin) RoutingPlanner() routing.Planner
- func (a *Admin) RoutingReport() routing.StartupReport
- func (a *Admin) RunDoctor(ctx context.Context) DoctorReport
- func (a *Admin) RunDoctorAction(ctx context.Context, checkID string, input map[string]any) (DoctorActionExecution, error)
- func (a *Admin) ScopeDefaults() AuthenticatedRequestScopeDefaults
- func (a *Admin) ScopePolicy() ScopePolicy
- func (a *Admin) SearchService() *SearchEngine
- func (a *Admin) SetPreviewURLAllowedHosts(hosts []string)
- func (a *Admin) SettingsService() *SettingsService
- func (a *Admin) SettingsWidget() error
- func (a *Admin) StartCommandRunRuntime(ctx context.Context, config CommandRunRuntimeConfig) error
- func (a *Admin) StructuralPartials(ctx context.Context) AdminStructuralPartials
- func (a *Admin) TenantService() *TenantService
- func (a *Admin) Theme(ctx context.Context) *ThemeSelection
- func (a *Admin) ThemePayload(ctx context.Context) map[string]map[string]string
- func (a *Admin) TranslationActorOptionProvider() TranslationActorOptionProvider
- func (a *Admin) TranslationSuggestionService() TranslationSuggestionService
- func (a *Admin) Translator() Translator
- func (a *Admin) URLs() urlkit.Resolver
- func (a *Admin) UnregisterPanel(name string) error
- func (a *Admin) UseCMS(container CMSContainer) *Admin
- func (a *Admin) UserImportAllowed(ctx context.Context) bool
- func (a *Admin) UserImportEnabled() bool
- func (a *Admin) UserService() *UserManagementService
- func (a *Admin) ValidateNavigationPolicy(roles []RoleRecord) PermissionPolicyReport
- func (a *Admin) WidgetAreas() []WidgetAreaDefinition
- func (a *Admin) WithActivitySink(sink ActivitySink) *Admin
- func (a *Admin) WithAdminStructuralDiagnosticSink(sink AdminStructuralDiagnosticSink) *Admin
- func (a *Admin) WithAdminTemplateLookup(lookup AdminTemplateLookup) *Admin
- func (a *Admin) WithAdminTheme(selector gotheme.ThemeSelector) *Admin
- func (a *Admin) WithAuth(auth Authenticator, cfg *AuthConfig) *Admin
- func (a *Admin) WithAuthorizer(authz Authorizer) *Admin
- func (a *Admin) WithCMSWorkflowActions(actions ...Action) *Admin
- func (a *Admin) WithCMSWorkflowDefaults() *Admin
- func (a *Admin) WithEnhancedActionNegotiation(cfg EnhancedActionNegotiationConfig) *Admin
- func (a *Admin) WithMediaDeliveryAdapter(provider string, adapter MediaDeliveryAdapter) *Admin
- func (a *Admin) WithMediaDeliveryConfig(cfg MediaDeliveryConfig) *Admin
- func (a *Admin) WithMediaDeliveryCredentialResolver(resolver MediaDeliveryCredentialResolver) *Admin
- func (a *Admin) WithMediaDeliveryReferenceProjector(projector MediaDeliveryReferenceProjector) *Admin
- func (a *Admin) WithMediaDeliveryRegistry(registry *MediaDeliveryRegistry) *Admin
- func (a *Admin) WithMediaLibrary(lib MediaLibrary) *Admin
- func (a *Admin) WithModuleStartupPolicy(policy ModuleStartupPolicy) *Admin
- func (a *Admin) WithNavigationContributionPolicy(policy NavigationContributionPolicy) *Admin
- func (a *Admin) WithNavigationRouteMissingPolicy(policy NavigationRouteMissingPolicy) *Admin
- func (a *Admin) WithOrganizationManagement(repo OrganizationRepository) *Admin
- func (a *Admin) WithPanelTabCollisionHandler(fn PanelTabCollisionHandler) *Admin
- func (a *Admin) WithPanelTabPermissionEvaluator(fn PanelTabPermissionEvaluator) *Admin
- func (a *Admin) WithPreviewURLAllowedHosts(hosts ...string) *Admin
- func (a *Admin) WithRoleAssignmentLookup(lookup RoleAssignmentLookup) *Admin
- func (a *Admin) WithTenantManagement(repo TenantRepository) *Admin
- func (a *Admin) WithThemeManifest(manifest *theme.Manifest) *Admin
- func (a *Admin) WithThemeProvider(provider ThemeProvider) *Admin
- func (a *Admin) WithTraitWorkflowDefaults(defaults map[string]string) *Admin
- func (a *Admin) WithTranslationActorOptionProvider(provider TranslationActorOptionProvider) *Admin
- func (a *Admin) WithTranslationExchangeRuntime(runtime *TranslationExchangeRuntime) *Admin
- func (a *Admin) WithTranslationFamilyStore(store translationservices.FamilyStore) *Admin
- func (a *Admin) WithTranslationPolicy(policy TranslationPolicy) *Admin
- func (a *Admin) WithTranslationSuggestionService(service TranslationSuggestionService) *Admin
- func (a *Admin) WithTranslator(t Translator) *Admin
- func (a *Admin) WithUserManagement(users UserRepository, roles RoleRepository) *Admin
- func (a *Admin) WithWorkflow(w WorkflowEngine) *Admin
- func (a *Admin) WithWorkflowRuntime(runtime WorkflowRuntime) *Admin
- type AdminActivityEnricherConfig
- type AdminActorResolver
- type AdminBlockReadService
- type AdminBlockWriteService
- type AdminChromeState
- type AdminContentReadService
- type AdminContentWriteService
- type AdminContext
- type AdminDashboardPage
- type AdminMenuBindingRecord
- type AdminMenuContracts
- type AdminMenuPreviewSimulation
- type AdminMenuRecord
- type AdminMenuViewProfileRecord
- type AdminObjectResolverConfig
- type AdminPageChrome
- type AdminPageGetOptions
- type AdminPageHeader
- type AdminPageHeaderBreadcrumb
- type AdminPageListOptions
- type AdminPageReadService
- type AdminPageRecord
- type AdminPageWriteService
- type AdminRouter
- type AdminStaticRouter
- type AdminStructuralDiagnosticSink
- type AdminStructuralDiagnosticSinkFunc
- type AdminStructuralPartialDiagnostic
- type AdminStructuralPartials
- type AdminTemplateLookup
- type AdminTemplateLookupFunc
- type AssignmentStatus
- type AssignmentType
- type AuthConfig
- type AuthenticatedRequestIdentity
- type AuthenticatedRequestScopeDefaults
- type Authenticator
- type Authorizer
- type AutosaveConflictError
- type BatchActionStateResolver
- type BatchAuthorizer
- type BrowserCSRFProtector
- type BulkActionStateConfig
- type BulkActionStateResolver
- type BulkCommand
- type BulkConfig
- type BulkJob
- type BulkRequest
- type BulkRoleChangeRequest
- type BulkRoleChangeResponse
- type BulkRoleChangeResult
- type BulkRoleChangeSummary
- type BulkRollbacker
- type BulkService
- type BulkStartMsg
- type BunRecordMapper
- type BunRepositoryAdapter
- func (a *BunRepositoryAdapter[T]) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (a *BunRepositoryAdapter[T]) Delete(ctx context.Context, id string) error
- func (a *BunRepositoryAdapter[T]) Get(ctx context.Context, id string) (map[string]any, error)
- func (a *BunRepositoryAdapter[T]) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (a *BunRepositoryAdapter[T]) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type BunRepositoryOption
- func WithBunBaseCriteria[T any](criteria ...repository.SelectCriteria) BunRepositoryOption[T]
- func WithBunDeleteCriteria[T any](criteria ...repository.DeleteCriteria) BunRepositoryOption[T]
- func WithBunFilterMapping[T any](builders map[string]func(any) repository.SelectCriteria) BunRepositoryOption[T]
- func WithBunPatchAllowedFields[T any](fields ...string) BunRepositoryOption[T]
- func WithBunRecordMapper[T any](mapper BunRecordMapper[T]) BunRepositoryOption[T]
- func WithBunSearchColumns[T any](columns ...string) BunRepositoryOption[T]
- func WithBunUpdateCriteria[T any](criteria ...repository.UpdateCriteria) BunRepositoryOption[T]
- type BunSettingsAdapter
- func (a *BunSettingsAdapter) Apply(ctx context.Context, bundle SettingsBundle) error
- func (a *BunSettingsAdapter) Definitions() []SettingDefinition
- func (a *BunSettingsAdapter) RegisterDefinition(def SettingDefinition)
- func (a *BunSettingsAdapter) Resolve(key, userID string) ResolvedSetting
- func (a *BunSettingsAdapter) ResolveAll(userID string) map[string]ResolvedSetting
- func (a *BunSettingsAdapter) Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
- func (a *BunSettingsAdapter) WithSchemaOptions(options ...opts.Option)
- type BunTranslationAssignmentRepository
- func (r *BunTranslationAssignmentRepository) AssignmentDashboardSummary(ctx context.Context, input TranslationAssignmentDashboardSummaryInput) (TranslationAssignmentDashboardSummary, error)
- func (r *BunTranslationAssignmentRepository) AssignmentMyWorkSummary(ctx context.Context, input TranslationAssignmentMyWorkSummaryInput) (map[string]int, error)
- func (r *BunTranslationAssignmentRepository) AssignmentQueueSummary(ctx context.Context, input TranslationAssignmentQueueSummaryInput) (TranslationAssignmentQueueSummary, error)
- func (r *BunTranslationAssignmentRepository) AssignmentReviewerAggregateCounts(_ context.Context, input TranslationAssignmentReviewerAggregateInput) (map[string]int, error)
- func (r *BunTranslationAssignmentRepository) AssignmentReviewerAggregateSummary(ctx context.Context, input TranslationAssignmentReviewerAggregateInput) (TranslationAssignmentReviewerAggregateSummary, error)
- func (r *BunTranslationAssignmentRepository) Create(ctx context.Context, assignment TranslationAssignment) (TranslationAssignment, error)
- func (r *BunTranslationAssignmentRepository) CreateOrReuseActive(ctx context.Context, assignment TranslationAssignment) (TranslationAssignment, bool, error)
- func (r *BunTranslationAssignmentRepository) DistinctAssignmentEntityTypes(ctx context.Context) ([]string, error)
- func (r *BunTranslationAssignmentRepository) DistinctAssignmentLocales(ctx context.Context, filters map[string]any) ([]string, error)
- func (r *BunTranslationAssignmentRepository) DistinctAssignmentTranslationGroups(ctx context.Context, filters map[string]any) ([]TranslationAssignmentGroupOption, error)
- func (r *BunTranslationAssignmentRepository) Get(ctx context.Context, id string) (TranslationAssignment, error)
- func (r *BunTranslationAssignmentRepository) List(ctx context.Context, opts ListOptions) ([]TranslationAssignment, int, error)
- func (r *BunTranslationAssignmentRepository) ListAssignmentFamilyGroups(ctx context.Context, input TranslationAssignmentFamilyGroupQueryInput) (TranslationAssignmentFamilyGroupQueryResult, error)
- func (r *BunTranslationAssignmentRepository) ListAssignmentFamilyOptions(ctx context.Context, input TranslationAssignmentFamilyOptionQueryInput) (TranslationAssignmentFamilyOptionQueryResult, error)
- func (r *BunTranslationAssignmentRepository) ListAssignmentPage(ctx context.Context, input TranslationAssignmentPageQueryInput) (TranslationAssignmentPageQueryResult, error)
- func (r *BunTranslationAssignmentRepository) ListAssignmentSnapshot(ctx context.Context, input TranslationAssignmentSnapshotQueryInput) (TranslationAssignmentSnapshotQueryResult, error)
- func (r *BunTranslationAssignmentRepository) ListFamilyAssignments(ctx context.Context, input TranslationAssignmentFamilyAssignmentsQueryInput) (TranslationAssignmentFamilyAssignmentsQueryResult, error)
- func (r *BunTranslationAssignmentRepository) Update(ctx context.Context, assignment TranslationAssignment, expectedVersion int64) (TranslationAssignment, error)
- type BunTranslationExchangeRuntimeStore
- func (s *BunTranslationExchangeRuntimeStore) ClaimJob(ctx context.Context, jobID, workerID string, now, leaseUntil time.Time) (translationExchangeAsyncJob, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) CommitApplyRecord(ctx context.Context, reservation translationExchangeApplyReservation, ...) (translationExchangeAppliedRecord, error)
- func (s *BunTranslationExchangeRuntimeStore) CompleteJob(ctx context.Context, jobID, workerID string, ...) (translationExchangeAsyncJob, error)
- func (s *BunTranslationExchangeRuntimeStore) CreateJob(ctx context.Context, job translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
- func (s *BunTranslationExchangeRuntimeStore) CreateOrGetApplyJob(ctx context.Context, identity translationTransportIdentity, ...) (translationExchangeAsyncJob, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) DeleteJob(ctx context.Context, identity translationTransportIdentity, id string) (translationExchangeAsyncJob, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) FailJob(ctx context.Context, jobID, workerID string, progress map[string]any, ...) (translationExchangeAsyncJob, error)
- func (s *BunTranslationExchangeRuntimeStore) FindJobByRequestHash(ctx context.Context, kind string, identity translationTransportIdentity, ...) (translationExchangeAsyncJob, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) GetJob(ctx context.Context, identity translationTransportIdentity, id string) (translationExchangeAsyncJob, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) HeartbeatJob(ctx context.Context, jobID, workerID string, progress map[string]any, ...) error
- func (s *BunTranslationExchangeRuntimeStore) ListJobRows(ctx context.Context, jobID string) ([]translationExchangeStoredRow, error)
- func (s *BunTranslationExchangeRuntimeStore) ListJobs(ctx context.Context, query translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
- func (s *BunTranslationExchangeRuntimeStore) ListRecoverableJobs(ctx context.Context, now time.Time, limit int) ([]translationExchangeAsyncJob, error)
- func (s *BunTranslationExchangeRuntimeStore) LookupApplyRecord(ctx context.Context, identity translationTransportIdentity, ...) (translationExchangeAppliedRecord, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) RecordApplyRecord(ctx context.Context, identity translationTransportIdentity, ...) (translationExchangeAppliedRecord, bool, error)
- func (s *BunTranslationExchangeRuntimeStore) ReleaseApplyRecord(ctx context.Context, reservation translationExchangeApplyReservation) error
- func (s *BunTranslationExchangeRuntimeStore) ReplaceJobArtifacts(ctx context.Context, job translationExchangeAsyncJob, ...) error
- func (s *BunTranslationExchangeRuntimeStore) ReserveApplyRecord(ctx context.Context, identity translationTransportIdentity, ...) (translationExchangeApplyReservation, translationExchangeAppliedRecord, string, ...)
- func (s *BunTranslationExchangeRuntimeStore) SaveJobRows(ctx context.Context, job translationExchangeAsyncJob, ...) error
- func (s *BunTranslationExchangeRuntimeStore) UpsertJobRow(ctx context.Context, jobID string, row translationExchangeStoredRow) error
- type BunTranslationFamilyStore
- func (s *BunTranslationFamilyStore) Families(ctx context.Context) ([]translationservices.FamilyRecord, error)
- func (s *BunTranslationFamilyStore) Family(ctx context.Context, id string) (translationservices.FamilyRecord, bool, error)
- func (s *BunTranslationFamilyStore) FamilyQuery(ctx context.Context, input translationservices.GetFamilyInput) (translationservices.FamilyRecord, bool, error)
- func (s *BunTranslationFamilyStore) ListFamiliesQuery(ctx context.Context, input translationservices.ListFamiliesInput) (translationservices.ListFamiliesResult, error)
- func (s *BunTranslationFamilyStore) SaveFamily(ctx context.Context, family translationservices.FamilyRecord) error
- func (s *BunTranslationFamilyStore) TranslationDashboardFamilyMetrics(ctx context.Context, input TranslationDashboardFamilyMetricsInput) (TranslationDashboardFamilyMetrics, error)
- func (s *BunTranslationFamilyStore) TranslationEditorMemorySuggestions(ctx context.Context, input TranslationEditorMemorySuggestionInput) ([]TranslationEditorMemorySuggestion, error)
- type BunWorkflowAuthoringStore
- func (s *BunWorkflowAuthoringStore) Delete(ctx context.Context, machineID string, expectedVersion string, hardDelete bool) (bool, error)
- func (s *BunWorkflowAuthoringStore) List(ctx context.Context, opts flow.AuthoringListOptions) (*flow.AuthoringListResult, error)
- func (s *BunWorkflowAuthoringStore) ListVersions(ctx context.Context, machineID string, limit int, offset int) ([]*flow.AuthoringMachineRecord, bool, error)
- func (s *BunWorkflowAuthoringStore) Load(ctx context.Context, machineID string) (*flow.AuthoringMachineRecord, error)
- func (s *BunWorkflowAuthoringStore) LoadAny(ctx context.Context, machineID string) (*flow.AuthoringMachineRecord, error)
- func (s *BunWorkflowAuthoringStore) LoadVersion(ctx context.Context, machineID string, version string) (*flow.AuthoringMachineRecord, error)
- func (s *BunWorkflowAuthoringStore) Save(ctx context.Context, rec *flow.AuthoringMachineRecord, expectedVersion string) (*flow.AuthoringMachineRecord, error)
- type BunWorkflowBindingRepository
- func (r *BunWorkflowBindingRepository) Create(ctx context.Context, binding WorkflowBinding) (WorkflowBinding, error)
- func (r *BunWorkflowBindingRepository) Delete(ctx context.Context, id string) error
- func (r *BunWorkflowBindingRepository) Get(ctx context.Context, id string) (WorkflowBinding, error)
- func (r *BunWorkflowBindingRepository) List(ctx context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
- func (r *BunWorkflowBindingRepository) ListByScope(ctx context.Context, scopeType WorkflowBindingScopeType, scopeRef string, ...) ([]WorkflowBinding, error)
- func (r *BunWorkflowBindingRepository) Update(ctx context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
- type BunWorkflowDefinitionRepository
- func (r *BunWorkflowDefinitionRepository) Create(ctx context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
- func (r *BunWorkflowDefinitionRepository) Get(ctx context.Context, id string) (PersistedWorkflow, error)
- func (r *BunWorkflowDefinitionRepository) GetVersion(ctx context.Context, id string, version int) (PersistedWorkflow, error)
- func (r *BunWorkflowDefinitionRepository) List(ctx context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
- func (r *BunWorkflowDefinitionRepository) Update(ctx context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
- type CLIConfig
- type CLIGroup
- type CMSBlock
- type CMSBlockConflictRepository
- func (r *CMSBlockConflictRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSBlockConflictRepository) Delete(ctx context.Context, id string) error
- func (r *CMSBlockConflictRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSBlockConflictRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSBlockConflictRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSBlockDefinition
- type CMSBlockDefinitionRepository
- func (r *CMSBlockDefinitionRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSBlockDefinitionRepository) Delete(ctx context.Context, id string) error
- func (r *CMSBlockDefinitionRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSBlockDefinitionRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSBlockDefinitionRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSBlockDefinitionVersion
- type CMSBlockRepository
- func (r *CMSBlockRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSBlockRepository) Delete(ctx context.Context, id string) error
- func (r *CMSBlockRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSBlockRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSBlockRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSBootstrapHook
- type CMSContainer
- type CMSContainerBuilder
- type CMSContainerUnwrapper
- type CMSContent
- type CMSContentListOption
- type CMSContentRepository
- func (r *CMSContentRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSContentRepository) CreateTranslation(ctx context.Context, input TranslationCreateInput) (map[string]any, error)
- func (r *CMSContentRepository) Delete(ctx context.Context, id string) error
- func (r *CMSContentRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSContentRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSContentRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSContentService
- type CMSContentServiceUnwrapper
- type CMSContentTranslationCreator
- type CMSContentType
- type CMSContentTypeEntryRepository
- func (r *CMSContentTypeEntryRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSContentTypeEntryRepository) CreateTranslation(ctx context.Context, input TranslationCreateInput) (map[string]any, error)
- func (r *CMSContentTypeEntryRepository) Delete(ctx context.Context, id string) error
- func (r *CMSContentTypeEntryRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSContentTypeEntryRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSContentTypeEntryRepository) ListTranslationFamilies(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSContentTypeEntryRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSContentTypeRepository
- func (r *CMSContentTypeRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSContentTypeRepository) Delete(ctx context.Context, id string) error
- func (r *CMSContentTypeRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSContentTypeRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSContentTypeRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSContentTypeService
- type CMSLegacyBlockService
- type CMSMenuRepository
- func (r *CMSMenuRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSMenuRepository) Delete(ctx context.Context, id string) error
- func (r *CMSMenuRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSMenuRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSMenuRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSMenuService
- type CMSOptions
- type CMSPage
- type CMSPageRepository
- func (r *CMSPageRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CMSPageRepository) Delete(ctx context.Context, id string) error
- func (r *CMSPageRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CMSPageRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CMSPageRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CMSWidgetService
- type CRUDRepositoryAdapter
- func (r *CRUDRepositoryAdapter) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *CRUDRepositoryAdapter) Delete(ctx context.Context, id string) error
- func (r *CRUDRepositoryAdapter) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *CRUDRepositoryAdapter) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *CRUDRepositoryAdapter) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type CanonicalURLResolver
- type ChartPointWidgetPayload
- type CommandBus
- func (b *CommandBus) Close()
- func (b *CommandBus) CommandDescriptors() []command.CommandDescriptor
- func (b *CommandBus) CommandRegistration(name string) CommandRegistrationState
- func (b *CommandBus) DispatchByName(ctx context.Context, name string, payload map[string]any, ids []string) error
- func (b *CommandBus) DispatchByNameWithOptions(ctx context.Context, name string, payload map[string]any, ids []string, ...) (command.DispatchReceipt, error)
- func (b *CommandBus) DispatchByNameWithOutcome(ctx context.Context, name string, payload map[string]any, ids []string, ...) (DispatchOutcome, error)
- func (b *CommandBus) Enable(enabled bool)
- func (b *CommandBus) ExecutionPolicy() CommandExecutionPolicy
- func (b *CommandBus) HasFactory(name string) bool
- func (b *CommandBus) MarkCommandHandlerRegistered(name string)
- func (b *CommandBus) Names() []string
- func (b *CommandBus) NewRegistrationSet(owner string) (*CommandRegistrationSet, error)
- func (b *CommandBus) RegisterFactory(name string, factory MessageFactory) error
- func (b *CommandBus) Reset()
- func (b *CommandBus) SetExecutionPolicy(policy CommandExecutionPolicy) error
- func (b *CommandBus) SetOwnedRuntimeConfig(config OwnedCommandRuntimeConfig) error
- type CommandConfig
- type CommandExecutionPolicy
- type CommandLauncherDiagnostic
- type CommandLauncherSnapshot
- type CommandRegistrationHandle
- type CommandRegistrationSet
- type CommandRegistrationState
- type CommandResultFailureReporter
- type CommandRunAtomicClearStore
- type CommandRunClearSnapshot
- type CommandRunContractLimits
- type CommandRunDiagnosticStatus
- type CommandRunDiagnostics
- type CommandRunFailure
- type CommandRunHandler
- type CommandRunMemoryStoreConfig
- type CommandRunObserverBridge
- type CommandRunObserverConfig
- type CommandRunOutcome
- type CommandRunPhase
- type CommandRunProcessRole
- type CommandRunProjection
- type CommandRunProjectionFunc
- type CommandRunProjector
- type CommandRunPublisher
- type CommandRunRecord
- type CommandRunRecordAuthorizer
- type CommandRunRecordAuthorizerFunc
- type CommandRunRecordHandler
- type CommandRunRuntime
- func (r *CommandRunRuntime) Capabilities() CommandRunTransportCapabilities
- func (r *CommandRunRuntime) Close(ctx context.Context) error
- func (r *CommandRunRuntime) Diagnostics() CommandRunDiagnostics
- func (r *CommandRunRuntime) Publisher() CommandRunPublisher
- func (r *CommandRunRuntime) Ready() <-chan struct{}
- func (r *CommandRunRuntime) Start(ctx context.Context) error
- func (r *CommandRunRuntime) Store() CommandRunStore
- func (r *CommandRunRuntime) Subscriber() CommandRunSubscriber
- type CommandRunRuntimeConfig
- type CommandRunScope
- type CommandRunScopeAuthorizer
- type CommandRunScopeAuthorizerFuncs
- type CommandRunScopeResolver
- type CommandRunScopeResolverFunc
- type CommandRunSelector
- type CommandRunStore
- type CommandRunSubscriber
- type CommandRunSubscription
- type CommandRunTransport
- type CommandRunTransportCapabilities
- type CommandRunTransportDurability
- type CommandRunUpdate
- type CommandRunsDebugPanel
- func (p *CommandRunsDebugPanel) Clear(ctx context.Context) error
- func (p *CommandRunsDebugPanel) ClearCheck(ctx context.Context) error
- func (p *CommandRunsDebugPanel) Lookup(ctx context.Context, id string) (CommandRunRecord, bool, error)
- func (p *CommandRunsDebugPanel) Snapshot(ctx context.Context) CommandRunsSnapshot
- type CommandRunsSnapshot
- type CommandStatusEvent
- type Config
- type ConsoleAccess
- type ConsoleDashboardConfig
- type ConsoleHost
- func (h *ConsoleHost) Close() error
- func (h *ConsoleHost) DashboardArea() string
- func (h *ConsoleHost) DashboardPage(viewer AdminContext, identity console.Identity, template string) (AdminDashboardPage, error)
- func (h *ConsoleHost) Events() *console.EventStream
- func (h *ConsoleHost) Lookup(ctx context.Context, identity console.Identity, panelID, recordKey string) (console.Record, error)
- func (h *ConsoleHost) Manifest() ModuleManifest
- func (h *ConsoleHost) Register(ctx ModuleContext) error
- func (h *ConsoleHost) RegisterDashboard(admin *Admin, config ConsoleDashboardConfig) error
- func (h *ConsoleHost) RouteContract() routing.ModuleContract
- func (h *ConsoleHost) RunAction(ctx context.Context, identity console.Identity, ...) (console.PanelActionResult, error)
- func (h *ConsoleHost) SaveDashboardLayout(ctx context.Context, identity console.Identity, ...) error
- func (h *ConsoleHost) Snapshot(ctx context.Context, identity console.Identity) (console.Snapshot, error)
- func (h *ConsoleHost) Watch(ctx context.Context, identity console.Identity, panels []string, ...) error
- type ConsoleHostConfig
- type ConsolePanelWidgetPayload
- type ContentPreviewPathOptions
- type ContentTranslation
- type ContentTypeBuilderModule
- func (m *ContentTypeBuilderModule) AfterMenuSeed(ctx context.Context, admin *Admin) error
- func (m *ContentTypeBuilderModule) Manifest() ModuleManifest
- func (m *ContentTypeBuilderModule) MenuItems(locale string) []MenuItem
- func (m *ContentTypeBuilderModule) Register(ctx ModuleContext) error
- func (m *ContentTypeBuilderModule) RouteContract() routing.ModuleContract
- type ContentTypeBuilderOption
- func WithContentTypeBuilderBasePath(path string) ContentTypeBuilderOption
- func WithContentTypeBuilderEntryMenuParent(menuParent string) ContentTypeBuilderOption
- func WithContentTypeBuilderGuardrails(guardrails *SchemaGuardrails) ContentTypeBuilderOption
- func WithContentTypeBuilderMenu(menuCode, menuParent string) ContentTypeBuilderOption
- func WithContentTypeBuilderPanelFactory(factory *DynamicPanelFactory) ContentTypeBuilderOption
- func WithContentTypeBuilderPermission(permission string) ContentTypeBuilderOption
- func WithContentTypeBuilderPreviewFallback(fallback SchemaPreviewFallback) ContentTypeBuilderOption
- func WithContentTypeBuilderRateLimiter(limiter *RateLimiter) ContentTypeBuilderOption
- func WithContentTypeBuilderSchemaValidator(validator SchemaValidator) ContentTypeBuilderOption
- func WithContentTypeBuilderWorkflow(workflow WorkflowEngine) ContentTypeBuilderOption
- func WithContentTypeBuilderWorkflowAuthorizer(authorizer WorkflowAuthorizer) ContentTypeBuilderOption
- type ContentTypeCapabilityContracts
- type ContentTypeCreateMsg
- type ContentTypeDeleteMsg
- type ContentTypePublishMsg
- type ContentTypeUpdateMsg
- type ContextMessageFactory
- type ConvertedFields
- type CountTranslator
- type CurrentContextResolver
- type CustomLogEntry
- type Dashboard
- func (d *Dashboard) AddDefaultInstance(area, defCode string, cfg map[string]any, span int, locale string)
- func (d *Dashboard) Areas() []WidgetAreaDefinition
- func (d *Dashboard) EnforceKnownAreas(enable bool)
- func (d *Dashboard) HasProvider(code string) bool
- func (d *Dashboard) HasRenderer() bool
- func (d *Dashboard) Page(ctx AdminContext) (dashcmp.Page, error)
- func (d *Dashboard) Providers() []DashboardProviderSpec
- func (d *Dashboard) RegisterArea(def WidgetAreaDefinition)
- func (d *Dashboard) RegisterManifest(providers []DashboardProviderSpec)
- func (d *Dashboard) RegisterProvider(spec DashboardProviderSpec)
- func (d *Dashboard) RegisterProviderChecked(spec DashboardProviderSpec) error
- func (d *Dashboard) Resolve(ctx AdminContext) ([]map[string]any, error)
- func (d *Dashboard) SetUserLayout(userID string, instances []DashboardWidgetInstance)
- func (d *Dashboard) SetUserLayoutWithContext(ctx AdminContext, instances []DashboardWidgetInstance)
- func (d *Dashboard) WithActivitySink(sink ActivitySink)
- func (d *Dashboard) WithAuthorizer(authz Authorizer)
- func (d *Dashboard) WithCommandBus(bus *CommandBus)
- func (d *Dashboard) WithLogger(logger Logger)
- func (d *Dashboard) WithPreferenceService(service *PreferencesService)
- func (d *Dashboard) WithPreferences(store DashboardPreferences)
- func (d *Dashboard) WithRegistry(reg *Registry)
- func (d *Dashboard) WithRenderer(renderer DashboardRenderer)
- func (d *Dashboard) WithWidgetService(svc CMSWidgetService)
- type DashboardAssetOwnershipProvider
- type DashboardDiagnosticsMsg
- type DashboardDiagnosticsReport
- type DashboardHandle
- type DashboardLayoutOverrides
- type DashboardLayoutRow
- type DashboardLayoutSlot
- type DashboardPreferences
- type DashboardPreferencesWithContext
- type DashboardProviderMsg
- type DashboardProviderSpec
- type DashboardRenderer
- type DashboardRendererFunc
- type DashboardWidgetInstance
- type DataActionChoice
- type DataCheckView
- type DataCoverageView
- type DataModule
- type DataModuleConfig
- type DataOverviewCounts
- type DataOverviewView
- type DataPanelActions
- type DataScenarioView
- type DataTargetView
- type DebugCollector
- func (c *DebugCollector) CaptureConfigSnapshot(snapshot map[string]any)
- func (c *DebugCollector) CaptureJSError(entry JSErrorEntry)
- func (c *DebugCollector) CaptureLog(entry LogEntry)
- func (c *DebugCollector) CaptureRequest(entry RequestEntry)
- func (c *DebugCollector) CaptureRoutes(routes []RouteEntry)
- func (c *DebugCollector) CaptureSQL(entry SQLEntry)
- func (c *DebugCollector) CaptureSession(session map[string]any)
- func (c *DebugCollector) CaptureTemplateData(viewCtx router.ViewContext)
- func (c *DebugCollector) Clear()
- func (c *DebugCollector) ClearPanel(panelID string) bool
- func (c *DebugCollector) ClearPanelStrictWithContext(ctx context.Context, panelID string) (bool, error)
- func (c *DebugCollector) ClearPanelWithContext(ctx context.Context, panelID string) bool
- func (c *DebugCollector) ClearPanelsStrictWithContext(ctx context.Context, panelIDs []string) (bool, error)
- func (c *DebugCollector) ClearStrictWithContext(ctx context.Context) error
- func (c *DebugCollector) ClearWithContext(ctx context.Context)
- func (c *DebugCollector) Get(key string) (any, bool)
- func (c *DebugCollector) Log(category, message string, fields ...any)
- func (c *DebugCollector) PanelDefinitions() []debugregistry.PanelDefinition
- func (c *DebugCollector) PanelDefinitionsWithContext(ctx context.Context) []debugregistry.PanelDefinition
- func (c *DebugCollector) PublishEvent(eventType string, payload any)
- func (c *DebugCollector) PublishPanel(panelID string, payload any)
- func (c *DebugCollector) RegisterPanel(panel DebugPanel)
- func (c *DebugCollector) RunPanelAction(ctx context.Context, req debugregistry.PanelActionRequest) (debugregistry.PanelActionResult, error)
- func (c *DebugCollector) SessionSnapshot(sessionID string, opts DebugSessionSnapshotOptions) map[string]any
- func (c *DebugCollector) SessionSnapshotWithContext(ctx context.Context, sessionID string, opts DebugSessionSnapshotOptions) map[string]any
- func (c *DebugCollector) Set(key string, value any)
- func (c *DebugCollector) SetDeliveryFailureHandler(handler func(DebugEvent)) *DebugCollector
- func (c *DebugCollector) SetJSErrorRouteEnabled(enabled bool) *DebugCollector
- func (c *DebugCollector) SetLiveTransportEnabled(enabled bool) *DebugCollector
- func (c *DebugCollector) Snapshot() map[string]any
- func (c *DebugCollector) SnapshotWithContext(ctx context.Context) map[string]any
- func (c *DebugCollector) Subscribe(id string) <-chan DebugEvent
- func (c *DebugCollector) Unsubscribe(id string)
- func (c *DebugCollector) WithSessionStore(store DebugUserSessionStore) *DebugCollector
- func (c *DebugCollector) WithURLs(urls urlkit.Resolver) *DebugCollector
- type DebugCollectorProvider
- type DebugConfig
- type DebugEvent
- type DebugLayoutMode
- type DebugLogContext
- type DebugLogContextResolver
- type DebugLogHandler
- type DebugLogHandlerOption
- type DebugLogLimits
- type DebugModule
- func (m *DebugModule) Close() error
- func (m *DebugModule) Manifest() ModuleManifest
- func (m *DebugModule) MenuItems(locale string) []MenuItem
- func (m *DebugModule) Register(ctx ModuleContext) error
- func (m *DebugModule) RouteContract() routing.ModuleContract
- func (m *DebugModule) WithMenuParent(parent string) *DebugModule
- type DebugPanel
- type DebugPanelActionProvider
- type DebugPanelUIProvider
- type DebugPanelWidgetPayload
- type DebugQueryHook
- type DebugREPLCommand
- type DebugREPLCommandCatalog
- type DebugREPLConfig
- type DebugREPLOverrideStrategy
- type DebugREPLRequest
- type DebugREPLSession
- type DebugREPLSessionManager
- func (m *DebugREPLSessionManager) Active(ctx context.Context) ([]DebugREPLSession, error)
- func (m *DebugREPLSessionManager) Close(ctx context.Context, id string, closedAt time.Time) error
- func (m *DebugREPLSessionManager) Start(ctx context.Context, session DebugREPLSession) (DebugREPLSession, error)
- type DebugREPLSessionStore
- type DebugSecureRequestResolver
- type DebugSessionSnapshotOptions
- type DebugUserSession
- type DebugUserSessionStore
- type DebugViewContextBuilder
- type DefaultIconRenderer
- type DefaultMediaDeliveryReferenceProjector
- type DefaultModuleID
- type DefaultPageMapper
- type DefaultTranslationQueueAutoCreateHook
- type DefaultTranslationQueueService
- func (s *DefaultTranslationQueueService) Approve(ctx context.Context, input TranslationQueueApproveInput) (TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) Archive(ctx context.Context, input TranslationQueueArchiveInput) (TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) Assign(ctx context.Context, input TranslationQueueAssignInput) (TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) BulkArchive(ctx context.Context, input TranslationQueueBulkArchiveInput) ([]TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) BulkAssign(ctx context.Context, input TranslationQueueBulkAssignInput) ([]TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) BulkPriority(ctx context.Context, input TranslationQueueBulkPriorityInput) ([]TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) BulkRelease(ctx context.Context, input TranslationQueueBulkReleaseInput) ([]TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) Claim(ctx context.Context, input TranslationQueueClaimInput) (TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) Reject(ctx context.Context, input TranslationQueueRejectInput) (TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) Release(ctx context.Context, input TranslationQueueReleaseInput) (TranslationAssignment, error)
- func (s *DefaultTranslationQueueService) SubmitReview(ctx context.Context, input TranslationQueueSubmitInput) (TranslationAssignment, error)
- type DefaultTranslationSuggestionService
- func (s *DefaultTranslationSuggestionService) ConfigureTranslationSuggestionServiceDependencies(deps TranslationSuggestionServiceDependencies)
- func (s *DefaultTranslationSuggestionService) EvaluateTranslationSuggestionAction(ctx context.Context, input TranslationSuggestionInput, ...) (TranslationSuggestionDecision, error)
- func (s *DefaultTranslationSuggestionService) SuggestTranslation(ctx context.Context, input TranslationSuggestionInput) (TranslationSuggestionResult, error)
- type DeliveryContentService
- func (s DeliveryContentService) Create(crud.Context, T) (T, error)
- func (s DeliveryContentService) Delete(crud.Context, T) error
- func (s *DeliveryContentService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]delivery.Content, int, error)
- func (s *DeliveryContentService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (delivery.Content, error)
- func (s DeliveryContentService) Update(crud.Context, T) (T, error)
- type DeliveryMenuService
- func (s DeliveryMenuService) Create(crud.Context, T) (T, error)
- func (s DeliveryMenuService) Delete(crud.Context, T) error
- func (s *DeliveryMenuService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]delivery.Menu, int, error)
- func (s *DeliveryMenuService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (delivery.Menu, error)
- func (s DeliveryMenuService) Update(crud.Context, T) (T, error)
- type DeliveryOptions
- type DeliveryPageService
- func (s DeliveryPageService) Create(crud.Context, T) (T, error)
- func (s DeliveryPageService) Delete(crud.Context, T) error
- func (s *DeliveryPageService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]delivery.Page, int, error)
- func (s *DeliveryPageService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (delivery.Page, error)
- func (s DeliveryPageService) Update(crud.Context, T) (T, error)
- type DeliveryServices
- type DenyAllStrategy
- type Dependencies
- type DeploymentBuildInfo
- type DeploymentDebugPanel
- func (p *DeploymentDebugPanel) Collect(context.Context) map[string]any
- func (p *DeploymentDebugPanel) ID() string
- func (p *DeploymentDebugPanel) Icon() string
- func (p *DeploymentDebugPanel) Label() string
- func (p *DeploymentDebugPanel) Span() int
- func (p *DeploymentDebugPanel) UI() *debugregistry.PanelUI
- type DeploymentIdentity
- type DeploymentIdentityConfig
- type DeploymentIdentityResolverOption
- func WithDeploymentBuildInfo(lookup func() (DeploymentBuildInfo, bool)) DeploymentIdentityResolverOption
- func WithDeploymentClock(now func() time.Time) DeploymentIdentityResolverOption
- func WithDeploymentEnvironmentLookup(lookup func(string) (string, bool)) DeploymentIdentityResolverOption
- func WithDeploymentHostnameLookup(lookup func() (string, error)) DeploymentIdentityResolverOption
- func WithDeploymentPersonaGenerator(generator deploymentidentity.Generator) DeploymentIdentityResolverOption
- func WithDeploymentRandomSource(source io.Reader) DeploymentIdentityResolverOption
- type DeploymentIdentitySnapshot
- type DeploymentPersona
- type DeploymentPersonaConfig
- type DeploymentPersonaGenerator
- type DeploymentPersonaGeneratorFunc
- type DeploymentPersonaInput
- type DeploymentPersonaVisual
- type DevErrorContext
- type DisabledBulkService
- type DisabledMediaLibrary
- type DisabledNotificationService
- type DispatchFactory
- type DispatchOutcome
- type DoctorAction
- type DoctorActionExecution
- type DoctorActionKind
- type DoctorActionRun
- type DoctorActionState
- type DoctorCheck
- type DoctorCheckOutput
- type DoctorCheckResult
- type DoctorDebugPanel
- type DoctorFinding
- type DoctorReport
- type DoctorSeverity
- type DoctorSummary
- type DomainErrorCode
- type DynamicPanelFactory
- func (f *DynamicPanelFactory) CreatePanelFromContentType(ctx context.Context, contentType *CMSContentType) (*Panel, error)
- func (f *DynamicPanelFactory) RefreshPanel(ctx context.Context, contentType *CMSContentType) error
- func (f *DynamicPanelFactory) RemovePanel(ctx context.Context, slugOrID string) error
- type DynamicPanelFactoryOption
- func WithDynamicPanelHooks(hooks DynamicPanelHooks) DynamicPanelFactoryOption
- func WithDynamicPanelMenu(basePath, menuCode, menuParent, locale string) DynamicPanelFactoryOption
- func WithDynamicPanelSchemaConverter(converter *SchemaToFieldsConverter) DynamicPanelFactoryOption
- func WithDynamicPanelSchemaValidator(validator SchemaValidator) DynamicPanelFactoryOption
- type DynamicPanelHooks
- type EffectiveScope
- type EnhancedActionNegotiationConfig
- type EnhancedActionRuntimeOptions
- type EnhancedFragment
- type EnhancedMutationError
- type EnhancedMutationResponder
- func (r EnhancedMutationResponder) Respond(c router.Context, req crud.MutationRequest, presentation MutationPresentation, ...) error
- func (r EnhancedMutationResponder) RespondError(c router.Context, req crud.MutationRequest, err error, ...) error
- func (r EnhancedMutationResponder) WithMediaType(mediaType string) EnhancedMutationResponder
- type EnhancedToast
- type EnsureMenuParentsOptions
- type EntryNavigationEvaluation
- type EntryNavigationOptions
- type EntryNavigationPolicy
- func EntryNavigationPolicyFromContentType(contentType CMSContentType) EntryNavigationPolicy
- func EntryNavigationPolicyFromOptions(contentType CMSContentType, options EntryNavigationOptions) EntryNavigationPolicy
- func ResolveEntryNavigationPolicy(ctx context.Context, service CMSContentTypeService, contentTypeKey string) (EntryNavigationPolicy, bool)
- func ResolveEntryNavigationPolicyWithOptions(ctx context.Context, service CMSContentTypeService, contentTypeKey string, ...) (EntryNavigationPolicy, bool)
- type EntryNavigationTypeOptions
- type EntryNavigationViewModel
- type EntryNavigationViewModelInput
- type EnvironmentInfo
- type ErrorConfig
- type ErrorPresenter
- func (p ErrorPresenter) BuildDevErrorContext(err error, reqInfo *RequestInfo) *DevErrorContext
- func (p ErrorPresenter) DeploymentIdentity() DeploymentIdentity
- func (p ErrorPresenter) ErrorResponse(mapped *goerrors.Error) ErrorResponse
- func (p ErrorPresenter) IncludeStackTrace() bool
- func (p ErrorPresenter) Present(err error) (*goerrors.Error, int)
- func (p ErrorPresenter) PresentWithContext(c router.Context, err error) (*goerrors.Error, int)
- func (p ErrorPresenter) WithDeploymentIdentity(identity DeploymentIdentity) ErrorPresenter
- type ErrorResponse
- type ExportColumn
- type ExportConfig
- type ExportDefinition
- type ExportHTTPRegistrar
- type ExportMetadata
- type ExportMetadataProvider
- type ExportRegistry
- type ExportRouteOptions
- type ExportRouteWrapper
- type ExternalAssetConfig
- type FSMLifecycleActivitySinkAdapter
- type FSMWorkflowEngine
- func (e *FSMWorkflowEngine) ApplyEvent(ctx context.Context, input WorkflowApplyEventRequest) (*WorkflowApplyEventResponse, error)
- func (e *FSMWorkflowEngine) AttachActivitySink(sink ActivitySink) error
- func (e *FSMWorkflowEngine) HasWorkflow(entityType string) bool
- func (e *FSMWorkflowEngine) RegisterAction(name string, action WorkflowActionFunc) error
- func (e *FSMWorkflowEngine) RegisterDynamicTarget(ref string, resolver WorkflowDynamicTargetResolver) error
- func (e *FSMWorkflowEngine) RegisterGuard(ref string, guard WorkflowGuardFunc) error
- func (e *FSMWorkflowEngine) RegisterWorkflow(entityType string, definition WorkflowDefinition) error
- func (e *FSMWorkflowEngine) Snapshot(ctx context.Context, input WorkflowSnapshotRequest) (*WorkflowSnapshot, error)
- func (e *FSMWorkflowEngine) UnregisterWorkflow(entityType string) error
- func (e *FSMWorkflowEngine) WorkflowDefinition(entityType string) (WorkflowDefinition, bool)
- type FSMWorkflowEngineOption
- func WithFSMWorkflowActivitySink(sink ActivitySink) FSMWorkflowEngineOption
- func WithFSMWorkflowExecutionPolicy(policy flow.ExecutionPolicy) FSMWorkflowEngineOption
- func WithFSMWorkflowHookFailureMode(mode flow.HookFailureMode) FSMWorkflowEngineOption
- func WithFSMWorkflowIdempotencyStore(store flow.IdempotencyStore[WorkflowMessage]) FSMWorkflowEngineOption
- func WithFSMWorkflowLifecycleHooks(hooks ...flow.TransitionLifecycleHook[WorkflowMessage]) FSMWorkflowEngineOption
- func WithFSMWorkflowLogger(logger flow.Logger) FSMWorkflowEngineOption
- func WithFSMWorkflowStateStore(store flow.StateStore) FSMWorkflowEngineOption
- type FamilyDetailFragmentRenderer
- type FamilyDetailFragmentTarget
- type FeatureDependencyError
- type FeatureDisabledError
- type FeatureFlagsModule
- func (m *FeatureFlagsModule) Manifest() ModuleManifest
- func (m *FeatureFlagsModule) MenuItems(locale string) []MenuItem
- func (m *FeatureFlagsModule) Register(ctx ModuleContext) error
- func (m *FeatureFlagsModule) RouteContract() routing.ModuleContract
- func (m *FeatureFlagsModule) WithBasePath(basePath string) *FeatureFlagsModule
- func (m *FeatureFlagsModule) WithMenuParent(parent string) *FeatureFlagsModule
- type FeatureKey
- type Field
- type FieldTypeCategory
- type FieldTypeCategoryGroup
- type FieldTypeDefinition
- type FieldTypeRegistry
- func (r *FieldTypeRegistry) Categories() []FieldTypeCategory
- func (r *FieldTypeRegistry) FieldTypes() []FieldTypeDefinition
- func (r *FieldTypeRegistry) Groups() []FieldTypeCategoryGroup
- func (r *FieldTypeRegistry) Register(def FieldTypeDefinition)
- func (r *FieldTypeRegistry) RegisterCategory(category FieldTypeCategory)
- type FieldsLogger
- type Filter
- type FilterOnlyRequestValidator
- type FormgenSchemaValidator
- func (v *FormgenSchemaValidator) Preview(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) ([]byte, error)
- func (v *FormgenSchemaValidator) RenderForm(ctx context.Context, schema map[string]any, opts SchemaValidationOptions, ...) (string, error)
- func (v *FormgenSchemaValidator) Validate(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) error
- type GoAuthAuthenticator
- func (a *GoAuthAuthenticator) AuthenticateRequest(ctx router.Context) error
- func (a *GoAuthAuthenticator) EnforceBrowserCSRF(c router.Context) error
- func (a *GoAuthAuthenticator) UsesBrowserSession(c router.Context) bool
- func (a *GoAuthAuthenticator) Wrap(ctx router.Context) error
- func (a *GoAuthAuthenticator) WrapHandler(handler router.HandlerFunc) router.HandlerFunc
- type GoAuthAuthenticatorOption
- func WithAuthErrorHandler(handler func(router.Context, error) error) GoAuthAuthenticatorOption
- func WithBrowserProtectionConfig(config auth.BrowserProtectionConfig) GoAuthAuthenticatorOption
- func WithOptionalAuth(optional bool) GoAuthAuthenticatorOption
- func WithProtectedSurfaceRoots(browserRoots, apiRoots []string) GoAuthAuthenticatorOption
- type GoAuthAuthorizer
- func (a *GoAuthAuthorizer) Can(ctx context.Context, permission string, resource string) bool
- func (a *GoAuthAuthorizer) CanAll(ctx context.Context, resource string, permissions ...string) bool
- func (a *GoAuthAuthorizer) CanAny(ctx context.Context, resource string, permissions ...string) bool
- func (a *GoAuthAuthorizer) PermissionResolverMetrics() PermissionResolverMetrics
- func (a *GoAuthAuthorizer) ResolvedPermissions(ctx context.Context) []string
- type GoAuthAuthorizerConfig
- type GoCMSContainerAdapter
- func (c *GoCMSContainerAdapter) ActiveLocales(ctx context.Context) ([]string, error)
- func (c *GoCMSContainerAdapter) ContentService() CMSContentService
- func (c *GoCMSContainerAdapter) ContentTypeService() CMSContentTypeService
- func (c *GoCMSContainerAdapter) MenuService() CMSMenuService
- func (c *GoCMSContainerAdapter) WidgetService() CMSWidgetService
- type GoCMSContentAdapter
- func (a *GoCMSContentAdapter) BlockDefinitionVersions(ctx context.Context, id string) ([]CMSBlockDefinitionVersion, error)
- func (a *GoCMSContentAdapter) BlockDefinitions(ctx context.Context) ([]CMSBlockDefinition, error)
- func (a *GoCMSContentAdapter) BlocksForContent(ctx context.Context, contentID, locale string) ([]CMSBlock, error)
- func (a *GoCMSContentAdapter) Content(ctx context.Context, id, locale string) (*CMSContent, error)
- func (a *GoCMSContentAdapter) Contents(ctx context.Context, locale string) ([]CMSContent, error)
- func (a *GoCMSContentAdapter) ContentsWithOptions(ctx context.Context, locale string, opts ...CMSContentListOption) ([]CMSContent, error)
- func (a *GoCMSContentAdapter) CreateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
- func (a *GoCMSContentAdapter) CreateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
- func (a *GoCMSContentAdapter) CreatePage(ctx context.Context, page CMSPage) (*CMSPage, error)
- func (a *GoCMSContentAdapter) CreateTranslation(ctx context.Context, input TranslationCreateInput) (*CMSContent, error)
- func (a *GoCMSContentAdapter) DeleteBlock(ctx context.Context, id string) error
- func (a *GoCMSContentAdapter) DeleteBlockDefinition(ctx context.Context, id string) error
- func (a *GoCMSContentAdapter) DeleteContent(ctx context.Context, id string) error
- func (a *GoCMSContentAdapter) DeletePage(ctx context.Context, id string) error
- func (a *GoCMSContentAdapter) LegacyBlocksForContent(ctx context.Context, contentID, locale string) ([]CMSBlock, error)
- func (a *GoCMSContentAdapter) ListContentTypeFamilies(ctx context.Context, contentType CMSContentType, opts ListOptions) ([]map[string]any, int, error)
- func (a *GoCMSContentAdapter) ListContentTypeRecords(ctx context.Context, contentType CMSContentType, opts ListOptions) ([]map[string]any, int, error)
- func (a *GoCMSContentAdapter) Page(ctx context.Context, id, locale string) (*CMSPage, error)
- func (a *GoCMSContentAdapter) Pages(ctx context.Context, locale string) ([]CMSPage, error)
- func (a *GoCMSContentAdapter) PagesWithOptions(ctx context.Context, locale string, opts ...CMSContentListOption) ([]CMSPage, error)
- func (a *GoCMSContentAdapter) SaveBlock(ctx context.Context, block CMSBlock) (*CMSBlock, error)
- func (a *GoCMSContentAdapter) SupportsContentListOption(option CMSContentListOption) bool
- func (a *GoCMSContentAdapter) UpdateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
- func (a *GoCMSContentAdapter) UpdateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
- func (a *GoCMSContentAdapter) UpdatePage(ctx context.Context, page CMSPage) (*CMSPage, error)
- type GoCMSContentTypeAdapter
- func (a *GoCMSContentTypeAdapter) ContentType(ctx context.Context, id string) (*CMSContentType, error)
- func (a *GoCMSContentTypeAdapter) ContentTypeBySlug(ctx context.Context, slug string) (*CMSContentType, error)
- func (a *GoCMSContentTypeAdapter) ContentTypes(ctx context.Context) ([]CMSContentType, error)
- func (a *GoCMSContentTypeAdapter) CreateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
- func (a *GoCMSContentTypeAdapter) DeleteContentType(ctx context.Context, id string) error
- func (a *GoCMSContentTypeAdapter) UpdateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
- type GoCMSMenuAdapter
- func (a *GoCMSMenuAdapter) AddMenuItem(ctx context.Context, menuCode string, item MenuItem) error
- func (a *GoCMSMenuAdapter) CreateMenu(ctx context.Context, code string) (*Menu, error)
- func (a *GoCMSMenuAdapter) DeleteMenuItem(ctx context.Context, menuCode, id string) error
- func (a *GoCMSMenuAdapter) GoCMSMenuService() cms.MenuService
- func (a *GoCMSMenuAdapter) Menu(ctx context.Context, code, locale string) (*Menu, error)
- func (a *GoCMSMenuAdapter) MenuByCodeWithOptions(ctx context.Context, code, locale string, opts SiteMenuReadOptions) (*Menu, error)
- func (a *GoCMSMenuAdapter) MenuByLocation(ctx context.Context, location, locale string) (*Menu, error)
- func (a *GoCMSMenuAdapter) MenuByLocationWithOptions(ctx context.Context, location, locale string, opts SiteMenuReadOptions) (*Menu, error)
- func (a *GoCMSMenuAdapter) MenuExists(ctx context.Context, code string) (bool, error)
- func (a *GoCMSMenuAdapter) NavigationCoordinationReport() NavigationCoordinationReport
- func (a *GoCMSMenuAdapter) NavigationPersistenceReport() NavigationPersistenceReport
- func (a *GoCMSMenuAdapter) RawMenuItems(ctx context.Context, code string) ([]MenuItem, error)
- func (a *GoCMSMenuAdapter) RawMenuItemsWithOptions(ctx context.Context, opts NavigationRawInventoryOptions) ([]MenuItem, error)
- func (a *GoCMSMenuAdapter) ReorderMenu(ctx context.Context, menuCode string, orderedIDs []string) error
- func (a *GoCMSMenuAdapter) ResetMenuContext(ctx context.Context, code string) error
- func (a *GoCMSMenuAdapter) String() string
- func (a *GoCMSMenuAdapter) UpdateMenuItem(ctx context.Context, menuCode string, item MenuItem) error
- type GoCMSTranslationPolicy
- type GoCMSWidgetAdapter
- func (a *GoCMSWidgetAdapter) Areas() []WidgetAreaDefinition
- func (a *GoCMSWidgetAdapter) Definitions() []WidgetDefinition
- func (a *GoCMSWidgetAdapter) DeleteDefinition(ctx context.Context, code string) error
- func (a *GoCMSWidgetAdapter) DeleteInstance(ctx context.Context, id string) error
- func (a *GoCMSWidgetAdapter) HasInstanceForDefinition(ctx context.Context, definitionCode string, filter WidgetInstanceFilter) (bool, error)
- func (a *GoCMSWidgetAdapter) ListInstances(ctx context.Context, filter WidgetInstanceFilter) ([]WidgetInstance, error)
- func (a *GoCMSWidgetAdapter) RegisterAreaDefinition(ctx context.Context, def WidgetAreaDefinition) error
- func (a *GoCMSWidgetAdapter) RegisterDefinition(ctx context.Context, def WidgetDefinition) error
- func (a *GoCMSWidgetAdapter) SaveInstance(ctx context.Context, instance WidgetInstance) (*WidgetInstance, error)
- func (a *GoCMSWidgetAdapter) SyncDefinition(ctx context.Context, def WidgetDefinition) (*WidgetDefinitionSyncResult, error)
- type GoOptionsSettingsAdapter
- func (a *GoOptionsSettingsAdapter) Apply(ctx context.Context, bundle SettingsBundle) error
- func (a *GoOptionsSettingsAdapter) Definitions() []SettingDefinition
- func (a *GoOptionsSettingsAdapter) RegisterDefinition(def SettingDefinition)
- func (a *GoOptionsSettingsAdapter) Resolve(key, userID string) ResolvedSetting
- func (a *GoOptionsSettingsAdapter) ResolveAll(userID string) map[string]ResolvedSetting
- func (a *GoOptionsSettingsAdapter) Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
- func (a *GoOptionsSettingsAdapter) WithSchemaOptions(options ...opts.Option)
- type GoSearchBundle
- type GoSearchBundleConfig
- type GoSearchGlobalAdapter
- type GoSearchGlobalAdapterConfig
- type GoSearchOperations
- func (o *GoSearchOperations) Ensure(ctx context.Context, def searchtypes.IndexDefinition) error
- func (o *GoSearchOperations) HealthStatus(ctx context.Context) (searchtypes.HealthStatus, error)
- func (o *GoSearchOperations) ReindexAll(ctx context.Context, index string, batchSize int) error
- func (o *GoSearchOperations) StatsSnapshot(ctx context.Context) (searchtypes.StatsResult, error)
- type GoSearchSiteProvider
- type GoSearchSiteProviderConfig
- type GoUsersProfileStore
- type GoUsersRoleRepository
- func (r *GoUsersRoleRepository) Assign(ctx context.Context, userID, roleID string) error
- func (r *GoUsersRoleRepository) Create(ctx context.Context, role RoleRecord) (RoleRecord, error)
- func (r *GoUsersRoleRepository) Delete(ctx context.Context, id string) error
- func (r *GoUsersRoleRepository) Get(ctx context.Context, id string) (RoleRecord, error)
- func (r *GoUsersRoleRepository) List(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
- func (r *GoUsersRoleRepository) RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
- func (r *GoUsersRoleRepository) Unassign(ctx context.Context, userID, roleID string) error
- func (r *GoUsersRoleRepository) Update(ctx context.Context, role RoleRecord) (RoleRecord, error)
- type GoUsersUserRepository
- func (r *GoUsersUserRepository) Create(ctx context.Context, user UserRecord) (UserRecord, error)
- func (r *GoUsersUserRepository) Delete(ctx context.Context, id string) error
- func (r *GoUsersUserRepository) Get(ctx context.Context, id string) (UserRecord, error)
- func (r *GoUsersUserRepository) List(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
- func (r *GoUsersUserRepository) Search(ctx context.Context, query string, limit int) ([]UserRecord, error)
- func (r *GoUsersUserRepository) Update(ctx context.Context, user UserRecord) (UserRecord, error)
- type GuardrailedSchemaValidator
- func (v *GuardrailedSchemaValidator) Guardrails() *SchemaGuardrails
- func (v *GuardrailedSchemaValidator) Preview(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) ([]byte, error)
- func (v *GuardrailedSchemaValidator) Validate(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) error
- type HandlerAuthenticator
- type IconCategory
- type IconContributor
- type IconContributorAdapter
- func (a *IconContributorAdapter) IconDefinitions() []IconDefinition
- func (a *IconContributorAdapter) IconLibraries() []IconLibrary
- func (a *IconContributorAdapter) WithIcon(icon IconDefinition) *IconContributorAdapter
- func (a *IconContributorAdapter) WithLibrary(lib IconLibrary) *IconContributorAdapter
- type IconContributorCallbacks
- type IconDefinition
- type IconLibrary
- type IconReference
- type IconRenderMode
- type IconRenderOptions
- type IconRenderer
- type IconSecurityPolicy
- type IconSecurityResult
- type IconSecurityValidator
- type IconService
- func (s *IconService) Categories(libraryID string) []IconCategory
- func (s *IconService) Defaults() IconServiceDefaults
- func (s *IconService) Libraries() []IconLibrary
- func (s *IconService) Library(id string) (IconLibrary, bool)
- func (s *IconService) LibraryIcons(libraryID, category string) []IconDefinition
- func (s *IconService) RegisterIcon(icon IconDefinition) error
- func (s *IconService) RegisterLibrary(lib IconLibrary) error
- func (s *IconService) Render(ref IconReference, opts IconRenderOptions) string
- func (s *IconService) RenderFromString(rawRef string, trusted bool, variant string) string
- func (s *IconService) RenderString(value string, opts IconRenderOptions) string
- func (s *IconService) Renderer() *DefaultIconRenderer
- func (s *IconService) Resolve(ref IconReference) (*IconDefinition, error)
- func (s *IconService) ResolveString(value string) (*IconDefinition, error)
- func (s *IconService) Search(ctx context.Context, query string, limit int, libraryIDs ...string) []IconDefinition
- func (s *IconService) SecurityPolicy() IconSecurityPolicy
- func (s *IconService) UnregisterLibrary(id string) error
- type IconServiceDefaults
- type IconServiceOption
- func WithDefaultLibrary(library string) IconServiceOption
- func WithDefaultVariant(variant string) IconServiceOption
- func WithFallbackIcon(icon string) IconServiceOption
- func WithIconSecurityPolicy(policy IconSecurityPolicy) IconServiceOption
- func WithIconServiceLogger(logger Logger) IconServiceOption
- type IconType
- type InMemoryBulkService
- type InMemoryContentService
- func (s *InMemoryContentService) BlockDefinitionVersions(ctx context.Context, id string) ([]CMSBlockDefinitionVersion, error)
- func (s *InMemoryContentService) BlockDefinitions(ctx context.Context) ([]CMSBlockDefinition, error)
- func (s *InMemoryContentService) BlocksForContent(_ context.Context, contentID, locale string) ([]CMSBlock, error)
- func (s *InMemoryContentService) Content(_ context.Context, id, locale string) (*CMSContent, error)
- func (s *InMemoryContentService) ContentType(ctx context.Context, id string) (*CMSContentType, error)
- func (s *InMemoryContentService) ContentTypeBySlug(ctx context.Context, slug string) (*CMSContentType, error)
- func (s *InMemoryContentService) ContentTypes(ctx context.Context) ([]CMSContentType, error)
- func (s *InMemoryContentService) Contents(_ context.Context, locale string) ([]CMSContent, error)
- func (s *InMemoryContentService) CreateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
- func (s *InMemoryContentService) CreateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
- func (s *InMemoryContentService) CreateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
- func (s *InMemoryContentService) CreatePage(ctx context.Context, page CMSPage) (*CMSPage, error)
- func (s *InMemoryContentService) CreateTranslation(ctx context.Context, input TranslationCreateInput) (*CMSContent, error)
- func (s *InMemoryContentService) DeleteBlock(ctx context.Context, id string) error
- func (s *InMemoryContentService) DeleteBlockDefinition(ctx context.Context, id string) error
- func (s *InMemoryContentService) DeleteContent(ctx context.Context, id string) error
- func (s *InMemoryContentService) DeleteContentType(ctx context.Context, id string) error
- func (s *InMemoryContentService) DeletePage(ctx context.Context, id string) error
- func (s *InMemoryContentService) LegacyBlocksForContent(_ context.Context, contentID, locale string) ([]CMSBlock, error)
- func (s *InMemoryContentService) Page(_ context.Context, id, locale string) (*CMSPage, error)
- func (s *InMemoryContentService) Pages(_ context.Context, locale string) ([]CMSPage, error)
- func (s *InMemoryContentService) SaveBlock(ctx context.Context, block CMSBlock) (*CMSBlock, error)
- func (s *InMemoryContentService) UpdateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
- func (s *InMemoryContentService) UpdateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
- func (s *InMemoryContentService) UpdateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
- func (s *InMemoryContentService) UpdatePage(ctx context.Context, page CMSPage) (*CMSPage, error)
- func (s *InMemoryContentService) WithActivitySink(sink ActivitySink)
- type InMemoryDashboardPreferences
- type InMemoryDebugREPLSessionStore
- func (s *InMemoryDebugREPLSessionStore) Close(_ context.Context, id string, closedAt time.Time) error
- func (s *InMemoryDebugREPLSessionStore) Create(_ context.Context, session DebugREPLSession) error
- func (s *InMemoryDebugREPLSessionStore) Get(_ context.Context, id string) (DebugREPLSession, bool, error)
- func (s *InMemoryDebugREPLSessionStore) ListActive(_ context.Context) ([]DebugREPLSession, error)
- type InMemoryDebugUserSessionStore
- func (s *InMemoryDebugUserSessionStore) Expire(_ context.Context, olderThan time.Duration) (int, error)
- func (s *InMemoryDebugUserSessionStore) Get(_ context.Context, sessionID string) (DebugUserSession, bool, error)
- func (s *InMemoryDebugUserSessionStore) ListActive(_ context.Context) ([]DebugUserSession, error)
- func (s *InMemoryDebugUserSessionStore) Upsert(_ context.Context, session DebugUserSession) error
- type InMemoryMediaLibrary
- type InMemoryMenuService
- func (s *InMemoryMenuService) AddMenuItem(ctx context.Context, menuCode string, item MenuItem) error
- func (s *InMemoryMenuService) CreateMenu(ctx context.Context, code string) (*Menu, error)
- func (s *InMemoryMenuService) DeleteMenuItem(ctx context.Context, menuCode, id string) error
- func (s *InMemoryMenuService) Menu(_ context.Context, code, locale string) (*Menu, error)
- func (s *InMemoryMenuService) MenuByCodeWithOptions(ctx context.Context, code, locale string, _ SiteMenuReadOptions) (*Menu, error)
- func (s *InMemoryMenuService) MenuByLocation(ctx context.Context, location, locale string) (*Menu, error)
- func (s *InMemoryMenuService) MenuByLocationWithOptions(ctx context.Context, location, locale string, _ SiteMenuReadOptions) (*Menu, error)
- func (s *InMemoryMenuService) MenuExists(_ context.Context, code string) (bool, error)
- func (s *InMemoryMenuService) NavigationCoordinationReport() NavigationCoordinationReport
- func (s *InMemoryMenuService) NavigationPersistenceReport() NavigationPersistenceReport
- func (s *InMemoryMenuService) RawMenuItems(_ context.Context, code string) ([]MenuItem, error)
- func (s *InMemoryMenuService) RawMenuItemsWithOptions(ctx context.Context, opts NavigationRawInventoryOptions) ([]MenuItem, error)
- func (s *InMemoryMenuService) ReorderMenu(ctx context.Context, menuCode string, orderedIDs []string) error
- func (s *InMemoryMenuService) ResetMenu(code string)
- func (s *InMemoryMenuService) ResetMenuContext(ctx context.Context, code string) error
- func (s *InMemoryMenuService) UpdateMenuItem(ctx context.Context, menuCode string, item MenuItem) error
- func (s *InMemoryMenuService) WithActivitySink(sink ActivitySink)
- func (s *InMemoryMenuService) WithNavigationConvergence(ctx context.Context, _ NavigationConvergenceScope, ...) error
- type InMemoryNotificationService
- func (s *InMemoryNotificationService) Add(ctx context.Context, n Notification) (Notification, error)
- func (s *InMemoryNotificationService) List(ctx context.Context) ([]Notification, error)
- func (s *InMemoryNotificationService) Mark(ctx context.Context, ids []string, read bool) error
- func (s *InMemoryNotificationService) WithActivitySink(sink ActivitySink)
- type InMemoryOrganizationStore
- func (s *InMemoryOrganizationStore) Create(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
- func (s *InMemoryOrganizationStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryOrganizationStore) Get(ctx context.Context, id string) (OrganizationRecord, error)
- func (s *InMemoryOrganizationStore) List(ctx context.Context, opts ListOptions) ([]OrganizationRecord, int, error)
- func (s *InMemoryOrganizationStore) Search(ctx context.Context, query string, limit int) ([]OrganizationRecord, error)
- func (s *InMemoryOrganizationStore) Update(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
- type InMemoryPreferencesStore
- func (s *InMemoryPreferencesStore) Delete(ctx context.Context, input PreferencesDeleteInput) error
- func (s *InMemoryPreferencesStore) Resolve(ctx context.Context, input PreferencesResolveInput) (PreferenceSnapshot, error)
- func (s *InMemoryPreferencesStore) Upsert(ctx context.Context, input PreferencesUpsertInput) (PreferenceSnapshot, error)
- type InMemoryProfileStore
- type InMemoryTenantStore
- func (s *InMemoryTenantStore) Create(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
- func (s *InMemoryTenantStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryTenantStore) Get(ctx context.Context, id string) (TenantRecord, error)
- func (s *InMemoryTenantStore) List(ctx context.Context, opts ListOptions) ([]TenantRecord, int, error)
- func (s *InMemoryTenantStore) Search(ctx context.Context, query string, limit int) ([]TenantRecord, error)
- func (s *InMemoryTenantStore) Update(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
- type InMemoryTranslationAssignmentRepository
- func (r *InMemoryTranslationAssignmentRepository) AssignmentReviewerAggregateSummary(_ context.Context, input TranslationAssignmentReviewerAggregateInput) (TranslationAssignmentReviewerAggregateSummary, error)
- func (r *InMemoryTranslationAssignmentRepository) Create(_ context.Context, assignment TranslationAssignment) (TranslationAssignment, error)
- func (r *InMemoryTranslationAssignmentRepository) CreateOrReuseActive(_ context.Context, assignment TranslationAssignment) (TranslationAssignment, bool, error)
- func (r *InMemoryTranslationAssignmentRepository) DistinctAssignmentEntityTypes(_ context.Context) ([]string, error)
- func (r *InMemoryTranslationAssignmentRepository) DistinctAssignmentLocales(_ context.Context, filters map[string]any) ([]string, error)
- func (r *InMemoryTranslationAssignmentRepository) DistinctAssignmentTranslationGroups(_ context.Context, filters map[string]any) ([]TranslationAssignmentGroupOption, error)
- func (r *InMemoryTranslationAssignmentRepository) Get(_ context.Context, id string) (TranslationAssignment, error)
- func (r *InMemoryTranslationAssignmentRepository) List(_ context.Context, opts ListOptions) ([]TranslationAssignment, int, error)
- func (r *InMemoryTranslationAssignmentRepository) ListAssignmentFamilyGroups(ctx context.Context, input TranslationAssignmentFamilyGroupQueryInput) (TranslationAssignmentFamilyGroupQueryResult, error)
- func (r *InMemoryTranslationAssignmentRepository) ListAssignmentFamilyOptions(_ context.Context, input TranslationAssignmentFamilyOptionQueryInput) (TranslationAssignmentFamilyOptionQueryResult, error)
- func (r *InMemoryTranslationAssignmentRepository) ListAssignmentPage(ctx context.Context, input TranslationAssignmentPageQueryInput) (TranslationAssignmentPageQueryResult, error)
- func (r *InMemoryTranslationAssignmentRepository) ListAssignmentSnapshot(ctx context.Context, input TranslationAssignmentSnapshotQueryInput) (TranslationAssignmentSnapshotQueryResult, error)
- func (r *InMemoryTranslationAssignmentRepository) ListFamilyAssignments(ctx context.Context, input TranslationAssignmentFamilyAssignmentsQueryInput) (TranslationAssignmentFamilyAssignmentsQueryResult, error)
- func (r *InMemoryTranslationAssignmentRepository) Update(_ context.Context, assignment TranslationAssignment, expectedVersion int64) (TranslationAssignment, error)
- type InMemoryUserStore
- func (s *InMemoryUserStore) Assign(ctx context.Context, userID, roleID string) error
- func (s *InMemoryUserStore) Create(ctx context.Context, role RoleRecord) (RoleRecord, error)
- func (s *InMemoryUserStore) CreateUser(ctx context.Context, user UserRecord) (UserRecord, error)
- func (s *InMemoryUserStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryUserStore) DeleteUser(ctx context.Context, id string) error
- func (s *InMemoryUserStore) Get(ctx context.Context, id string) (RoleRecord, error)
- func (s *InMemoryUserStore) GetUser(ctx context.Context, id string) (UserRecord, error)
- func (s *InMemoryUserStore) List(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
- func (s *InMemoryUserStore) ListUsers(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
- func (s *InMemoryUserStore) RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
- func (s *InMemoryUserStore) Search(ctx context.Context, query string, limit int) ([]UserRecord, error)
- func (s *InMemoryUserStore) Unassign(ctx context.Context, userID, roleID string) error
- func (s *InMemoryUserStore) Update(ctx context.Context, role RoleRecord) (RoleRecord, error)
- func (s *InMemoryUserStore) UpdateUser(ctx context.Context, user UserRecord) (UserRecord, error)
- type InMemoryWidgetService
- func (s *InMemoryWidgetService) Areas() []WidgetAreaDefinition
- func (s *InMemoryWidgetService) Definitions() []WidgetDefinition
- func (s *InMemoryWidgetService) DeleteDefinition(ctx context.Context, code string) error
- func (s *InMemoryWidgetService) DeleteInstance(ctx context.Context, id string) error
- func (s *InMemoryWidgetService) HasInstanceForDefinition(_ context.Context, definitionCode string, filter WidgetInstanceFilter) (bool, error)
- func (s *InMemoryWidgetService) ListInstances(_ context.Context, filter WidgetInstanceFilter) ([]WidgetInstance, error)
- func (s *InMemoryWidgetService) RegisterAreaDefinition(ctx context.Context, def WidgetAreaDefinition) error
- func (s *InMemoryWidgetService) RegisterDefinition(ctx context.Context, def WidgetDefinition) error
- func (s *InMemoryWidgetService) SaveInstance(ctx context.Context, instance WidgetInstance) (*WidgetInstance, error)
- func (s *InMemoryWidgetService) SyncDefinition(ctx context.Context, def WidgetDefinition) (*WidgetDefinitionSyncResult, error)
- func (s *InMemoryWidgetService) WithActivitySink(sink ActivitySink)
- type InMemoryWorkflowBindingRepository
- func (r *InMemoryWorkflowBindingRepository) Create(_ context.Context, binding WorkflowBinding) (WorkflowBinding, error)
- func (r *InMemoryWorkflowBindingRepository) Delete(_ context.Context, id string) error
- func (r *InMemoryWorkflowBindingRepository) Get(_ context.Context, id string) (WorkflowBinding, error)
- func (r *InMemoryWorkflowBindingRepository) List(_ context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
- func (r *InMemoryWorkflowBindingRepository) ListByScope(_ context.Context, scopeType WorkflowBindingScopeType, scopeRef string, ...) ([]WorkflowBinding, error)
- func (r *InMemoryWorkflowBindingRepository) Update(_ context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
- type InMemoryWorkflowDefinitionRepository
- func (r *InMemoryWorkflowDefinitionRepository) Create(_ context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
- func (r *InMemoryWorkflowDefinitionRepository) Get(_ context.Context, id string) (PersistedWorkflow, error)
- func (r *InMemoryWorkflowDefinitionRepository) GetVersion(_ context.Context, id string, version int) (PersistedWorkflow, error)
- func (r *InMemoryWorkflowDefinitionRepository) List(_ context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
- func (r *InMemoryWorkflowDefinitionRepository) Update(_ context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
- type InvalidDependenciesError
- type InvalidFeatureConfigError
- type JSErrorEntry
- type Job
- type JobErrorEvent
- type JobErrorObserver
- type JobErrorStage
- type JobRegistry
- func (j *JobRegistry) Enable(enabled bool)
- func (j *JobRegistry) List() []Job
- func (j *JobRegistry) Sync(ctx context.Context) error
- func (j *JobRegistry) Trigger(ctx AdminContext, name string) error
- func (j *JobRegistry) WithActivitySink(sink ActivitySink)
- func (j *JobRegistry) WithErrorObserver(observer JobErrorObserver)
- func (j *JobRegistry) WithGoJob(registry gojob.Registry, scheduler goJobScheduler)
- type LegacyChartSampleWidgetPayload
- type ListOptions
- type ListPredicate
- type LocalCommandRunTransport
- func (t *LocalCommandRunTransport) Capabilities() CommandRunTransportCapabilities
- func (t *LocalCommandRunTransport) Close(ctx context.Context) error
- func (t *LocalCommandRunTransport) PublishCommandRun(ctx context.Context, update CommandRunUpdate) error
- func (t *LocalCommandRunTransport) SubscribeCommandRuns(ctx context.Context, selector CommandRunSelector, handler CommandRunHandler) (CommandRunSubscription, error)
- type LocalCommandRunTransportConfig
- type LocalePathMigrationApplyResult
- type LocalePathMigrationFamilyPlan
- type LocalePathMigrationOptions
- type LocalePathMigrationRecordPlan
- type LocalePathMigrationReport
- type LocalePathMigrationRewrite
- type LocalePathMigrationSummary
- type LocalePathRecordClassification
- type LocalePathRouteKeyReadiness
- type LogCaller
- type LogEntry
- type Logger
- type LoggerProvider
- type LoginLogoPlacement
- type ManagementContentService
- func (s *ManagementContentService) Create(ctx crud.Context, record admingraphql.Content) (admingraphql.Content, error)
- func (s ManagementContentService) CreateBatch(crud.Context, []T) ([]T, error)
- func (s *ManagementContentService) Delete(ctx crud.Context, record admingraphql.Content) error
- func (s ManagementContentService) DeleteBatch(crud.Context, []T) error
- func (s *ManagementContentService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]admingraphql.Content, int, error)
- func (s *ManagementContentService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (admingraphql.Content, error)
- func (s *ManagementContentService) Update(ctx crud.Context, record admingraphql.Content) (admingraphql.Content, error)
- func (s ManagementContentService) UpdateBatch(crud.Context, []T) ([]T, error)
- type ManagementContentTypeService
- func (s *ManagementContentTypeService) Create(ctx crud.Context, record admingraphql.ContentType) (admingraphql.ContentType, error)
- func (s ManagementContentTypeService) CreateBatch(crud.Context, []T) ([]T, error)
- func (s *ManagementContentTypeService) Delete(ctx crud.Context, record admingraphql.ContentType) error
- func (s ManagementContentTypeService) DeleteBatch(crud.Context, []T) error
- func (s *ManagementContentTypeService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]admingraphql.ContentType, int, error)
- func (s *ManagementContentTypeService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (admingraphql.ContentType, error)
- func (s *ManagementContentTypeService) Update(ctx crud.Context, record admingraphql.ContentType) (admingraphql.ContentType, error)
- func (s ManagementContentTypeService) UpdateBatch(crud.Context, []T) ([]T, error)
- type ManagementPageService
- func (s *ManagementPageService) Create(ctx crud.Context, record admingraphql.Page) (admingraphql.Page, error)
- func (s ManagementPageService) CreateBatch(crud.Context, []T) ([]T, error)
- func (s *ManagementPageService) Delete(ctx crud.Context, record admingraphql.Page) error
- func (s ManagementPageService) DeleteBatch(crud.Context, []T) error
- func (s *ManagementPageService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]admingraphql.Page, int, error)
- func (s *ManagementPageService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (admingraphql.Page, error)
- func (s *ManagementPageService) Update(ctx crud.Context, record admingraphql.Page) (admingraphql.Page, error)
- func (s ManagementPageService) UpdateBatch(crud.Context, []T) ([]T, error)
- type ManagementServices
- type MediaActivityDecision
- type MediaActivityHook
- type MediaCapabilities
- type MediaCapabilityOverrideProvider
- type MediaCapabilityOverrides
- type MediaCapabilityProvider
- type MediaConfig
- type MediaConfirmRequest
- type MediaConfirmer
- type MediaDeleter
- type MediaDeliveryAdapter
- type MediaDeliveryCacheConfig
- type MediaDeliveryCapability
- type MediaDeliveryConfig
- type MediaDeliveryCredential
- type MediaDeliveryCredentialRequest
- type MediaDeliveryCredentialResolver
- type MediaDeliveryCredentialResolverFunc
- type MediaDeliveryImported
- type MediaDeliveryInfo
- type MediaDeliveryIntent
- type MediaDeliveryMode
- type MediaDeliveryProxy
- type MediaDeliveryProxyLimitConfig
- type MediaDeliveryRange
- type MediaDeliveryRedirect
- type MediaDeliveryRedirectConfig
- type MediaDeliveryReference
- type MediaDeliveryReferenceProjector
- type MediaDeliveryReferenceProjectorFunc
- type MediaDeliveryRegistry
- type MediaDeliveryRequest
- type MediaDeliveryResponse
- type MediaDeliveryState
- type MediaDeliveryURLBuildOptions
- type MediaDeliveryURLs
- type MediaDeliveryUnavailable
- type MediaDeliveryUnavailableError
- type MediaGetter
- type MediaItem
- type MediaLibrary
- type MediaLocalFileDeliveryAdapter
- type MediaModule
- func (m *MediaModule) Manifest() ModuleManifest
- func (m *MediaModule) MenuItems(locale string) []MenuItem
- func (m *MediaModule) Register(ctx ModuleContext) error
- func (m *MediaModule) RouteContract() routing.ModuleContract
- func (m *MediaModule) ValidateStartup(ctx context.Context) error
- func (m *MediaModule) WithDeliveryConfig(cfg MediaDeliveryConfig) *MediaModule
- func (m *MediaModule) WithMenuParent(parent string) *MediaModule
- func (m *MediaModule) WithMenuPosition(position int) *MediaModule
- type MediaMutationEvent
- type MediaMutationOperation
- type MediaOperationCapabilities
- type MediaOperationCapabilityOverrides
- type MediaPage
- type MediaPickerCapabilities
- type MediaPickerCapabilityOverrides
- type MediaPresignRequest
- type MediaPresignResponse
- type MediaPresigner
- type MediaPublicDeliveryAuthorization
- type MediaPublicDeliveryAuthorizer
- type MediaPublicDeliveryConfig
- type MediaPublicDeliveryTokenVerifier
- type MediaQuery
- type MediaQueryProvider
- type MediaRedirectDeliveryAdapter
- type MediaReference
- type MediaResolver
- type MediaUpdateInput
- type MediaUpdater
- type MediaUploadCapabilities
- type MediaUploadCapabilityOverrides
- type MediaUploadInput
- type MediaUploadRequest
- type MediaUploader
- type MediaValueMode
- type MemoryCommandRunStore
- func (s *MemoryCommandRunStore) Apply(ctx context.Context, update CommandRunUpdate) (CommandRunRecord, bool, error)
- func (s *MemoryCommandRunStore) Clear(ctx context.Context, selector CommandRunSelector) error
- func (s *MemoryCommandRunStore) ClearCommandRunsIfUnchanged(ctx context.Context, selector CommandRunSelector, version uint64) (bool, error)
- func (s *MemoryCommandRunStore) Count() int
- func (s *MemoryCommandRunStore) List(ctx context.Context, selector CommandRunSelector) ([]CommandRunRecord, error)
- func (s *MemoryCommandRunStore) SnapshotForCommandRunClear(ctx context.Context, selector CommandRunSelector) (CommandRunClearSnapshot, error)
- type MemoryRepository
- func (r *MemoryRepository) Create(_ context.Context, record map[string]any) (map[string]any, error)
- func (r *MemoryRepository) Delete(_ context.Context, id string) error
- func (r *MemoryRepository) Get(_ context.Context, id string) (map[string]any, error)
- func (r *MemoryRepository) List(_ context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *MemoryRepository) Update(_ context.Context, id string, record map[string]any) (map[string]any, error)
- type MemoryTranslationExchangeRuntimeStore
- func (s *MemoryTranslationExchangeRuntimeStore) ClaimJob(_ context.Context, jobID, workerID string, now, leaseUntil time.Time) (translationExchangeAsyncJob, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) CommitApplyRecord(_ context.Context, reservation translationExchangeApplyReservation, ...) (translationExchangeAppliedRecord, error)
- func (s *MemoryTranslationExchangeRuntimeStore) CompleteJob(_ context.Context, jobID, workerID string, ...) (translationExchangeAsyncJob, error)
- func (s *MemoryTranslationExchangeRuntimeStore) CreateJob(_ context.Context, job translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
- func (s *MemoryTranslationExchangeRuntimeStore) CreateOrGetApplyJob(_ context.Context, identity translationTransportIdentity, ...) (translationExchangeAsyncJob, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) DeleteJob(_ context.Context, identity translationTransportIdentity, id string) (translationExchangeAsyncJob, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) FailJob(_ context.Context, jobID, workerID string, progress map[string]any, ...) (translationExchangeAsyncJob, error)
- func (s *MemoryTranslationExchangeRuntimeStore) FindJobByRequestHash(_ context.Context, kind string, identity translationTransportIdentity, ...) (translationExchangeAsyncJob, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) GetJob(_ context.Context, identity translationTransportIdentity, id string) (translationExchangeAsyncJob, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) HeartbeatJob(_ context.Context, jobID, workerID string, progress map[string]any, ...) error
- func (s *MemoryTranslationExchangeRuntimeStore) ListJobRows(_ context.Context, jobID string) ([]translationExchangeStoredRow, error)
- func (s *MemoryTranslationExchangeRuntimeStore) ListJobs(_ context.Context, query translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
- func (s *MemoryTranslationExchangeRuntimeStore) ListRecoverableJobs(_ context.Context, now time.Time, limit int) ([]translationExchangeAsyncJob, error)
- func (s *MemoryTranslationExchangeRuntimeStore) LookupApplyRecord(_ context.Context, identity translationTransportIdentity, ...) (translationExchangeAppliedRecord, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) RecordApplyRecord(_ context.Context, identity translationTransportIdentity, ...) (translationExchangeAppliedRecord, bool, error)
- func (s *MemoryTranslationExchangeRuntimeStore) ReleaseApplyRecord(_ context.Context, reservation translationExchangeApplyReservation) error
- func (s *MemoryTranslationExchangeRuntimeStore) ReplaceJobArtifacts(_ context.Context, job translationExchangeAsyncJob, ...) error
- func (s *MemoryTranslationExchangeRuntimeStore) ReserveApplyRecord(_ context.Context, identity translationTransportIdentity, ...) (translationExchangeApplyReservation, translationExchangeAppliedRecord, string, ...)
- func (s *MemoryTranslationExchangeRuntimeStore) SaveJobRows(_ context.Context, job translationExchangeAsyncJob, ...) error
- func (s *MemoryTranslationExchangeRuntimeStore) UpsertJobRow(_ context.Context, jobID string, row translationExchangeStoredRow) error
- type Menu
- type MenuBuilderService
- func (s *MenuBuilderService) ArchiveMenu(id string, archived bool) (AdminMenuRecord, error)
- func (s *MenuBuilderService) CloneMenu(ctx context.Context, svc CMSMenuService, sourceCode, targetCode string, ...) (AdminMenuRecord, error)
- func (s *MenuBuilderService) Contracts(endpoints map[string]string) AdminMenuContracts
- func (s *MenuBuilderService) CreateMenu(ctx context.Context, svc CMSMenuService, input map[string]any, ...) (AdminMenuRecord, error)
- func (s *MenuBuilderService) DeleteMenu(id string, force bool) error
- func (s *MenuBuilderService) DeleteViewProfile(code string) error
- func (s *MenuBuilderService) GetMenu(id string) (AdminMenuRecord, bool)
- func (s *MenuBuilderService) GetViewProfile(code string) (AdminMenuViewProfileRecord, bool)
- func (s *MenuBuilderService) ListBindings() []AdminMenuBindingRecord
- func (s *MenuBuilderService) ListMenus() []AdminMenuRecord
- func (s *MenuBuilderService) ListViewProfiles() []AdminMenuViewProfileRecord
- func (s *MenuBuilderService) PublishViewProfile(code string, publish bool) (AdminMenuViewProfileRecord, error)
- func (s *MenuBuilderService) ResolveBinding(location string, locale string) *AdminMenuBindingRecord
- func (s *MenuBuilderService) SetMenuStatus(id, status string) (AdminMenuRecord, error)
- func (s *MenuBuilderService) UpdateMenu(id string, input map[string]any) (AdminMenuRecord, error)
- func (s *MenuBuilderService) UpsertBinding(location string, input map[string]any) (AdminMenuBindingRecord, error)
- func (s *MenuBuilderService) UpsertMenuItems(ctx context.Context, svc CMSMenuService, menuCode string, tree []MenuItem, ...) (*Menu, error)
- func (s *MenuBuilderService) UpsertViewProfile(code string, input map[string]any) (AdminMenuViewProfileRecord, error)
- type MenuContributor
- type MenuHandle
- type MenuItem
- type MessageFactory
- type MissingTranslationsError
- type Module
- type ModuleContext
- type ModuleManifest
- type ModuleMountRouterProvider
- type ModuleStartupPolicy
- type ModuleStartupValidator
- type MutationFallback
- type MutationPresentation
- type Navigation
- type NavigationClassification
- type NavigationContributionPolicy
- type NavigationConvergenceCoordinator
- type NavigationConvergenceScope
- type NavigationCoordinationReport
- type NavigationDoctorExpectedItem
- type NavigationDoctorItem
- type NavigationDoctorOptions
- type NavigationDoctorReport
- type NavigationItem
- type NavigationLifecycleReport
- type NavigationOwner
- type NavigationPermissionDeclaration
- type NavigationPermissionDeniedMode
- type NavigationPermissionRegistry
- type NavigationPersistenceReport
- type NavigationRawInventoryOptions
- type NavigationRouteMissingPolicy
- type NoopCLIHandler
- type NoopCMSContainer
- type NoopTranslator
- type Notification
- type NotificationCapabilityUnavailableError
- type NotificationDeliveryInspector
- type NotificationEventService
- type NotificationMarkCommand
- type NotificationMarkMsg
- type NotificationReceiptService
- type NotificationRetentionPurgeCommand
- func (c *NotificationRetentionPurgeCommand) Execute(ctx context.Context, msg NotificationRetentionPurgeMsg) error
- func (c *NotificationRetentionPurgeCommand) Run(ctx context.Context, msg NotificationRetentionPurgeMsg) (retention.Result, error)
- func (c *NotificationRetentionPurgeCommand) WithActivitySink(sink ActivitySink)
- type NotificationRetentionPurgeMsg
- type NotificationRetentionService
- type NotificationRuntimeOptions
- type NotificationService
- type NotificationsWidgetPayload
- type ObjectResolverFunc
- type ObjectResolverMap
- type Option
- type OrganizationMember
- type OrganizationPanelRepository
- type OrganizationRecord
- type OrganizationRepository
- type OrganizationService
- func (s *OrganizationService) AssignMember(ctx context.Context, orgID string, member OrganizationMember) (OrganizationRecord, error)
- func (s *OrganizationService) DeleteOrganization(ctx context.Context, id string) error
- func (s *OrganizationService) GetOrganization(ctx context.Context, id string) (OrganizationRecord, error)
- func (s *OrganizationService) ListOrganizations(ctx context.Context, opts ListOptions) ([]OrganizationRecord, int, error)
- func (s *OrganizationService) RemoveMember(ctx context.Context, orgID, userID string) (OrganizationRecord, error)
- func (s *OrganizationService) SaveOrganization(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
- func (s *OrganizationService) SearchOrganizations(ctx context.Context, query string, limit int) ([]OrganizationRecord, error)
- func (s *OrganizationService) WithActivitySink(sink ActivitySink)
- type OrganizationsModule
- func (m *OrganizationsModule) Manifest() ModuleManifest
- func (m *OrganizationsModule) MenuItems(locale string) []MenuItem
- func (m *OrganizationsModule) Register(ctx ModuleContext) error
- func (m *OrganizationsModule) RouteContract() routing.ModuleContract
- func (m *OrganizationsModule) WithMenuParent(parent string) *OrganizationsModule
- type OwnedCommandRuntimeConfig
- type PageApplicationService
- func (s PageApplicationService) Create(ctx context.Context, payload map[string]any) (*AdminPageRecord, error)
- func (s PageApplicationService) Delete(ctx context.Context, id string) error
- func (s PageApplicationService) Get(ctx context.Context, id string, opts PageGetOptions) (*AdminPageRecord, error)
- func (s PageApplicationService) List(ctx context.Context, opts PageListOptions) ([]AdminPageRecord, int, error)
- func (s PageApplicationService) Publish(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
- func (s PageApplicationService) ToFormValues(record AdminPageRecord) map[string]any
- func (s PageApplicationService) Unpublish(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
- func (s PageApplicationService) Update(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
- type PageGetOptions
- type PageIncludeDefaults
- type PageListOptions
- type PageMapper
- type PageReadDefaults
- type PageReadOptions
- type PageTranslation
- type Panel
- func (p *Panel) Authorizer() Authorizer
- func (p *Panel) Breadcrumbs() PanelBreadcrumbConfig
- func (p *Panel) Create(ctx AdminContext, record map[string]any) (map[string]any, error)
- func (p *Panel) Delete(ctx AdminContext, id string) error
- func (p *Panel) EntryMode() PanelEntryMode
- func (p *Panel) Get(ctx AdminContext, id string) (map[string]any, error)
- func (p *Panel) List(ctx AdminContext, opts ListOptions) ([]map[string]any, int, error)
- func (p *Panel) RunAction(ctx AdminContext, name string, payload map[string]any, ids []string) (map[string]any, error)
- func (p *Panel) RunActionResponse(ctx AdminContext, name string, payload map[string]any, ids []string) (ActionResponse, error)
- func (p *Panel) RunBulkAction(ctx AdminContext, name string, payload map[string]any, ids []string) error
- func (p *Panel) Schema() Schema
- func (p *Panel) SchemaWithTheme(theme map[string]map[string]string) Schema
- func (p *Panel) ServeSubresource(ctx AdminContext, c router.Context, id, subresource, value string) error
- func (p *Panel) Subresources() []PanelSubresource
- func (p *Panel) UIRouteMode() PanelUIRouteMode
- func (p *Panel) Update(ctx AdminContext, id string, record map[string]any) (map[string]any, error)
- type PanelActionDefaultsMode
- type PanelBreadcrumbConfig
- type PanelBuilder
- func (b *PanelBuilder) Actions(actions ...Action) *PanelBuilder
- func (b *PanelBuilder) Build() (*Panel, error)
- func (b *PanelBuilder) BulkActions(actions ...Action) *PanelBuilder
- func (b *PanelBuilder) DetailFields(fields ...Field) *PanelBuilder
- func (b *PanelBuilder) Filters(filters ...Filter) *PanelBuilder
- func (b *PanelBuilder) FormFields(fields ...Field) *PanelBuilder
- func (b *PanelBuilder) FormSchema(schema map[string]any) *PanelBuilder
- func (b *PanelBuilder) Hooks(h PanelHooks) *PanelBuilder
- func (b *PanelBuilder) ListFields(fields ...Field) *PanelBuilder
- func (b *PanelBuilder) Permissions(p PanelPermissions) *PanelBuilder
- func (b *PanelBuilder) Subresources(subresources ...PanelSubresource) *PanelBuilder
- func (b *PanelBuilder) Tabs(tabs ...PanelTab) *PanelBuilder
- func (b *PanelBuilder) TreeView(enabled bool) *PanelBuilder
- func (b *PanelBuilder) UseBlocks(enabled bool) *PanelBuilder
- func (b *PanelBuilder) UseSEO(enabled bool) *PanelBuilder
- func (b *PanelBuilder) WithActionDefaults(mode PanelActionDefaultsMode) *PanelBuilder
- func (b *PanelBuilder) WithActionStateResolver(resolver BatchActionStateResolver) *PanelBuilder
- func (b *PanelBuilder) WithActivitySink(sink ActivitySink) *PanelBuilder
- func (b *PanelBuilder) WithAuthorizer(a Authorizer) *PanelBuilder
- func (b *PanelBuilder) WithBreadcrumbs(cfg PanelBreadcrumbConfig) *PanelBuilder
- func (b *PanelBuilder) WithBulkActionStateResolver(resolver BulkActionStateResolver) *PanelBuilder
- func (b *PanelBuilder) WithCRUDService(service crud.Service[map[string]any]) *PanelBuilder
- func (b *PanelBuilder) WithCommandBus(bus *CommandBus) *PanelBuilder
- func (b *PanelBuilder) WithEntryMode(mode PanelEntryMode) *PanelBuilder
- func (b *PanelBuilder) WithRepository(repo Repository) *PanelBuilder
- func (b *PanelBuilder) WithTranslationPolicy(policy TranslationPolicy) *PanelBuilder
- func (b *PanelBuilder) WithTranslationQueueAutoCreateHook(hook TranslationQueueAutoCreateHook) *PanelBuilder
- func (b *PanelBuilder) WithUIRouteMode(mode PanelUIRouteMode) *PanelBuilder
- func (b *PanelBuilder) WithWorkflow(w WorkflowEngine) *PanelBuilder
- func (b *PanelBuilder) WithWorkflowAuthorizer(auth WorkflowAuthorizer) *PanelBuilder
- type PanelEntryMode
- type PanelFormAdapter
- type PanelFormRequest
- type PanelHooks
- type PanelListCapabilities
- type PanelPermissions
- type PanelSubresource
- type PanelSubresourceRepository
- type PanelSubresourceResponder
- type PanelTab
- type PanelTabCollisionHandler
- type PanelTabPermissionEvaluator
- type PanelTabScope
- type PanelTabTarget
- type PanelUIRouteMode
- type PermissionDeniedError
- type PermissionEntry
- type PermissionPolicyFinding
- type PermissionPolicyReport
- type PermissionResolverFunc
- type PermissionResolverMetrics
- type PermissionsDebugPanel
- type PermissionsDebugSnapshot
- type PersistedWorkflow
- type PersistedWorkflowListOptions
- type PersistedWorkflowStatus
- type PreferenceLevel
- type PreferenceScope
- type PreferenceSnapshot
- type PreferenceTrace
- type PreferenceTraceLayer
- type PreferencesAPICapabilities
- type PreferencesDeleteInput
- type PreferencesModule
- func (m *PreferencesModule) Manifest() ModuleManifest
- func (m *PreferencesModule) MenuItems(locale string) []MenuItem
- func (m *PreferencesModule) Register(ctx ModuleContext) error
- func (m *PreferencesModule) RouteContract() routing.ModuleContract
- func (m *PreferencesModule) WithBasePath(basePath string) *PreferencesModule
- func (m *PreferencesModule) WithJSONEditorStrict(strict bool) *PreferencesModule
- func (m *PreferencesModule) WithMenuParent(parent string) *PreferencesModule
- func (m *PreferencesModule) WithSchemaPath(path string) *PreferencesModule
- func (m *PreferencesModule) WithSkipMenu(skip bool) *PreferencesModule
- func (m *PreferencesModule) WithViewContextBuilder(builder PreferencesViewContextBuilder) *PreferencesModule
- type PreferencesOption
- type PreferencesRepository
- func (r *PreferencesRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *PreferencesRepository) Delete(ctx context.Context, id string) error
- func (r *PreferencesRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *PreferencesRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *PreferencesRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type PreferencesResolveInput
- type PreferencesService
- func (s *PreferencesService) Clear(ctx context.Context, userID string, keys []string) (UserPreferences, error)
- func (s *PreferencesService) DashboardLayout(ctx context.Context, userID string) []DashboardWidgetInstance
- func (s *PreferencesService) DashboardOverrides(ctx context.Context, userID string) DashboardLayoutOverrides
- func (s *PreferencesService) Get(ctx context.Context, userID string) (UserPreferences, error)
- func (s *PreferencesService) Resolve(ctx context.Context, input PreferencesResolveInput) (PreferenceSnapshot, error)
- func (s *PreferencesService) Save(ctx context.Context, userID string, prefs UserPreferences) (UserPreferences, error)
- func (s *PreferencesService) SaveDashboardLayout(ctx context.Context, userID string, layout []DashboardWidgetInstance) (UserPreferences, error)
- func (s *PreferencesService) SaveDashboardOverrides(ctx context.Context, userID string, overrides DashboardLayoutOverrides) (UserPreferences, error)
- func (s *PreferencesService) Store() PreferencesStore
- func (s *PreferencesService) ThemeSelectorForUser(ctx context.Context, userID string) ThemeSelector
- func (s *PreferencesService) WithActivitySink(sink ActivitySink)
- func (s *PreferencesService) WithDefaults(theme, variant string) *PreferencesService
- func (s *PreferencesService) WithStore(store PreferencesStore) *PreferencesService
- type PreferencesStore
- type PreferencesStoreAdapter
- type PreferencesUpsertInput
- type PreferencesViewContextBuilder
- type PresentedError
- type PreviewService
- type PreviewToken
- type Priority
- type ProfileModule
- func (m *ProfileModule) Manifest() ModuleManifest
- func (m *ProfileModule) MenuItems(locale string) []MenuItem
- func (m *ProfileModule) Register(ctx ModuleContext) error
- func (m *ProfileModule) RouteContract() routing.ModuleContract
- func (m *ProfileModule) WithMenuParent(parent string) *ProfileModule
- func (m *ProfileModule) WithSkipMenu(skip bool) *ProfileModule
- type ProfileRepository
- func (r *ProfileRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *ProfileRepository) Delete(ctx context.Context, id string) error
- func (r *ProfileRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *ProfileRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *ProfileRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type ProfileService
- func (s *ProfileService) Get(ctx context.Context, userID string) (UserProfile, error)
- func (s *ProfileService) Save(ctx context.Context, userID string, profile UserProfile) (UserProfile, error)
- func (s *ProfileService) Store() ProfileStore
- func (s *ProfileService) WithActivitySink(sink ActivitySink)
- func (s *ProfileService) WithStore(store ProfileStore) *ProfileService
- type ProfileStore
- type ProtectedSurfaceScope
- type QuickActionWidgetPayload
- type QuickActionsWidgetPayload
- type RPCCommandConfig
- type RPCCommandDispatchRequest
- type RPCCommandDispatchResponse
- type RPCCommandListResponse
- type RPCCommandPermissionMode
- type RPCCommandPolicyHook
- type RPCCommandPolicyInput
- type RPCCommandRule
- type RateLimiter
- type Registry
- func (r *Registry) DashboardProviders() []DashboardProviderSpec
- func (r *Registry) Module(id string) (Module, bool)
- func (r *Registry) Modules() []Module
- func (r *Registry) Panel(name string) (*Panel, bool)
- func (r *Registry) PanelTabs(panelName string) []PanelTab
- func (r *Registry) Panels() map[string]*Panel
- func (r *Registry) RegisterDashboardProvider(spec DashboardProviderSpec)
- func (r *Registry) RegisterModule(module Module) error
- func (r *Registry) RegisterPanel(name string, panel *Panel) error
- func (r *Registry) RegisterPanelTab(panelName string, tab PanelTab) error
- func (r *Registry) RegisterSetting(def SettingDefinition)
- func (r *Registry) SetPanelTab(panelName string, tab PanelTab) error
- func (r *Registry) Settings() []SettingDefinition
- func (r *Registry) UnregisterPanel(name string) error
- func (r *Registry) UpsertPanel(name string, panel *Panel) error
- func (r *Registry) WithLogger(logger Logger) *Registry
- type Repository
- type RepositoryTranslationCreator
- type RequestAuthenticator
- type RequestEntry
- type RequestInfo
- type RequiredFieldsValidationStrategy
- type ResolveOptions
- type ResolveResult
- type ResolveSource
- type ResolvedSetting
- type ResolverActivityPageEnricherConfig
- type ResultDispatchFactory
- type RingBuffer
- type RoleAssignmentLookup
- type RolePanelRepository
- type RoleRecord
- type RoleRepository
- type RoleRepositoryLookup
- type RoleWorkflowAuthorizer
- type RoleWorkflowAuthorizerOption
- type RouteContractProvider
- type RouteEntry
- type RouterContext
- type SQLEntry
- type Schema
- type SchemaGuardrails
- func (g *SchemaGuardrails) IsReservedFieldName(name string) bool
- func (g *SchemaGuardrails) ValidatePreviewHTML(html []byte) error
- func (g *SchemaGuardrails) ValidateSchema(schema map[string]any) (*SchemaValidationResult, error)
- func (g *SchemaGuardrails) ValidateUISchema(uiSchema map[string]any, jsonSchema map[string]any) error
- type SchemaGuardrailsOption
- type SchemaPreviewFallback
- type SchemaPreviewer
- type SchemaRegistryEntry
- type SchemaRegistryPayload
- type SchemaToFieldsConverter
- type SchemaValidationOptions
- type SchemaValidationResult
- type SchemaValidator
- type ScopeInput
- type ScopePolicy
- type ScopePolicyMode
- type SearchAdapter
- type SearchCount
- type SearchCountAccuracy
- type SearchEngine
- func (s *SearchEngine) Enable(enabled bool)
- func (s *SearchEngine) Query(ctx AdminContext, query string, limit int) ([]SearchResult, error)
- func (s *SearchEngine) Register(key string, adapter SearchAdapter)
- func (s *SearchEngine) SetPrimary(adapter SearchAdapter)
- func (s *SearchEngine) Unregister(key string)
- type SearchEvidence
- type SearchEvidenceLocation
- type SearchEvidenceSample
- type SearchEvidenceSnippet
- type SearchEvidenceStatus
- type SearchFacet
- type SearchFacetTerm
- type SearchHit
- type SearchProvider
- type SearchRange
- type SearchRequest
- type SearchResult
- type SearchResultPage
- type SearchTotalAccuracy
- type SearchVariant
- type SettingDefinition
- type SettingFieldEnricher
- type SettingOption
- type SettingOptionsProvider
- type SettingOverviewValuePayload
- type SettingRecord
- type SettingValidator
- type SettingsAdapter
- type SettingsBundle
- type SettingsForm
- type SettingsFormAdapter
- type SettingsOverviewWidgetPayload
- type SettingsScope
- type SettingsService
- func (s *SettingsService) Apply(ctx context.Context, bundle SettingsBundle) error
- func (s *SettingsService) Definitions() []SettingDefinition
- func (s *SettingsService) Enable(enabled bool)
- func (s *SettingsService) RegisterDefinition(def SettingDefinition)
- func (s *SettingsService) Resolve(key, userID string) ResolvedSetting
- func (s *SettingsService) ResolveAll(userID string) map[string]ResolvedSetting
- func (s *SettingsService) Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
- func (s *SettingsService) UseAdapter(adapter SettingsAdapter)
- func (s *SettingsService) WithActivitySink(sink ActivitySink)
- func (s *SettingsService) WithRegistry(reg *Registry)
- func (s *SettingsService) WithSchemaOptions(opts ...opts.Option)
- type SettingsUpdateCommand
- type SettingsUpdateMsg
- type SettingsValidationErrors
- type SidebarCollapsePlacement
- type SignedTokenStrategy
- type SiteAPIClient
- type SiteAPIError
- type SiteAPIErrorResponse
- type SiteConfig
- type SiteContentDetailResponse
- type SiteContentListResponse
- type SiteMenuReadOptions
- type SiteMenuResponse
- type SiteQuery
- type SiteResponseMeta
- type SiteTranslationMissingDetails
- type SiteURLResolver
- type SourceContext
- type SourceLine
- type StackFrameInfo
- type StaticKeyStrategy
- type SuggestRequest
- type SuggestResult
- type SyncTransportAdapter
- type SyncTransportRequestMetadata
- type SyncTransportScopeResolver
- type TenantMember
- type TenantPanelRepository
- type TenantRecord
- type TenantRepository
- type TenantService
- func (s *TenantService) AssignMember(ctx context.Context, tenantID string, member TenantMember) (TenantRecord, error)
- func (s *TenantService) DeleteTenant(ctx context.Context, id string) error
- func (s *TenantService) GetTenant(ctx context.Context, id string) (TenantRecord, error)
- func (s *TenantService) ListTenants(ctx context.Context, opts ListOptions) ([]TenantRecord, int, error)
- func (s *TenantService) RemoveMember(ctx context.Context, tenantID, userID string) (TenantRecord, error)
- func (s *TenantService) SaveTenant(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
- func (s *TenantService) SearchTenants(ctx context.Context, query string, limit int) ([]TenantRecord, error)
- func (s *TenantService) WithActivitySink(sink ActivitySink)
- type TenantsModule
- type ThemeProvider
- type ThemeSelection
- type ThemeSelector
- type ThemeTokenDiagnostic
- type TranslationActorOption
- type TranslationActorOptionProvider
- type TranslationActorOptionPurpose
- type TranslationActorOptionQuery
- type TranslationAlreadyExistsError
- type TranslationAssignment
- type TranslationAssignmentConflictError
- type TranslationAssignmentDashboardSummary
- type TranslationAssignmentDashboardSummaryInput
- type TranslationAssignmentFamilyAssignmentsQueryInput
- type TranslationAssignmentFamilyAssignmentsQueryResult
- type TranslationAssignmentFamilyGroup
- type TranslationAssignmentFamilyGroupQueryInput
- type TranslationAssignmentFamilyGroupQueryResult
- type TranslationAssignmentFamilyGroupingStore
- type TranslationAssignmentFamilyOptionQueryInput
- type TranslationAssignmentFamilyOptionQueryResult
- type TranslationAssignmentFamilyOptionQueryStore
- type TranslationAssignmentGroupOption
- type TranslationAssignmentMyWorkSummaryInput
- type TranslationAssignmentOptionStore
- type TranslationAssignmentPageQueryInput
- type TranslationAssignmentPageQueryResult
- type TranslationAssignmentPageQueryStore
- type TranslationAssignmentPanelRepository
- func (r *TranslationAssignmentPanelRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *TranslationAssignmentPanelRepository) Delete(ctx context.Context, id string) error
- func (r *TranslationAssignmentPanelRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *TranslationAssignmentPanelRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *TranslationAssignmentPanelRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type TranslationAssignmentQueueSummary
- type TranslationAssignmentQueueSummaryInput
- type TranslationAssignmentRepository
- type TranslationAssignmentResourceAdapter
- func (a *TranslationAssignmentResourceAdapter) FamilyAssignments(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
- func (a *TranslationAssignmentResourceAdapter) Index(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
- func (a *TranslationAssignmentResourceAdapter) Show(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
- type TranslationAssignmentReviewerAggregateInput
- type TranslationAssignmentReviewerAggregateStore
- type TranslationAssignmentReviewerAggregateSummary
- type TranslationAssignmentReviewerSummaryStore
- type TranslationAssignmentSnapshotQueryInput
- type TranslationAssignmentSnapshotQueryResult
- type TranslationAssignmentSnapshotQueryStore
- type TranslationAssignmentSnapshotSelection
- type TranslationAssignmentSummaryStore
- type TranslationAssignmentVersionConflictError
- type TranslationBundle
- type TranslationCheckOptions
- type TranslationCreateInput
- type TranslationDashboardFamilyMetrics
- type TranslationDashboardFamilyMetricsInput
- type TranslationDashboardFamilyMetricsStore
- type TranslationEditorMemorySuggestion
- type TranslationEditorMemorySuggestionInput
- type TranslationEditorMemorySuggestionStore
- type TranslationExchangeApplier
- type TranslationExchangeApplyDefaults
- type TranslationExchangeApplyRequest
- type TranslationExchangeConflictError
- type TranslationExchangeConflictInfo
- type TranslationExchangeConflictResolution
- type TranslationExchangeExporter
- type TranslationExchangeInvalidPayloadError
- type TranslationExchangeLinkage
- type TranslationExchangeLinkageKey
- type TranslationExchangeLocaleOption
- type TranslationExchangeResourceOption
- type TranslationExchangeResult
- type TranslationExchangeRow
- type TranslationExchangeRowResult
- type TranslationExchangeRuntime
- func (r *TranslationExchangeRuntime) Configure(exporter TranslationExchangeExporter, applier TranslationExchangeApplier)
- func (r *TranslationExchangeRuntime) DeleteJob(ctx context.Context, identity translationTransportIdentity, id string) (translationExchangeAsyncJob, bool, error)
- func (r *TranslationExchangeRuntime) GetJob(ctx context.Context, identity translationTransportIdentity, id string) (translationExchangeAsyncJob, bool, error)
- func (r *TranslationExchangeRuntime) ListJobs(ctx context.Context, query translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
- func (r *TranslationExchangeRuntime) QueueApply(ctx context.Context, identity translationTransportIdentity, ...) (translationExchangeAsyncJob, bool, error)
- func (r *TranslationExchangeRuntime) QueueExport(ctx context.Context, job translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
- func (r *TranslationExchangeRuntime) RecordCompletedJob(ctx context.Context, job translationExchangeAsyncJob, ...) (translationExchangeAsyncJob, error)
- func (r *TranslationExchangeRuntime) Start(ctx context.Context) error
- type TranslationExchangeRuntimeStore
- type TranslationExchangeService
- func (s *TranslationExchangeService) ApplyImport(ctx context.Context, input TranslationImportApplyInput) (TranslationExchangeResult, error)
- func (s *TranslationExchangeService) Export(ctx context.Context, input TranslationExportInput) (TranslationExportResult, error)
- func (s *TranslationExchangeService) ValidateImport(ctx context.Context, input TranslationImportValidateInput) (TranslationExchangeResult, error)
- type TranslationExchangeServiceOption
- type TranslationExchangeStore
- type TranslationExchangeSummary
- type TranslationExchangeTemplateOption
- type TranslationExchangeUIConfig
- type TranslationExchangeUnsupportedFormatError
- type TranslationExchangeValidator
- type TranslationExportCommand
- type TranslationExportFilter
- type TranslationExportInput
- type TranslationExportResult
- type TranslationFamilyAssignCommand
- type TranslationFamilyAssignInput
- type TranslationFamilyAssignResult
- type TranslationFamilyResourceAdapter
- type TranslationImportApplyCommand
- type TranslationImportApplyInput
- type TranslationImportRunCommand
- type TranslationImportRunInput
- type TranslationImportRunResult
- type TranslationImportRunTriggerBuilder
- type TranslationImportRunTriggerCommand
- type TranslationImportRunTriggerInput
- type TranslationImportValidateCommand
- type TranslationImportValidateInput
- type TranslationLinkWidgetPayload
- type TranslationMeta
- type TranslationMetrics
- type TranslationPolicy
- type TranslationPolicyFunc
- type TranslationPolicyInput
- type TranslationProgressWidgetPayload
- type TranslationQueueApproveCommand
- type TranslationQueueApproveInput
- type TranslationQueueArchiveCommand
- type TranslationQueueArchiveInput
- type TranslationQueueAssignCommand
- type TranslationQueueAssignInput
- type TranslationQueueAutoCreateHook
- type TranslationQueueAutoCreateInput
- type TranslationQueueAutoCreateResult
- type TranslationQueueBulkArchiveCommand
- type TranslationQueueBulkArchiveInput
- type TranslationQueueBulkAssignCommand
- type TranslationQueueBulkAssignInput
- type TranslationQueueBulkPriorityCommand
- type TranslationQueueBulkPriorityInput
- type TranslationQueueBulkReleaseCommand
- type TranslationQueueBulkReleaseInput
- type TranslationQueueClaimCommand
- type TranslationQueueClaimInput
- type TranslationQueueRejectCommand
- type TranslationQueueRejectInput
- type TranslationQueueReleaseCommand
- type TranslationQueueReleaseInput
- type TranslationQueueService
- type TranslationQueueStatsFromRepository
- type TranslationQueueStatsService
- type TranslationQueueStatsSnapshot
- type TranslationQueueSubmitCommand
- type TranslationQueueSubmitInput
- type TranslationQueueUIOptions
- type TranslationRequirements
- type TranslationRequirementsResolver
- type TranslationRequirementsResolverFunc
- type TranslationSSRPage
- type TranslationSSRPresenter
- type TranslationSSRPresenterInput
- type TranslationSSRResourceResult
- type TranslationSuggestionActionEvaluator
- type TranslationSuggestionAllowAllEligibility
- type TranslationSuggestionAssignmentContext
- type TranslationSuggestionAssistContextExtractor
- type TranslationSuggestionContextLoader
- type TranslationSuggestionDecision
- type TranslationSuggestionDependencyConfigurer
- type TranslationSuggestionEligibilityChecker
- type TranslationSuggestionGenerateCommand
- type TranslationSuggestionInput
- type TranslationSuggestionProvider
- type TranslationSuggestionProviderInput
- type TranslationSuggestionProviderResult
- type TranslationSuggestionResult
- type TranslationSuggestionService
- type TranslationSuggestionServiceDependencies
- type TranslationSummaryWidgetPayload
- type Translator
- type TranslatorAware
- type URLConfig
- type URLNamespaceConfig
- type UUIDRoleAssignmentLookup
- type UserActivateMsg
- type UserArchiveMsg
- type UserBulkAssignRoleMsg
- type UserBulkUnassignRoleMsg
- type UserDisableMsg
- type UserManagementModule
- func (m *UserManagementModule) Manifest() ModuleManifest
- func (m *UserManagementModule) MenuItems(locale string) []MenuItem
- func (m *UserManagementModule) Register(ctx ModuleContext) error
- func (m *UserManagementModule) RouteContract() routing.ModuleContract
- func (m *UserManagementModule) WithMenuParent(parent string) *UserManagementModule
- type UserManagementModuleOption
- func WithAdditionalRolePermissionMatrixResources(resources ...string) UserManagementModuleOption
- func WithMenuPositions(usersPos, rolesPos *int) UserManagementModuleOption
- func WithRolePermissionMatrixResources(resources ...string) UserManagementModuleOption
- func WithRolesPanelConfigurer(fn func(*PanelBuilder) *PanelBuilder) UserManagementModuleOption
- func WithUserMenuParent(parent string) UserManagementModuleOption
- func WithUserPanelTabs(tabs ...PanelTab) UserManagementModuleOption
- func WithUserProfilesPanel() UserManagementModuleOption
- func WithUserProfilesPanelConfigurer(fn func(*PanelBuilder) *PanelBuilder) UserManagementModuleOption
- func WithUsersPanelConfigurer(fn func(*PanelBuilder) *PanelBuilder) UserManagementModuleOption
- type UserManagementService
- func (s *UserManagementService) AssignRole(ctx context.Context, userID, roleID string) error
- func (s *UserManagementService) BulkRoleChange(ctx context.Context, req BulkRoleChangeRequest) (BulkRoleChangeResponse, error)
- func (s *UserManagementService) DeleteRole(ctx context.Context, id string) error
- func (s *UserManagementService) DeleteUser(ctx context.Context, id string) error
- func (s *UserManagementService) GetRole(ctx context.Context, id string) (RoleRecord, error)
- func (s *UserManagementService) GetUser(ctx context.Context, id string) (UserRecord, error)
- func (s *UserManagementService) ListRoles(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
- func (s *UserManagementService) ListUsers(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
- func (s *UserManagementService) RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
- func (s *UserManagementService) SaveRole(ctx context.Context, role RoleRecord) (RoleRecord, error)
- func (s *UserManagementService) SaveUser(ctx context.Context, user UserRecord) (UserRecord, error)
- func (s *UserManagementService) SearchUsers(ctx context.Context, query string, limit int) ([]UserRecord, error)
- func (s *UserManagementService) TransitionUser(ctx context.Context, id string, status string) (UserRecord, error)
- func (s *UserManagementService) UnassignRole(ctx context.Context, userID, roleID string) error
- func (s *UserManagementService) WithActivitySink(sink ActivitySink)
- func (s *UserManagementService) WithRoleAssignmentLookup(lookup RoleAssignmentLookup) *UserManagementService
- type UserPanelRepository
- type UserPreferences
- type UserProfile
- type UserProfilesPanelRepository
- func (r *UserProfilesPanelRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *UserProfilesPanelRepository) Delete(ctx context.Context, id string) error
- func (r *UserProfilesPanelRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *UserProfilesPanelRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *UserProfilesPanelRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type UserRecord
- type UserRepository
- type UserStatsWidgetPayload
- type UserSuspendMsg
- type WidgetAreaDefinition
- type WidgetDefinition
- type WidgetDefinitionRepository
- func (r *WidgetDefinitionRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *WidgetDefinitionRepository) Delete(ctx context.Context, id string) error
- func (r *WidgetDefinitionRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *WidgetDefinitionRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *WidgetDefinitionRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type WidgetDefinitionSyncResult
- type WidgetDefinitionSyncStatus
- type WidgetInstance
- type WidgetInstanceFilter
- type WidgetInstanceRepository
- func (r *WidgetInstanceRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
- func (r *WidgetInstanceRepository) Delete(ctx context.Context, id string) error
- func (r *WidgetInstanceRepository) Get(ctx context.Context, id string) (map[string]any, error)
- func (r *WidgetInstanceRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
- func (r *WidgetInstanceRepository) Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
- type WidgetPayload
- type WidgetProvider
- type WorkflowActionFunc
- type WorkflowApplyEventRequest
- type WorkflowApplyEventResponse
- type WorkflowAuthoringVersionStore
- type WorkflowAuthorizer
- type WorkflowBinding
- type WorkflowBindingConflictError
- type WorkflowBindingListOptions
- type WorkflowBindingRepository
- type WorkflowBindingResolution
- type WorkflowBindingResolveInput
- type WorkflowBindingScopeType
- type WorkflowBindingStatus
- type WorkflowBindingVersionConflictError
- type WorkflowDefinition
- type WorkflowDefinitionChecker
- type WorkflowDefinitionProvider
- type WorkflowDefinitionRepository
- type WorkflowDynamicTargetResolver
- type WorkflowEngine
- type WorkflowExecutionContext
- type WorkflowGuardFunc
- type WorkflowGuardRejection
- type WorkflowMessage
- type WorkflowRegistrar
- type WorkflowRuntime
- type WorkflowRuntimeService
- func (s *WorkflowRuntimeService) AuthoringStore() flow.AuthoringStore
- func (s *WorkflowRuntimeService) BindWorkflowEngine(engine WorkflowEngine) error
- func (s *WorkflowRuntimeService) CreateBinding(ctx context.Context, binding WorkflowBinding) (WorkflowBinding, error)
- func (s *WorkflowRuntimeService) CreateWorkflow(ctx context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
- func (s *WorkflowRuntimeService) DeleteBinding(ctx context.Context, id string) error
- func (s *WorkflowRuntimeService) ListBindings(ctx context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
- func (s *WorkflowRuntimeService) ListWorkflows(ctx context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
- func (s *WorkflowRuntimeService) ResolveBinding(ctx context.Context, input WorkflowBindingResolveInput) (WorkflowBindingResolution, error)
- func (s *WorkflowRuntimeService) RollbackWorkflow(ctx context.Context, id string, targetVersion, expectedVersion int) (PersistedWorkflow, error)
- func (s *WorkflowRuntimeService) SetAuthoringStore(store flow.AuthoringStore)
- func (s *WorkflowRuntimeService) UpdateBinding(ctx context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
- func (s *WorkflowRuntimeService) UpdateWorkflow(ctx context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
- type WorkflowSnapshot
- type WorkflowSnapshotRequest
- type WorkflowTransition
- type WorkflowTransitionInfo
- type WorkflowTransitionResult
- type WorkflowUnregistrar
- type WorkflowValidationErrors
- type WorkflowVersionConflictError
Constants ¶
const ( ActionDisabledReasonCodeTranslationMissing = string(translationcore.DisabledReasonTranslationMissing) ActionDisabledReasonCodeInvalidStatus = string(translationcore.DisabledReasonInvalidStatus) ActionDisabledReasonCodePermissionDenied = string(translationcore.DisabledReasonPermissionDenied) ActionDisabledReasonCodeMissingContext = string(translationcore.DisabledReasonMissingContext) ActionDisabledReasonCodeFeatureDisabled = TextCodeFeatureDisabled ActionDisabledReasonCodeResourceInUse = TextCodeResourceInUse ActionDisabledReasonCodePreconditionFailed = TextCodePreconditionFailed ActionDisabledReasonCodeInvalidSelection = TextCodeInvalidSelection ActionDisabledReasonCodeRateLimited = TextCodeRateLimited )
Canonical action disabled reason codes consumed by frontend action renderers.
const ( ActivityActorTypeKey = "actor_type" ActivityActorTypeKeyLegacy = "actorType" ActivityActorTypeSystem = "system" ActivityActorTypeJob = "job" ActivityActorTypeTask = "task" )
const ( ActivityObjectTypeUser = "user" ActivityObjectTypeRole = "role" ActivityObjectTypeTenant = "tenant" ActivityObjectTypeOrganization = "organization" ActivityObjectTypeSettings = "settings" ActivityObjectTypeDashboard = "dashboard" ActivityObjectTypePanel = "panel" ActivityObjectTypeNotification = "notification" ActivityObjectTypePreferences = "preferences" ActivityObjectTypeProfile = "profile" ActivityObjectTypeJob = "job" ActivityObjectTypeWidgetArea = "widget_area" ActivityObjectTypeWidgetDefinition = "widget_def" ActivityObjectTypeWidgetInstance = "widget_instance" ActivityObjectTypeMenu = "menu" ActivityObjectTypeMenuItem = "menu_item" ActivityObjectTypePage = "page" ActivityObjectTypeContent = "content" ActivityObjectTypeBlockDefinition = "block_def" ActivityObjectTypeBlock = "block" )
const ( BrowserCSRFErrorQueryKey = "csrf_error" BrowserCSRFFormExpiredCode = "form_expired" BrowserCSRFErrorMessageLocal = "csrf_error_message" BrowserCSRFFormExpiredMessage = "The form expired. Please review your changes and try again." )
const ( WidgetDefinitionSyncStatusCreated = cmsboot.WidgetDefinitionSyncStatusCreated WidgetDefinitionSyncStatusUpdated = cmsboot.WidgetDefinitionSyncStatusUpdated WidgetDefinitionSyncStatusUnchanged = cmsboot.WidgetDefinitionSyncStatusUnchanged )
const ( // CMSPagePolicyEntity is the translation-policy and family entity for the // first-class go-cms Pages service. It is plural because policy inputs and // family records identify the service surface, not the backing content type. CMSPagePolicyEntity = "pages" // CMSPageContentTypeSlug is the backing go-cms content type slug used by // Pages service records when they are bridged through generic content APIs. CMSPageContentTypeSlug = "page" )
const ( DefaultIconoirCSSAssetPath = "assets/dist/third-party/iconoir/iconoir.css" DefaultDataTablesCSSAssetPath = "assets/dist/third-party/simple-datatables/style.css" DefaultEChartsJSAssetPath = "assets/dist/third-party/echarts/echarts.min.js" )
Default third-party asset paths are relative to the configured admin asset base and are rendered through asset_base_path in the shared templates.
const ( )
const ( ContentTypeCapabilityKeyBlocks = "blocks" ContentTypeCapabilityKeyBlockTypes = "block_types" ContentTypeCapabilityKeyI18N = "i18n" ContentTypeCapabilityKeyLocalized = "localized" ContentTypeCapabilityKeyMenuLabel = "menu_label" ContentTypeCapabilityKeyPanelLabel = "panel_label" ContentTypeCapabilityKeyPanelPreset = "panel_preset" ContentTypeCapabilityKeyPanelSlug = "panel_slug" ContentTypeCapabilityKeyPanelTraits = "panel_traits" ContentTypeCapabilityKeyPermission = "permission" ContentTypeCapabilityKeyPermissions = "permissions" ContentTypeCapabilityKeySEO = "seo" ContentTypeCapabilityKeySearchContent = "search_content_type" ContentTypeCapabilityKeyTranslation = "translation" ContentTypeCapabilityKeyTranslations = "translations" ContentTypeCapabilityKeyTree = "tree" ContentTypeCapabilityKeyTreeView = "tree_view" ContentTypeCapabilityKeyUseSEO = "use_seo" ContentTypeCapabilityKeyWorkflow = "workflow" ContentTypeCapabilityKeyWorkflowID = "workflow_id" ContentTypeCapabilityKeyWorkflowKey = "workflow_key" )
const ( DataPanelOverview = "overview" DataPanelDatasets = "datasets" DataPanelScenarios = "scenarios" DataPanelOperations = "operations" DataPanelVerification = "verification" DataPanelCoverage = "coverage" )
Data console panel IDs. Each panel declares Order so the overview leads wherever declared order is honored.
const ( DebugPanelTemplate = "template" DebugPanelSession = "session" DebugPanelRequests = "requests" DebugPanelSQL = "sql" DebugPanelLogs = "logs" DebugPanelConfig = "config" DebugPanelRoutes = "routes" DebugPanelCustom = "custom" DebugPanelJSErrors = "jserrors" DebugPanelShell = "shell" DebugPanelConsole = "console" DebugPanelCommands = DebugPanelCommandLauncher DebugPanelDoctor = "doctor" DebugPanelDeployment = "deployment" )
const ( DebugREPLKindShell = "shell" DebugREPLKindApp = "app" )
const ( DebugREPLOverrideKeyMetadata = "override_key" DebugREPLOverrideTokenMetadata = "override_token" )
const ( DeploymentPersonaVisualMonogram = deploymentidentity.VisualKindMonogram DeploymentPersonaVisualImage = deploymentidentity.VisualKindImage DeploymentPersonaMediaTypePNG = deploymentidentity.MediaTypePNG )
const ( EnhancedFragmentModeReplace = "replace" EnhancedMutationMediaType = "application/vnd.admin.enhanced+json" )
const ( TextCodeValidationError = string(translationcore.ErrorValidation) TextCodeAdminCSRFInvalid = "ADMIN_CSRF_INVALID" TextCodeInvalidFeatureConfig = "INVALID_FEATURE_CONFIG" TextCodeForbidden = "FORBIDDEN" TextCodeNotFound = string(translationcore.ErrorNotFound) TextCodeInvalidStatus = string(translationcore.DisabledReasonInvalidStatus) TextCodeMissingContext = string(translationcore.DisabledReasonMissingContext) TextCodeFeatureDisabled = string(translationcore.DisabledReasonFeatureDisabled) TextCodeResourceInUse = "RESOURCE_IN_USE" TextCodePreconditionFailed = "PRECONDITION_FAILED" TextCodeInvalidSelection = "INVALID_SELECTION" TextCodeRateLimited = "RATE_LIMITED" TextCodeReplSessionLimit = "REPL_SESSION_LIMIT" TextCodeWorkflowNotFound = "WORKFLOW_NOT_FOUND" TextCodeWorkflowInvalidTransition = "WORKFLOW_INVALID_TRANSITION" TextCodeTranslationMissing = string(translationcore.DisabledReasonTranslationMissing) TextCodeTranslationExists = "TRANSLATION_EXISTS" TextCodeAutosaveConflict = "AUTOSAVE_CONFLICT" TextCodeTranslationQueueConflict = "TRANSLATION_QUEUE_CONFLICT" TextCodeTranslationQueueVersionConflict = "TRANSLATION_QUEUE_VERSION_CONFLICT" TextCodeTranslationExchangeUnsupportedFormat = "TRANSLATION_EXCHANGE_UNSUPPORTED_FORMAT" TextCodeTranslationExchangeInvalidPayload = "TRANSLATION_EXCHANGE_INVALID_PAYLOAD" TextCodeTranslationExchangeMissingLinkage = "TRANSLATION_EXCHANGE_MISSING_LINKAGE" TextCodeTranslationExchangeDuplicateRow = "TRANSLATION_EXCHANGE_DUPLICATE_ROW" TextCodeTranslationExchangeStaleSourceHash = "TRANSLATION_EXCHANGE_STALE_SOURCE_HASH" TextCodeContentTypeSchemaBreaking = "CONTENT_TYPE_SCHEMA_BREAKING" TextCodeFeatureEnabledRequired = "FEATURE_ENABLED_REQUIRED" TextCodeFeatureAliasDisabled = "FEATURE_ALIAS_DISABLED" TextCodeMissingPanel = "MISSING_PANEL" TextCodeRawUINotSupported = "RAW_UI_NOT_SUPPORTED" TextCodeClearKeysNotSupported = "CLEAR_KEYS_NOT_SUPPORTED" TextCodeReplDebugDisabled = "REPL_DEBUG_DISABLED" TextCodeReplShellDisabled = "REPL_SHELL_DISABLED" TextCodeReplAppDisabled = "REPL_APP_DISABLED" TextCodeReplDisabled = "REPL_DISABLED" TextCodeReplOverrideDenied = "REPL_OVERRIDE_DENIED" TextCodeReplRoleDenied = "REPL_ROLE_DENIED" TextCodeReplPermissionDenied = "REPL_PERMISSION_DENIED" TextCodeReplExecPermissionDenied = "REPL_EXEC_PERMISSION_DENIED" TextCodeReplReadOnly = "REPL_READ_ONLY" TextCodeReplIPDenied = "REPL_IP_DENIED" TextCodePathConflict = "PATH_CONFLICT" TextCodeConflict = "CONFLICT" TextCodeActivityActorContextInvalid = "ACTIVITY_ACTOR_CONTEXT_INVALID" TextCodeMenuValidationCycle = "MENU_VALIDATION_CYCLE" TextCodeMenuValidationDepth = "MENU_VALIDATION_DEPTH" TextCodeMenuValidationInvalidTarget = "MENU_VALIDATION_INVALID_TARGET" )
const ( MenuRecordStatusDraft = "draft" MenuRecordStatusPublished = "published" )
const ( )
const ( )
const ( MenuItemTypeItem = navinternal.MenuItemTypeItem MenuItemTypeGroup = navinternal.MenuItemTypeGroup MenuItemTypeSeparator = navinternal.MenuItemTypeSeparator ResolveSourceCMS = navinternal.ResolveSourceCMS ResolveSourceFallbackNoCMS = navinternal.ResolveSourceFallbackNoCMS ResolveSourceFallbackCMSDisabled = navinternal.ResolveSourceFallbackCMSDisabled ResolveSourceFallbackCMSError = navinternal.ResolveSourceFallbackCMSError ResolveSourceFallbackCMSMissing = navinternal.ResolveSourceFallbackCMSMissing )
const ( PermAdminWildcard = "admin.*" PermAdminDashboardView = "admin.dashboard.view" PermAdminUsersView = "admin.users.view" PermAdminUsersCreate = "admin.users.create" PermAdminUsersImport = "admin.users.import" PermAdminUsersEdit = "admin.users.edit" PermAdminUsersDelete = "admin.users.delete" PermAdminRolesView = "admin.roles.view" PermAdminRolesCreate = "admin.roles.create" PermAdminRolesEdit = "admin.roles.edit" PermAdminRolesDelete = "admin.roles.delete" PermAdminTenantsView = "admin.tenants.view" PermAdminTenantsCreate = "admin.tenants.create" PermAdminTenantsEdit = "admin.tenants.edit" PermAdminTenantsDelete = "admin.tenants.delete" PermAdminOrganizationsView = "admin.organizations.view" PermAdminOrganizationsCreate = "admin.organizations.create" PermAdminOrganizationsEdit = "admin.organizations.edit" PermAdminOrganizationsDelete = "admin.organizations.delete" PermAdminMediaView = "admin.media.view" PermAdminMediaCreate = "admin.media.create" PermAdminMediaEdit = "admin.media.edit" PermAdminMediaDelete = "admin.media.delete" PermAdminActivityView = "admin.activity.view" PermAdminSettingsView = "admin.settings.view" PermAdminSettingsEdit = "admin.settings.edit" PermAdminFeatureFlagsView = "admin.feature_flags.view" PermAdminFeatureFlagsUpdate = "admin.feature_flags.update" PermAdminNotificationsView = "admin.notifications.view" PermAdminNotificationsUpdate = "admin.notifications.update" PermAdminNotificationsInspect = "admin.notifications.inspect" PermAdminNotificationsReceiptsView = "admin.notifications.receipts.view" PermAdminNotificationsRetentionPurge = "admin.notifications.retention.purge" PermAdminJobsView = "admin.jobs.view" PermAdminJobsEdit = "admin.jobs.edit" PermAdminJobsTrigger = "admin.jobs.trigger" PermAdminSearchView = "admin.search.view" PermAdminPreferencesView = "admin.preferences.view" PermAdminPreferencesEdit = "admin.preferences.edit" PermAdminPreferencesManageTenant = "admin.preferences.manage_tenant" PermAdminPreferencesManageOrg = "admin.preferences.manage_org" PermAdminPreferencesManageSystem = "admin.preferences.manage_system" PermAdminProfileView = "admin.profile.view" PermAdminProfileEdit = "admin.profile.edit" PermAdminDebugView = "admin.debug.view" PermAdminDebugRepl = "admin.debug.repl" PermAdminDebugReplExec = "admin.debug.repl.exec" PermAdminDebugSessionView = "admin.debug.session.view" PermAdminDebugSessionAttach = "admin.debug.session.attach" PermAdminMenusView = "admin.menus.view" PermAdminMenusEdit = "admin.menus.edit" PermAdminMenusPublish = "admin.menus.publish" PermAdminSiteRead = "admin.site.read" PermAdminSiteReadDrafts = "admin.site.read_drafts" PermAdminSiteViewProfileOverride = "admin.site.view_profile_override" PermAdminPagesView = "admin.pages.view" PermAdminPagesCreate = "admin.pages.create" PermAdminPagesEdit = "admin.pages.edit" PermAdminPagesDelete = "admin.pages.delete" PermAdminPagesPublish = "admin.pages.publish" PermAdminPostsView = "admin.posts.view" PermAdminPostsCreate = "admin.posts.create" PermAdminPostsEdit = "admin.posts.edit" PermAdminPostsDelete = "admin.posts.delete" PermAdminPostsPublish = "admin.posts.publish" PermAdminContentTypesView = "admin.content_types.view" PermAdminBlockDefinitionsView = "admin.block_definitions.view" PermAdminContentModelingManage = "admin.content_modeling.manage" PermAdminIntegrationsManage = "admin.integrations.manage" PermAdminTranscriptsIngest = "admin.transcripts.ingest" PermAdminArchiveView = "admin.archive.view" PermAdminArchiveCreate = "admin.archive.create" PermAdminArchiveEdit = "admin.archive.edit" PermAdminArchiveDelete = "admin.archive.delete" PermAdminArchivePublish = "admin.archive.publish" PermAdminArchiveDiagnose = "admin.archive.diagnose" )
const ( RolesOpenAPISource = "roles.json" CreateRoleOperation = "createRole" UpdateRoleOperation = "updateRole" )
const ( // RPCMethodCommandDispatch dispatches a named command through the admin command bus. RPCMethodCommandDispatch = "admin.commands.dispatch" // RPCMethodCommandList returns registered command names available for dispatch. RPCMethodCommandList = "admin.commands.list" )
const ( RPCMethodWorkflowBindingsList = "fsm.bindings.list" RPCMethodWorkflowBindingsUpsert = "fsm.bindings.upsert" RPCMethodWorkflowBindingsDelete = "fsm.bindings.delete" RPCMethodWorkflowBindingsResolve = "fsm.bindings.resolve" )
const ( // DefaultSchemaMaxSizeBytes is the maximum JSON schema size in bytes (1MB) DefaultSchemaMaxSizeBytes = 1 * 1024 * 1024 // DefaultSchemaMaxFields is the maximum number of fields allowed in a schema DefaultSchemaMaxFields = 200 // DefaultSchemaMaxDepth is the maximum nesting depth for properties/items DefaultSchemaMaxDepth = 10 // DefaultUISchemaMaxSizeBytes is the maximum UI schema overlay size (512KB) DefaultUISchemaMaxSizeBytes = 512 * 1024 // DefaultPreviewHTMLMaxSizeBytes is the maximum generated HTML preview size (2MB) DefaultPreviewHTMLMaxSizeBytes = 2 * 1024 * 1024 )
Schema validation limits
const ( // SchemaFormatOpenAPI identifies OpenAPI documents for formgen. SchemaFormatOpenAPI = formgenopenapi.DefaultAdapterName // SchemaFormatJSONSchema identifies JSON Schema documents for formgen. SchemaFormatJSONSchema = formgenjsonschema.DefaultAdapterName )
const ( // ScopeTenantIDKey and ScopeOrgIDKey are the canonical tenant/org keys used // in scope metadata maps, request filters, and Bun column references. ScopeTenantIDKey = adminkeys.KeyTenantID ScopeOrgIDKey = adminkeys.KeyOrgID ScopeTenantKey = "tenant" ScopeOrgKey = "org" ScopeOrganizationIDKey = adminkeys.KeyOrganizationID ScopeDefaultTenantKey = "default_tenant" ScopeDefaultTenantIDKey = "default_tenant_id" ScopeDefaultOrgIDKey = "default_org_id" )
const ( SiteRouteContentList = "site.content.type" SiteRouteContentDetail = "site.content.item" SiteRouteMenuByLocation = "site.menus.location" SiteRouteMenuByCode = "site.menus.code" )
SiteRouteKey constants map to URL manager route keys for normalized site endpoints.
const ( AdminPartialShellSidebar = "admin.shell.sidebar" AdminPartialPageBreadcrumbs = "admin.page.breadcrumbs" AdminPartialInvalidIdentifier = "invalid_identifier" AdminPartialUnsupportedKey = "unsupported_admin_key" )
const ( PermAdminTranslationsView = "admin.translations.view" PermAdminTranslationsEdit = "admin.translations.edit" PermAdminTranslationsManage = "admin.translations.manage" PermAdminTranslationsAssign = "admin.translations.assign" PermAdminTranslationsApprove = "admin.translations.approve" PermAdminTranslationsClaim = "admin.translations.claim" PermAdminTranslationsSuggest = "admin.translations.suggest" PermAdminTranslationsSync = "admin.translations.sync" PermAdminTranslationsExport = "admin.translations.export" PermAdminTranslationsImportView = "admin.translations.import.view" PermAdminTranslationsImportValidate = "admin.translations.import.validate" PermAdminTranslationsImportApply = "admin.translations.import.apply" )
const ( TranslationSSRSurfaceDashboard = "dashboard" TranslationSSRSurfaceQueue = "queue" TranslationSSRSurfaceFamilyList = "family_list" TranslationSSRSurfaceFamilyDetail = "family_detail" TranslationSSRSurfaceFamilyAssignments = "family_assignments" TranslationSSRSurfaceEditor = "editor" TranslationSSRSurfaceMatrix = "matrix" TranslationSSRSurfaceExchange = "exchange" )
const ( TranslationSuggestionGenerateCommandName = "translations.suggestions.generate" TranslationSuggestionReasonPermissionDenied = "permission_denied" TranslationSuggestionReasonReadOnlyAssignment = "read_only_assignment" TranslationSuggestionReasonFieldUnsupported = "field_unsupported" TranslationSuggestionReasonEmptySource = "empty_source" TranslationSuggestionReasonPolicyDenied = "provider_policy_denied" TranslationSuggestionReasonQuotaExceeded = "quota_exceeded" TranslationSuggestionReasonRateLimited = "rate_limited" )
const ( NotificationRouteDeliveries = "notifications.deliveries" NotificationRouteDeliveryEvent = "notifications.deliveries.event" NotificationRouteDeliveryMessage = "notifications.deliveries.message" NotificationRouteReceiptLookup = "notifications.receipts.lookup" NotificationRouteRetentionPurge = "notifications.retention.purge" )
const ( NotificationDeliveryEventParameter = "event_id" NotificationDeliveryMessageParameter = "message_id" )
const ( WidgetUserStats = widgetcodes.WidgetUserStats WidgetActivityFeed = widgetcodes.WidgetActivityFeed WidgetUserActivityFeed = widgetcodes.WidgetUserActivityFeed WidgetQuickActions = widgetcodes.WidgetQuickActions WidgetNotifications = widgetcodes.WidgetNotifications WidgetSettingsOverview = widgetcodes.WidgetSettingsOverview WidgetUserProfileOverview = widgetcodes.WidgetUserProfileOverview WidgetTranslationProgress = widgetcodes.WidgetTranslationProgress WidgetContentStats = widgetcodes.WidgetContentStats WidgetStorageStats = widgetcodes.WidgetStorageStats WidgetSystemHealth = widgetcodes.WidgetSystemHealth WidgetChartSample = widgetcodes.WidgetChartSample WidgetBarChart = widgetcodes.WidgetBarChart WidgetLineChart = widgetcodes.WidgetLineChart WidgetPieChart = widgetcodes.WidgetPieChart WidgetGaugeChart = widgetcodes.WidgetGaugeChart WidgetScatterChart = widgetcodes.WidgetScatterChart )
Canonical dashboard widget definition codes.
const ( WorkflowStatusDraft = workflowcore.WorkflowStatusDraft WorkflowStatusActive = workflowcore.WorkflowStatusActive WorkflowStatusDeprecated = workflowcore.WorkflowStatusDeprecated )
const ( WorkflowBindingScopeTrait = workflowcore.WorkflowBindingScopeTrait WorkflowBindingScopeContentType = workflowcore.WorkflowBindingScopeContentType WorkflowBindingScopeGlobal = workflowcore.WorkflowBindingScopeGlobal )
const ( WorkflowBindingStatusActive = workflowcore.WorkflowBindingStatusActive WorkflowBindingStatusInactive = workflowcore.WorkflowBindingStatusInactive )
const (
ActivityActorTypeUser = "user"
)
const (
// CommandRunSchemaVersion is the current cross-process JSON contract version.
CommandRunSchemaVersion = 1
)
const ConsolePageTemplate = "resources/console/base"
ConsolePageTemplate is the packaged neutral console page shell. Hosts may pass a template that extends it to change wording or chrome.
const ContentChannelScopeQueryParam = adminkeys.KeyChannelScope
ContentChannelScopeQueryParam is the canonical query-string key used to carry content channel scope through list/read routes.
const (
// CreateTranslationKey is the payload flag that explicitly allows creating a missing translation.
CreateTranslationKey = "create_translation"
)
const DataOverviewRecordKey = "summary"
DataOverviewRecordKey identifies the overview's single summary record.
const DataPageTemplate = "resources/data/index"
DataPageTemplate is the packaged Data console page. It extends the neutral console shell, so the module renders it with ConsolePageRenderer.
const (
DebugPanelActions = "actions"
)
const (
DebugPanelCommandLauncher = "commands"
)
const (
DebugPanelCommandRuns = "command_runs"
)
const (
DebugPanelPermissions = "permissions"
)
const DefaultIconLibrary = "iconoir"
DefaultIconLibrary is the library used when no prefix is specified.
const EnhancedMutationResponseVersion = 1
const NotificationMarkCommandName = "notifications.mark"
NotificationMarkCommandName is the registered command for marking notifications read/unread.
const NotificationRetentionPurgeCommandName = "notifications.retention.purge"
NotificationRetentionPurgeCommandName is the stable public retention command identity.
const NotificationSystemAuthorityMetadataKey = "go_admin.notifications.system_authority"
NotificationSystemAuthorityMetadataKey is the trusted actor-metadata flag used to opt an authenticated operator into global notification operations. A dedicated permission is still required by the transport.
Variables ¶
var ( ErrCommandRunTransportClosed = errors.New("command-run transport is closed") ErrCommandRunTransportBackpressure = errors.New("command-run transport backpressure") ErrCommandRunHandlerFailed = errors.New("command-run handler failed") )
var ( ErrInvalidCommandRunRuntimeConfig = errors.New("invalid command-run runtime configuration") ErrCommandRunRuntimeClosed = errors.New("command-run runtime is closed") )
var ( // ErrCommandRunPublishFailed is the provider-neutral remote publish category. ErrCommandRunPublishFailed = errors.New("command-run publish failed") // ErrCommandRunSubscriptionFailed is the provider-neutral subscription category. ErrCommandRunSubscriptionFailed = errors.New("command-run subscription failed") // ErrCommandRunEnvelopeRejected identifies an untrusted transport envelope. ErrCommandRunEnvelopeRejected = errors.New("command-run envelope rejected") // ErrCommandRunScopeRejected identifies an identity or selector rejection. ErrCommandRunScopeRejected = errors.New("command-run scope rejected") // ErrCommandRunDeliveryDropped identifies a bounded delivery loss. ErrCommandRunDeliveryDropped = errors.New("command-run delivery dropped") )
var ( // ErrInvalidCommandRunUpdate identifies updates that do not satisfy the // canonical command-run contract. ErrInvalidCommandRunUpdate = errors.New("invalid command-run update") // ErrInvalidCommandRunSelector identifies ambiguous or malformed selectors. ErrInvalidCommandRunSelector = errors.New("invalid command-run selector") )
var ( ErrDoctorCheckNotFound = errors.New("doctor check not found") ErrDoctorActionNotRunnable = errors.New("doctor action not runnable") )
var ( // ErrPreferencesStoreRequired indicates a missing preferences store. ErrPreferencesStoreRequired = optionsadapter.ErrPreferencesStoreRequired // ErrPreferencesScopeMetadataInvalid indicates malformed options scope metadata. ErrPreferencesScopeMetadataInvalid = optionsadapter.ErrPreferencesScopeMetadataInvalid // ErrPreferencesPathInvalid indicates an invalid flatten/unflatten path. ErrPreferencesPathInvalid = optionsadapter.ErrPreferencesPathInvalid )
var ( ErrForbidden = errors.New("forbidden") ErrNotFound = errors.New("not found") )
Standard errors to allow HTTP helpers to map to status codes.
var ( // ErrTranslationAssignmentConflict indicates an active assignment uniqueness conflict. ErrTranslationAssignmentConflict = errors.New("translation assignment conflict") // ErrTranslationAssignmentVersionConflict indicates optimistic locking/version mismatch. ErrTranslationAssignmentVersionConflict = errors.New("translation assignment version conflict") )
var ( // ErrTranslationExchangeUnsupportedFormat indicates a format outside CSV/JSON v1 support. ErrTranslationExchangeUnsupportedFormat = errors.New("translation exchange unsupported format") // ErrTranslationExchangeInvalidPayload indicates malformed exchange payloads. ErrTranslationExchangeInvalidPayload = errors.New("translation exchange invalid payload") // ErrTranslationExchangeMissingLinkage indicates unresolved deterministic linkage. ErrTranslationExchangeMissingLinkage = errors.New("translation exchange missing linkage") // ErrTranslationExchangeStaleSourceHash indicates stale source hash conflicts. ErrTranslationExchangeStaleSourceHash = errors.New("translation exchange stale source hash") )
var ( ErrWorkflowNotFound = errors.New("workflow not found for entity type") ErrWorkflowInvalidTransition = errors.New("invalid transition") )
var ( ErrWorkflowVersionConflict = workflowcore.ErrWorkflowVersionConflict ErrWorkflowBindingConflict = workflowcore.ErrWorkflowBindingConflict ErrWorkflowBindingVersionConflict = workflowcore.ErrWorkflowBindingVersionConflict ErrWorkflowRollbackVersionNotFound = workflowcore.ErrWorkflowRollbackVersionNotFound )
var ErrAutosaveConflict = errors.New("autosave conflict")
ErrAutosaveConflict marks optimistic concurrency conflicts reported by autosave-aware updates.
var ErrFeatureDisabled = errors.New("feature disabled")
ErrFeatureDisabled signals a disabled feature gate.
var ErrInvalidCommandRunMemoryStoreConfig = errors.New("invalid command-run memory store configuration")
var ErrInvalidDependencies = errors.New("invalid dependencies")
InvalidDependenciesError aggregates one or more dependency validation failures.
var ErrInvalidFeatureConfig = errors.New("invalid feature configuration")
ErrInvalidFeatureConfig signals invalid or conflicting feature selections.
var ErrMenuSlugConflict = errors.New("menu slug already exists")
ErrMenuSlugConflict signals an attempt to create a menu with a duplicate slug.
var ErrMenuTargetNotFound = errors.New("menu target not found")
ErrMenuTargetNotFound signals that a menu mutation targeted a missing menu or menu item.
var ErrMissingTranslations = errors.New("missing required translations")
ErrMissingTranslations marks translation policy failures due to missing locales.
var ErrPathConflict = errors.New("path conflict")
ErrPathConflict signals a page path/slug collision.
var ErrREPLSessionLimit = errors.New("repl session limit reached")
var ErrTranslationAlreadyExists = errors.New("translation already exists")
ErrTranslationAlreadyExists marks duplicate translation creation attempts.
var ErrTranslationAssignmentQueryUnsupported = errors.New("translation assignment query unsupported")
var ErrTranslationCreateUnsupported = errors.New("translation create unsupported")
ErrTranslationCreateUnsupported indicates the backing provider does not expose a first-class translation create command.
var ( // ErrTranslationExchangeLinkageNotFound indicates missing deterministic row linkage. ErrTranslationExchangeLinkageNotFound = errors.New("translation exchange linkage not found") )
var ErrTranslationSourceNotFound = errors.New("translation source not found")
ErrTranslationSourceNotFound marks translation policy failures caused by the source record disappearing before readiness checks can resolve it.
Functions ¶
func ActionDisabledReasonCodes ¶ added in v0.25.0
func ActionDisabledReasonCodes() []string
ActionDisabledReasonCodes returns the canonical disabled reason-code vocabulary.
func AdminSemanticProfile ¶ added in v0.125.0
func AdminSemanticProfile() gotheme.TokenProfile
AdminSemanticProfile returns the portable semantic profile extended with the package tokens transported or consumed by go-admin.
func ApplyEntryNavigationReadContract ¶ added in v0.111.0
func ApplyEntryNavigationReadContract(record map[string]any, policy EntryNavigationPolicy) map[string]any
ApplyEntryNavigationReadContract returns a cloned record with normalized _navigation, effective_menu_locations, and effective_navigation_visibility.
func ApplyEntryNavigationWriteContract ¶ added in v0.111.0
func ApplyEntryNavigationWriteContract(record map[string]any, policy EntryNavigationPolicy, always bool) error
ApplyEntryNavigationWriteContract normalizes _navigation and writes the effective visibility fields onto a mutable record before persistence.
func AttachErrorContext ¶ added in v0.24.0
AttachErrorContext ensures stack trace + location are present for API responses.
func AuthenticatedRequestFromContext ¶ added in v0.66.0
AuthenticatedRequestFromContext reports whether the request has passed admin authentication middleware.
func BackfillContentTypeNavigationDefaults ¶ added in v0.26.0
func BackfillContentTypeNavigationDefaults(ctx context.Context, service CMSContentTypeService) (int, error)
BackfillContentTypeNavigationDefaults updates existing content types so canonical navigation defaults are persisted for legacy capability payloads.
func BlockEditorDescriptor ¶ added in v0.23.0
func BlockEditorDescriptor(basePath string) components.Descriptor
BlockEditorDescriptor returns the component descriptor for registration.
func BlockLibraryPickerDescriptor ¶ added in v0.24.0
func BlockLibraryPickerDescriptor(basePath string) components.Descriptor
BlockLibraryPickerDescriptor returns the component descriptor for registration.
func BlockLibraryPickerDescriptorWithAPIBase ¶ added in v0.24.0
func BlockLibraryPickerDescriptorWithAPIBase(basePath, apiBase string) components.Descriptor
BlockLibraryPickerDescriptorWithAPIBase returns the component descriptor with an explicit API base. apiBase should point to the admin API root (e.g. /admin/api or /admin/api/v0).
func BuildSitePreviewURL ¶ added in v0.86.0
BuildSitePreviewURL adds or replaces preview_token on a public preview path. Absolute HTTP(S) preview URLs require BuildSitePreviewURLWithAllowedHosts.
func BuildSitePreviewURLWithAllowedHosts ¶ added in v0.86.0
BuildSitePreviewURLWithAllowedHosts adds or replaces preview_token on a preview path. Relative paths are always allowed; absolute HTTP(S) URLs are allowed only when their host is present in allowedHosts.
func CMSBlockDefinitionChannel ¶ added in v0.54.0
func CMSBlockDefinitionChannel(def CMSBlockDefinition) string
func CMSContentTypeChannel ¶ added in v0.27.0
func CMSContentTypeChannel(ct CMSContentType) string
func CanAll ¶ added in v0.25.0
func CanAll(authorizer Authorizer, ctx context.Context, resource string, permissions ...string) bool
CanAll returns true when all provided permissions are allowed.
func CanAny ¶ added in v0.25.0
func CanAny(authorizer Authorizer, ctx context.Context, resource string, permissions ...string) bool
CanAny returns true when any provided permission is allowed.
func CanonicalContentPath ¶ added in v0.26.0
CanonicalContentPath builds a canonical content path from content type and slug.
func CanonicalContentURL ¶ added in v0.26.0
CanonicalContentURL builds a canonical URL from base URL and content path.
func CanonicalPath ¶ added in v0.26.0
CanonicalPath normalizes path with leading slash and fallback slug support.
func CanonicalPolicyEntityKey ¶ added in v0.25.0
CanonicalPolicyEntityKey performs structural normalization for policy entities. Semantic aliasing (for example singular/plural preferences) is resolved by policy-level lookup code where configured entity keys are available.
func CaptureJSErrorContext ¶ added in v0.24.0
func CaptureJSErrorContext(collector *DebugCollector, c router.Context, viewCtx router.ViewContext) router.ViewContext
CaptureJSErrorContext injects JS error collector variables into the view context without capturing template data or injecting toolbar variables. Use this on non-admin pages (public site, login) that need the global error collector but not the full debug integration.
func CaptureViewContext ¶ added in v0.14.0
func CaptureViewContext(collector *DebugCollector, viewCtx router.ViewContext) router.ViewContext
CaptureViewContext stores template data in the debug collector and returns the view context. When the debug collector has ToolbarMode enabled, it also injects toolbar template variables: - debug_toolbar_enabled: true when toolbar should be shown - debug_path: the canonical debug module base path - debug_toolbar_panels: comma-separated list of panels for the toolbar - debug_slow_threshold_ms: slow query threshold in milliseconds - debug_toolbar_ws_path: canonical debug toolbar websocket path - debug_toolbar_transport_base_path: canonical transport base path used by live toolbars - debug_toolbar_errors_path: JS error ingestion path when enabled - debug_toolbar_live_enabled: true when live toolbar transport is available - debug_preferences_namespace: identity namespace for toolbar browser state ("" keeps legacy keys)
Note: this variant cannot inject JS error nonce cookies because it does not have access to the router.Context. Use CaptureViewContextForRequest when possible to get full JS error collector support.
func CaptureViewContextForRequest ¶ added in v0.16.0
func CaptureViewContextForRequest(collector *DebugCollector, c router.Context, viewCtx router.ViewContext) router.ViewContext
CaptureViewContextForRequest is like CaptureViewContext but honors ToolbarExcludePaths and injects JS error collector variables (with nonce) when CaptureJSErrors is enabled.
func CollectIconContributions ¶ added in v0.25.0
func CollectIconContributions(contributor IconContributor, callbacks IconContributorCallbacks) error
CollectIconContributions processes icon contributions from a module.
func CommandLauncherActionID ¶ added in v0.120.0
CommandLauncherActionID returns the stable panel action identifier for a command descriptor. Integrations can use it to navigate to and preselect a command without duplicating the launcher's collision-safe encoding.
func CommandResultFailure ¶ added in v0.113.13
CommandResultFailure returns an operational failure reported by an inline command result. Results that do not implement CommandResultFailureReporter are treated as successful transport outcomes.
func ConfigureTranslationSuggestionServiceDependencies ¶ added in v0.110.0
func ConfigureTranslationSuggestionServiceDependencies(service TranslationSuggestionService, deps TranslationSuggestionServiceDependencies)
ConfigureTranslationSuggestionServiceDependencies fills missing host-provided dependencies on services that opt into late configuration.
func ConsolePageRenderer ¶ added in v0.139.0
func ConsolePageRenderer(adm *Admin, template string, chrome AdminPageChrome) func(router.Context, console.Bootstrap) error
ConsolePageRenderer returns a ConsoleHostConfig.RenderPage adapter that renders the console shell inside the admin layout. The bootstrap is serialized once with encoding/json, whose default HTML escaping keeps it safe inside the page's JSON script element.
func ContentChannelFromContext ¶ added in v0.26.0
ContentChannelFromContext returns the active content channel stored on the context.
func ContentTypeCapabilityString ¶ added in v0.75.0
ContentTypeCapabilityString returns the first non-empty string value for the canonical capability keys, accepting snake_case, camelCase, and kebab-case spellings for compatibility with legacy payloads. Identifier-like capabilities are normalized to lowercase; display strings preserve case.
func ContentTypeCapabilityValue ¶ added in v0.75.0
ContentTypeCapabilityValue returns the first capability value for the canonical capability keys, accepting snake_case, camelCase, and kebab-case spellings for compatibility with legacy payloads.
func ContentTypeCapabilityValues ¶ added in v0.75.0
ContentTypeCapabilityValues returns all values found for the canonical capability keys and their supported legacy spellings.
func ContextWithActionDiagnostics ¶ added in v0.27.0
func ContextWithActionDiagnostics(ctx context.Context, sink ActionDiagnosticSink) context.Context
func ContextWithActionResponseCollector ¶ added in v0.27.0
func ContextWithActionResponseCollector(ctx context.Context, collector *ActionResponseCollector) context.Context
ContextWithActionResponseCollector injects a collector into context for command handlers.
func DashboardPageAreaByCode ¶ added in v0.34.0
DashboardPageAreaByCode resolves an area by canonical area code first and falls back to slot matching when callers only know the page slot.
func DashboardPageWidgetsForAreaCode ¶ added in v0.34.0
func DashboardPageWidgetsForAreaCode(page dashcmp.Page, areaCode string) []dashcmp.WidgetFrame
DashboardPageWidgetsForAreaCode returns a copy of the widget frames rendered for a canonical area code.
func DataActionKind ¶ added in v0.139.0
DataActionKind returns the lifecycle kind of a Data action ID so module policy can authorize declared actions by kind.
func DataActionResult ¶ added in v0.139.0
func DataActionResult(kind admindata.Kind, result admindata.Result, err error) (console.PanelActionResult, error)
DataActionResult presents the outcome of dispatching kind on the console action route. Denials and errors outside the Data contract stay errors, so the host answers with their status and the client revalidates access; every other typed failure becomes a safe, field-addressable result. Success wording never calls accepted, prepared or verified work active, and every outcome refreshes the panels so the operation row and active state come from the read model. Cancel results describe the target operation, not the request.
func DataCheckRecord ¶ added in v0.139.0
func DataCheckRecord(view DataCheckView, revision uint64) console.Record
DataCheckRecord projects one check row.
func DataCoverageRecord ¶ added in v0.139.0
func DataCoverageRecord(view DataCoverageView, revision uint64) console.Record
DataCoverageRecord projects one coverage period row.
func DataDatasetRecord ¶ added in v0.139.0
func DataDatasetRecord(descriptor admindata.Descriptor, revision uint64) console.Record
DataDatasetRecord projects one catalog dataset version.
func DataOperationRecord ¶ added in v0.139.0
DataOperationRecord projects one operation; its revision is the operation's.
func DataOverviewRecord ¶ added in v0.139.0
func DataOverviewRecord(view DataOverviewView, revision uint64) console.Record
DataOverviewRecord projects the overview summary record.
func DataPanelIDs ¶ added in v0.139.0
func DataPanelIDs() []string
DataPanelIDs returns the Data panels in display order.
func DataScenarioRecord ¶ added in v0.139.0
func DataScenarioRecord(view DataScenarioView, revision uint64) console.Record
DataScenarioRecord projects one scenario row.
func DebugRequestMiddleware ¶ added in v0.14.0
func DebugRequestMiddleware(collector *DebugCollector) router.MiddlewareFunc
DebugRequestMiddleware captures request metadata for the debug collector.
func DecodeWidgetConfig ¶ added in v0.25.0
DecodeWidgetConfig strictly decodes provider config into a typed struct. Unknown fields are rejected.
func DefaultDebugPanels ¶ added in v0.24.0
func DefaultDebugPanels() []string
DefaultDebugPanels returns the default debug panel IDs.
func DefaultDebugToolbarPanels ¶ added in v0.24.0
func DefaultDebugToolbarPanels() []string
DefaultDebugToolbarPanels returns the default toolbar panel IDs.
func DeliveryGraphQLControllers ¶ added in v0.23.0
func DeliveryGraphQLControllers() []registrar.Controller
DeliveryGraphQLControllers exposes delivery schema controllers for go-crud/gql registration.
func EffectivePreferencesPermission ¶ added in v0.122.0
EffectivePreferencesPermission returns the permission enforced by preferences routes and navigation when the caller leaves it unset.
func EffectiveProfilePermission ¶ added in v0.122.0
EffectiveProfilePermission returns the permission enforced by profile routes and navigation when the caller leaves it unset.
func EffectiveSettingsPermission ¶ added in v0.122.0
EffectiveSettingsPermission returns the permission enforced by settings routes and navigation when the caller leaves SettingsPermission unset.
func EnrichLayoutViewContext ¶ added in v0.25.0
func EnrichLayoutViewContext(adm *Admin, c router.Context, view router.ViewContext, active string) router.ViewContext
EnrichLayoutViewContext injects standard layout keys (paths, nav, session, theme, capabilities). It is intended for module/host handlers rendering templates that extend layout.html.
func EnrichLayoutViewContextWithChrome ¶ added in v0.132.0
func EnrichLayoutViewContextWithChrome(adm *Admin, c router.Context, view router.ViewContext, chrome AdminPageChrome) router.ViewContext
EnrichLayoutViewContextWithChrome projects typed page presentation into a cloned view context, then adds request-scoped shell dependencies. Non-zero typed page values win over legacy page keys; arbitrary action markup remains owned by the page_header_actions template block.
func EnsureMenuParents ¶
func EnsureMenuParents(ctx context.Context, opts EnsureMenuParentsOptions) error
EnsureMenuParents upserts parent/group/collapsible nodes with deterministic IDs before children are added. It tolerates existing menus/items (idempotent) and maps IDs/parents to UUIDs for adapter compatibility.
func EnsureWorkflowAuthoringCutover ¶ added in v0.27.0
EnsureWorkflowAuthoringCutover migrates legacy workflow rows into canonical authoring stores and hard-fails when required schema objects are missing.
func EnvironmentFromContext ¶ added in v0.24.0
EnvironmentFromContext returns the active environment stored on the context.
func EvaluateEntryNavigationVisibility ¶ added in v0.111.0
func EvaluateEntryNavigationVisibility(eligible []string, overrides map[string]string, defaultSet map[string]struct{}, policy EntryNavigationPolicy) (map[string]bool, []string)
EvaluateEntryNavigationVisibility computes effective visibility for all eligible locations using normalized overrides and defaults.
func ExtractContentPath ¶ added in v0.26.0
ExtractContentPath resolves canonical content path from data/metadata maps with fallback support.
func FamilyDetailFragmentSelector ¶ added in v0.86.0
func FamilyDetailFragmentSelector(target FamilyDetailFragmentTarget) (string, bool)
func GetSVGFieldTypeMapping ¶ added in v0.25.0
GetSVGFieldTypeMapping returns the svgFieldTypeKeys map for backward compatibility.
func GetTranslationAssignmentMigrationsFS ¶ added in v0.25.0
GetTranslationAssignmentMigrationsFS returns the legacy queue assignment migration set.
func GetTranslationFlowMigrationsFS ¶ added in v0.27.0
GetTranslationFlowMigrationsFS returns the full translation-flow migration set.
func GetTranslationFlowSQLiteMigrationsFS ¶ added in v0.27.0
GetTranslationFlowSQLiteMigrationsFS returns the sqlite-compatible translation-flow migrations.
func GetWorkflowRuntimeMigrationsFS ¶ added in v0.25.0
GetWorkflowRuntimeMigrationsFS returns runtime workflow migrations rooted for sqlite usage.
func IsCMSPageContentRecord ¶ added in v0.84.0
IsCMSPageContentRecord reports whether either content type field identifies a generic content record that should be treated as a CMS page bridge record.
func IsCMSPageContentTypeSlug ¶ added in v0.84.0
IsCMSPageContentTypeSlug reports whether value identifies the backing content type slug used by go-cms page records.
func IsCMSPagePolicyEntity ¶ added in v0.84.0
IsCMSPagePolicyEntity reports whether value identifies the go-cms Pages service entity used by policy and translation-family code.
func IsTranslationMissing ¶ added in v0.24.0
IsTranslationMissing reports whether an error indicates a missing translation.
func LocaleFallbackAllowed ¶ added in v0.26.0
LocaleFallbackAllowed reports locale fallback policy from context. When no explicit value exists, fallback remains enabled.
func LocaleFromContext ¶ added in v0.23.0
LocaleFromContext exposes locale lookup for external adapters.
func ManagementGraphQLControllers ¶ added in v0.23.0
func ManagementGraphQLControllers() []registrar.Controller
ManagementGraphQLControllers exposes management schema controllers for go-crud/gql registration.
func MenuUUIDFromSlug ¶
MenuUUIDFromSlug derives a deterministic UUID string from a menu slug/name.
func NavigationOverrideModes ¶ added in v0.111.0
func NavigationOverrideModes() []string
NavigationOverrideModes returns the supported tri-state override values.
func NewAdminActivityEnricher ¶ added in v0.22.0
func NewAdminActivityEnricher(cfg AdminActivityEnricherConfig) usersactivity.ActivityEnricher
NewAdminActivityEnricher builds an activity enricher that adds missing metadata keys.
func NewAdminObjectResolver ¶ added in v0.22.0
func NewAdminObjectResolver(cfg AdminObjectResolverConfig) usersactivity.ObjectResolver
NewAdminObjectResolver returns an object resolver map for admin object types.
func NewCRUDContext ¶ added in v0.24.0
NewCRUDContext builds a minimal crud.Context backed by the provided context.
func NewDomainError ¶ added in v0.24.0
NewDomainError builds a go-errors Error from a registered domain error code.
func NewRoleFormGenerator ¶ added in v0.22.0
func NewRoleFormGenerator(cfg Config) (*formgenorchestrator.Orchestrator, error)
NewRoleFormGenerator builds a roles form generator using embedded OpenAPI + UI schema.
func NormalizeBasePath ¶ added in v0.24.0
NormalizeBasePath exposes admin base-path normalization.
func NormalizeContentTypeCapabilities ¶ added in v0.26.0
func NormalizeContentTypeCapabilities(capabilities map[string]any) (map[string]any, map[string]string)
NormalizeContentTypeCapabilities returns canonical capability objects and validation metadata without mutating the input payload.
func NormalizeFilterType ¶ added in v0.24.0
NormalizeFilterType normalizes field/filter input types into UI filter types.
func NormalizeMenuItemTranslationFields ¶ added in v0.24.0
func NormalizeMenuItemTranslationFields(item MenuItem) (label, labelKey, groupTitle, groupTitleKey string)
NormalizeMenuItemTranslationFields trims menu translation fields without synthesizing display values from translation keys.
func NormalizeMenuItemType ¶ added in v0.24.0
NormalizeMenuItemType normalizes menu item type values.
func NormalizeMenuSlug ¶
NormalizeMenuSlug converts an arbitrary name/code into a normalized slug. It lowercases, trims whitespace, and replaces non slug characters with '-'.
func NormalizeNavigationOverrideMap ¶ added in v0.111.0
NormalizeNavigationOverrideMap validates and normalizes an entry _navigation payload. Nil or empty maps return nil.
func NormalizeNavigationOverrideMode ¶ added in v0.111.0
NormalizeNavigationOverrideMode normalizes a raw override value to inherit, show, or hide. Invalid values return an empty string.
func NotificationSystemAuthorityFromContext ¶ added in v0.130.0
NotificationSystemAuthorityFromContext reports whether trusted middleware or authenticated actor metadata explicitly granted system authority.
func ParseListPredicateKey ¶ added in v0.24.0
ParseListPredicateKey splits field operator keys like "status__in".
func PermissionGrantMatches ¶ added in v0.110.0
PermissionGrantMatches reports whether a granted permission covers a required permission using go-admin grant semantics. Exact grants match literally, and admin namespace wildcards such as "admin.*" or "admin.translations.*" cover concrete descendant admin permissions.
func PermissionMatrixDescriptor ¶ added in v0.22.0
func PermissionMatrixDescriptor(basePath string) components.Descriptor
PermissionMatrixDescriptor returns the component descriptor for registration.
func PrefixBasePath ¶ added in v0.24.0
PrefixBasePath exposes admin path prefix behavior.
func RateLimitError ¶ added in v0.23.0
func RateLimitError() error
RateLimitError creates an error for rate limit violations
func RegisterActionDiagnosticsDebugPanel ¶ added in v0.27.0
func RegisterActionDiagnosticsDebugPanel(admin *Admin)
func RegisterBuiltinIconLibraries ¶ added in v0.25.0
func RegisterBuiltinIconLibraries(svc *IconService) error
RegisterBuiltinIconLibraries registers all built-in icon libraries.
func RegisterCommand ¶ added in v0.12.0
func RegisterCommand[T any](bus *CommandBus, cmd command.Commander[T], runnerOpts ...runner.Option) (dispatcher.Subscription, error)
RegisterCommand wires a command handler into the go-command registry and dispatcher.
func RegisterCommandLauncherDebugPanel ¶ added in v0.97.0
func RegisterCommandLauncherDebugPanel(adm *Admin)
RegisterCommandLauncherDebugPanel registers the generic command catalog launcher. It is inert when no command catalog provider is configured.
func RegisterCommandLauncherDoctorCheck ¶ added in v0.97.0
func RegisterCommandLauncherDoctorCheck(adm *Admin)
RegisterCommandLauncherDoctorCheck exposes launcher readiness through the Doctor panel so an empty command launcher is not reported as healthy.
func RegisterCommandRunsDebugPanel ¶ added in v0.121.3
func RegisterCommandRunsDebugPanel(adm *Admin)
RegisterCommandRunsDebugPanel registers the stable panel only for a running gateway with snapshot storage. Publisher-only and disabled runtimes stay inert.
func RegisterContextMessageFactory ¶ added in v0.126.8
func RegisterContextMessageFactory[T any](bus *CommandBus, name string, build contextMessageBuilder[T]) error
RegisterContextMessageFactory registers a context-aware factory and typed dispatcher for name-based routing.
func RegisterContextMessageResultFactory ¶ added in v0.126.8
func RegisterContextMessageResultFactory[T any, R any](bus *CommandBus, name string, build contextMessageBuilder[T]) error
RegisterContextMessageResultFactory registers a context-aware name-based command dispatcher that can return inline result data.
func RegisterCoreCommandFactories ¶ added in v0.12.0
func RegisterCoreCommandFactories(bus *CommandBus) error
RegisterCoreCommandFactories installs factories for built-in commands.
func RegisterDashboardProviderFactory ¶ added in v0.12.0
func RegisterDashboardProviderFactory(bus *CommandBus, commandName, code string, defaultConfig map[string]any) error
RegisterDashboardProviderFactory registers a factory for a dashboard provider command name.
func RegisterDataPanels ¶ added in v0.139.0
func RegisterDataPanels(registry *console.PanelRegistry, actions ...DataPanelActions) error
RegisterDataPanels declares the Data views on a registry owned by the Data module. The module's snapshot source supplies records built with the Data*Record projections after its read and record policy selected them. Without DataPanelActions every panel is read-only.
func RegisterDefaultCMSWorkflows ¶ added in v0.24.0
func RegisterDefaultCMSWorkflows(registrar WorkflowRegistrar)
RegisterDefaultCMSWorkflows registers the default CMS workflow definitions. If the registrar supports WorkflowDefinitionChecker, existing definitions are preserved.
func RegisterDeliveryGraphQLSchemas ¶ added in v0.23.0
func RegisterDeliveryGraphQLSchemas()
RegisterDeliveryGraphQLSchemas registers delivery schemas into the go-crud registry.
func RegisterDeploymentDebugPanel ¶ added in v0.122.0
func RegisterDeploymentDebugPanel(adm *Admin)
RegisterDeploymentDebugPanel registers an admin-scoped snapshot provider. The global registry receives metadata only so multiple Admin instances never capture each other's identity through a process-global closure.
func RegisterDoctorDebugPanel ¶ added in v0.25.0
func RegisterDoctorDebugPanel(admin *Admin)
RegisterDoctorDebugPanel registers the doctor panel with the debug collector.
func RegisterDomainErrorCodes ¶ added in v0.24.0
func RegisterDomainErrorCodes(codes ...DomainErrorCode)
RegisterDomainErrorCodes adds or replaces domain error code metadata.
func RegisterManagementGraphQLSchemas ¶ added in v0.23.0
func RegisterManagementGraphQLSchemas()
RegisterManagementGraphQLSchemas registers management schemas into the go-crud registry.
func RegisterMessageFactory ¶ added in v0.12.0
func RegisterMessageFactory[T any](bus *CommandBus, name string, build messageBuilder[T]) error
RegisterMessageFactory registers both a factory and a typed dispatcher for name-based routing.
func RegisterMessageResultFactory ¶ added in v0.88.0
func RegisterMessageResultFactory[T any, R any](bus *CommandBus, name string, build messageBuilder[T]) error
RegisterMessageResultFactory registers a name-based command dispatcher that can return inline result data.
func RegisterPermissionsDebugPanel ¶ added in v0.25.0
func RegisterPermissionsDebugPanel(admin *Admin)
RegisterPermissionsDebugPanel registers the permissions panel with the debug collector.
func RegisterQuery ¶ added in v0.12.0
func RegisterQuery[T any, R any](bus *CommandBus, qry command.Querier[T, R], runnerOpts ...runner.Option) (dispatcher.Subscription, error)
RegisterQuery wires a query handler into the go-command registry and dispatcher.
func RegisterSetCommand ¶ added in v0.126.8
func RegisterSetCommand[T any](set *CommandRegistrationSet, handler command.Commander[T], opts ...runner.Option) error
RegisterSetCommand stages a typed command handler and its runner options.
func RegisterSetContextMessageFactory ¶ added in v0.126.8
func RegisterSetContextMessageFactory[T any](set *CommandRegistrationSet, name string, build contextMessageBuilder[T]) error
RegisterSetContextMessageFactory stages a context-aware named factory.
func RegisterSetContextMessageResultFactory ¶ added in v0.126.8
func RegisterSetContextMessageResultFactory[T any, R any](set *CommandRegistrationSet, name string, build contextMessageBuilder[T]) error
RegisterSetContextMessageResultFactory stages a context-aware named factory that can retrieve an inline typed result.
func RegisterSetMessageFactory ¶ added in v0.126.8
func RegisterSetMessageFactory[T any](set *CommandRegistrationSet, name string, build messageBuilder[T]) error
RegisterSetMessageFactory stages a context-free named factory.
func RegisterSetMessageResultFactory ¶ added in v0.126.8
func RegisterSetMessageResultFactory[T any, R any](set *CommandRegistrationSet, name string, build messageBuilder[T]) error
RegisterSetMessageResultFactory stages a context-free named result factory.
func RegisterTranslationExchangeCommandFactories ¶ added in v0.25.0
func RegisterTranslationExchangeCommandFactories(bus *CommandBus) error
RegisterTranslationExchangeCommandFactories installs name-based factory dispatch for exchange commands.
func RegisterTranslationProgressWidget ¶ added in v0.25.0
func RegisterTranslationProgressWidget(dash *Dashboard, stats TranslationQueueStatsService, urls urlkit.Resolver)
RegisterTranslationProgressWidget registers queue progress dashboard provider.
func RegisterTranslationQueueCommandFactories ¶ added in v0.25.0
func RegisterTranslationQueueCommandFactories(bus *CommandBus) error
RegisterTranslationQueueCommandFactories installs name-based message factories for queue commands.
func RegisterTranslationQueueCommands ¶ added in v0.25.0
func RegisterTranslationQueueCommands(bus *CommandBus, service TranslationQueueService) error
RegisterTranslationQueueCommands registers typed queue handlers and name-based factories.
func RegisterTranslationQueueTabs ¶ added in v0.25.0
RegisterTranslationQueueTabs attaches translation queue tabs to translation-enabled detail views.
func RegisterTranslationSuggestionCommandFactories ¶ added in v0.110.0
func RegisterTranslationSuggestionCommandFactories(bus *CommandBus) error
RegisterTranslationSuggestionCommandFactories installs name-based factories for translation suggestion commands.
func RegisterTranslationSuggestionCommands ¶ added in v0.110.0
func RegisterTranslationSuggestionCommands(bus *CommandBus, service TranslationSuggestionService) error
RegisterTranslationSuggestionCommands registers typed suggestion handlers and name-based factories.
func RequestIPFromContext ¶ added in v0.27.0
RequestIPFromContext returns the request IP address captured for the active admin context.
func ResolveContentPath ¶ added in v0.26.0
func ResolveContentPath(content CMSContent, fallback string) string
ResolveContentPath resolves canonical content path from CMSContent fields.
func ResolveContentPreviewPath ¶ added in v0.86.0
ResolveContentPreviewPath resolves the public preview path for a content record. It only uses explicit path/preview_url values. Use ResolveContentPreviewPathWithOptions with AllowSlugFallback for routed content types that intentionally derive public paths from slug.
func ResolveContentPreviewPathWithOptions ¶ added in v0.96.0
func ResolveContentPreviewPathWithOptions(record map[string]any, opts ContentPreviewPathOptions) string
ResolveContentPreviewPathWithOptions resolves the public preview path for a content record with caller-controlled fallback behavior.
func ResolveEntryNavigationVisibility ¶ added in v0.111.0
func ResolveEntryNavigationVisibility(location string, overrides map[string]string, defaultSet map[string]struct{}, policy EntryNavigationPolicy) bool
ResolveEntryNavigationVisibility resolves a single location to its effective visible state.
func ResolvedPermissionsFromAuthorizer ¶ added in v0.25.0
func ResolvedPermissionsFromAuthorizer(ctx context.Context, authorizer Authorizer) []string
ResolvedPermissionsFromAuthorizer extracts resolved permissions when supported by the authorizer implementation.
func SchemaEditorDescriptor ¶ added in v0.23.0
func SchemaEditorDescriptor(basePath string) components.Descriptor
SchemaEditorDescriptor returns the component descriptor for registration.
func SetDefaultErrorPresenter ¶ added in v0.24.0
func SetDefaultErrorPresenter(presenter ErrorPresenter)
SetDefaultErrorPresenter overrides the package-level presenter used by helpers.
func SyncTranslationFamilyStore ¶ added in v0.27.0
SyncTranslationFamilyStore rebuilds the canonical family/variant tables from the CMS content service.
func SyncTranslationFamilyStoreForFamily ¶ added in v0.80.0
func SyncTranslationFamilyStoreForFamily(ctx context.Context, adm *Admin, environment string, familyID string) error
SyncTranslationFamilyStoreForFamily rebuilds the canonical family/variant tables from the CMS content service. When familyID is non-empty, only that family is saved and recomputed.
func TranslationCapabilities ¶ added in v0.25.0
TranslationCapabilities returns a translation capability snapshot for the admin instance. The payload shape is stable for template/frontend gating: - profile - schema_version - modules - features - routes - panels - resolver_keys - warnings - contracts
func TranslationCapabilitiesForContext ¶ added in v0.25.0
TranslationCapabilitiesForContext returns a translation capability snapshot with request-scoped permission states when context is available.
func TranslationDashboardContractPayload ¶ added in v0.27.0
func TranslationDashboardQueryModels ¶ added in v0.27.0
func TranslationEditorContractPayload ¶ added in v0.27.0
TranslationEditorContractPayload documents the editor-side field and assist envelopes shared by backend payloads and frontend parsers.
func TranslationExchangeContractPayload ¶ added in v0.27.0
func TranslationMatrixContractPayload ¶ added in v0.27.0
func TranslationMatrixQueryModel ¶ added in v0.27.0
func TranslationQueueContractPayload ¶ added in v0.27.0
func TranslationQueuePresetQuery ¶ added in v0.86.0
func TranslationQueueReviewAggregateCountKeys ¶ added in v0.27.0
func TranslationQueueReviewAggregateCountKeys() []string
func TranslationQueueSavedFilterPresets ¶ added in v0.27.0
func TranslationQueueSavedReviewFilterPresets ¶ added in v0.27.0
func TranslationQueueSupportedFilterKeys ¶ added in v0.27.0
func TranslationQueueSupportedFilterKeys() []string
func TranslationQueueSupportedReviewStates ¶ added in v0.27.0
func TranslationQueueSupportedReviewStates() []string
func TranslationQueueSupportedSortKeys ¶ added in v0.27.0
func TranslationQueueSupportedSortKeys() []string
func TranslationSharedContractsPayload ¶ added in v0.25.0
TranslationSharedContractsPayload returns the canonical shared translation contracts consumed by frontend status/reason renderers.
func TranslationSourceTargetDriftContract ¶ added in v0.25.0
TranslationSourceTargetDriftContract documents the source-target drift metadata contract expected by side-by-side editor surfaces.
func TranslationStatusEnumContract ¶ added in v0.25.0
TranslationStatusEnumContract returns stable status enums shared across core translation readiness, queue, and exchange payloads.
func ValidateAndNormalizeContentTypeCapabilities ¶ added in v0.26.0
func ValidateAndNormalizeContentTypeCapabilities(capabilities map[string]any) (map[string]any, error)
ValidateAndNormalizeContentTypeCapabilities validates and normalizes capabilities via the canonical go-cms implementation.
func ValidateCommandRunRuntimeConfig ¶ added in v0.121.3
func ValidateCommandRunRuntimeConfig(config CommandRunRuntimeConfig) error
ValidateCommandRunRuntimeConfig checks an already normalized configuration.
func ValidateCommandRunUpdate ¶ added in v0.121.3
func ValidateCommandRunUpdate(update CommandRunUpdate, limits CommandRunContractLimits) error
ValidateCommandRunUpdate validates an update without exposing a normalized copy.
func ValidateEntryNavigationOverrides ¶ added in v0.111.0
func ValidateEntryNavigationOverrides(overrides map[string]string, eligible []string, strict bool) (map[string]string, error)
ValidateEntryNavigationOverrides ensures override locations are eligible for a policy. Strict mode returns a validation error; non-strict mode drops ineligible locations.
func ValidateJSONPointerFormat ¶ added in v0.23.0
ValidateJSONPointerFormat checks if a string is a valid JSON Pointer
func WithActivityRetention ¶
func WithActivityRetention(limit int) func(*ActivityFeed)
WithActivityRetention caps the number of stored entries (0 = unlimited).
func WithAuthenticatedRequest ¶ added in v0.32.0
func WithContentChannel ¶ added in v0.26.0
WithContentChannel stores the active content channel on the context.
func WithEnvironment ¶ added in v0.24.0
WithEnvironment stores the active environment on the context.
func WithLocale ¶ added in v0.24.0
WithLocale stores the active locale on the context.
func WithLocaleFallback ¶ added in v0.26.0
WithLocaleFallback stores locale fallback policy on the context. The default behavior remains enabled when this value is not set.
func WithMutationFocus ¶ added in v0.86.0
func WithMutationFocus(selector string) func(*MutationPresentation)
func WithMutationFragment ¶ added in v0.86.0
func WithMutationFragment(fragment EnhancedFragment) func(*MutationPresentation)
func WithMutationRedirect ¶ added in v0.86.0
func WithMutationRedirect(redirect string) func(*MutationPresentation)
func WithMutationStatus ¶ added in v0.86.0
func WithMutationStatus(status int) func(*MutationPresentation)
func WithMutationToast ¶ added in v0.86.0
func WithMutationToast(toast EnhancedToast) func(*MutationPresentation)
func WithNotificationSystemAuthority ¶ added in v0.130.0
WithNotificationSystemAuthority marks a trusted service/authentication context as authorized to perform global notification operations. Request payloads and query parameters cannot set this value.
func WithRequestIP ¶ added in v0.27.0
WithRequestIP stores the request IP on the context for downstream modules/services.
func WithResolvedPermissionsCache ¶ added in v0.25.0
WithResolvedPermissionsCache injects a request-scoped permission resolution cache into context.
func WithStack ¶ added in v0.24.0
WithStack wraps an error with a captured stack trace for later mapping.
func WithThemeSelection ¶
func WithThemeSelection(ctx context.Context, selector ThemeSelector) context.Context
WithThemeSelection stores a theme selector on the context for downstream resolution.
func WithThemeSelectionFromRequest ¶ added in v0.134.0
func WithThemeSelectionFromRequest(ctx context.Context, c RouterContext) context.Context
WithThemeSelectionFromRequest applies the supported query/header theme overrides to ctx. Query values take precedence over headers, matching the admin request-resolution contract.
Types ¶
type Action ¶
type Action struct {
Name string `json:"name"`
Label string `json:"label,omitempty"`
LabelKey string `json:"label_key,omitempty"`
CommandName string `json:"command_name"`
Permission string `json:"permission,omitempty"`
PermissionsAll []string `json:"permissions_all,omitempty"`
Type string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Order int `json:"order,omitempty"`
Scope ActionScope `json:"scope,omitempty"`
ContextRequired []string `json:"context_required,omitempty"`
Icon string `json:"icon,omitempty"`
Confirm string `json:"confirm,omitempty"`
Variant string `json:"variant,omitempty"`
Overflow bool `json:"overflow,omitempty"`
Idempotent bool `json:"idempotent,omitempty"`
IdempotencyField string `json:"idempotency_field,omitempty"`
PayloadRequired []string `json:"payload_required,omitempty"`
PayloadSchema map[string]any `json:"payload_schema,omitempty"`
Guard ActionGuard `json:"-"`
}
Action describes an action or bulk action linked to a command handler.
func DefaultCMSWorkflowActions ¶ added in v0.24.0
func DefaultCMSWorkflowActions() []Action
DefaultCMSWorkflowActions returns the default workflow actions for CMS demo panels.
type ActionDiagnosticEntry ¶ added in v0.27.0
type ActionDiagnosticEntry struct {
Timestamp time.Time `json:"timestamp"`
Kind string `json:"kind"`
Panel string `json:"panel,omitempty"`
Action string `json:"action,omitempty"`
ActionNames []string `json:"action_names,omitempty"`
Scope string `json:"scope,omitempty"`
Stage string `json:"stage,omitempty"`
RecordID string `json:"record_id,omitempty"`
RecordIDs []string `json:"record_ids,omitempty"`
Permission string `json:"permission,omitempty"`
ReasonCode string `json:"reason_code,omitempty"`
Reason string `json:"reason,omitempty"`
ErrorText string `json:"error_text,omitempty"`
StatusCode int `json:"status_code,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
ActionDiagnosticEntry captures server-authored action availability or execution diagnostics for development and QA surfaces.
type ActionDiagnosticSink ¶ added in v0.27.0
type ActionDiagnosticSink interface {
CaptureActionDiagnostic(entry ActionDiagnosticEntry)
}
ActionDiagnosticSink records action diagnostics.
type ActionDiagnosticsDebugPanel ¶ added in v0.27.0
type ActionDiagnosticsDebugPanel struct {
// contains filtered or unexported fields
}
ActionDiagnosticsDebugPanel exposes recent action-state and action-failure diagnostics in the debug dashboard.
func NewActionDiagnosticsDebugPanel ¶ added in v0.27.0
func NewActionDiagnosticsDebugPanel(admin *Admin) *ActionDiagnosticsDebugPanel
func (*ActionDiagnosticsDebugPanel) Collect ¶ added in v0.27.0
func (p *ActionDiagnosticsDebugPanel) Collect(context.Context) map[string]any
func (*ActionDiagnosticsDebugPanel) ID ¶ added in v0.27.0
func (p *ActionDiagnosticsDebugPanel) ID() string
func (*ActionDiagnosticsDebugPanel) Icon ¶ added in v0.27.0
func (p *ActionDiagnosticsDebugPanel) Icon() string
func (*ActionDiagnosticsDebugPanel) Label ¶ added in v0.27.0
func (p *ActionDiagnosticsDebugPanel) Label() string
func (*ActionDiagnosticsDebugPanel) Span ¶ added in v0.27.0
func (p *ActionDiagnosticsDebugPanel) Span() int
type ActionDiagnosticsStore ¶ added in v0.27.0
type ActionDiagnosticsStore struct {
// contains filtered or unexported fields
}
ActionDiagnosticsStore keeps a bounded history of recent action diagnostics.
func NewActionDiagnosticsStore ¶ added in v0.27.0
func NewActionDiagnosticsStore(capacity int) *ActionDiagnosticsStore
func (*ActionDiagnosticsStore) Capture ¶ added in v0.27.0
func (s *ActionDiagnosticsStore) Capture(entry ActionDiagnosticEntry)
func (*ActionDiagnosticsStore) Entries ¶ added in v0.27.0
func (s *ActionDiagnosticsStore) Entries() []ActionDiagnosticEntry
type ActionGuard ¶ added in v0.27.0
type ActionGuard func(ActionGuardContext) ActionState
ActionGuard evaluates action availability for a single record context.
type ActionGuardContext ¶ added in v0.27.0
type ActionGuardContext struct {
AdminContext AdminContext `json:"admin_context"`
Panel *Panel `json:"panel"`
Action Action `json:"action"`
Record map[string]any `json:"record"`
Scope ActionScope `json:"scope"`
}
ActionGuardContext contains the inputs used to evaluate action availability for a single action against a single record.
type ActionRemediation ¶ added in v0.27.0
type ActionRemediation struct {
Label string `json:"label,omitempty"`
Href string `json:"href,omitempty"`
Kind string `json:"kind,omitempty"`
}
ActionRemediation describes an optional next step for a blocked action.
type ActionResponse ¶ added in v0.27.0
type ActionResponse struct {
StatusCode int `json:"status_code"`
Data map[string]any `json:"data"`
}
ActionResponse captures structured panel action output and an optional HTTP status override.
type ActionResponseCollector ¶ added in v0.27.0
type ActionResponseCollector struct {
// contains filtered or unexported fields
}
ActionResponseCollector stores the latest action response emitted during a command-backed panel action.
func ActionResponseCollectorFromContext ¶ added in v0.27.0
func ActionResponseCollectorFromContext(ctx context.Context) *ActionResponseCollector
ActionResponseCollectorFromContext resolves a collector from context when present.
func (*ActionResponseCollector) Load ¶ added in v0.27.0
func (c *ActionResponseCollector) Load() (ActionResponse, bool)
Load returns a cloned stored action response when present.
func (*ActionResponseCollector) Store ¶ added in v0.27.0
func (c *ActionResponseCollector) Store(response ActionResponse)
Store writes the latest action response.
type ActionScope ¶ added in v0.25.0
type ActionScope string
const ( ActionScopeAny ActionScope = "all" ActionScopeRow ActionScope = "row" ActionScopeDetail ActionScope = "detail" ActionScopeBulk ActionScope = "bulk" )
type ActionState ¶ added in v0.27.0
type ActionState struct {
Enabled bool `json:"enabled"`
ReasonCode string `json:"reason_code,omitempty"`
Reason string `json:"reason,omitempty"`
Severity string `json:"severity,omitempty"`
Kind string `json:"kind,omitempty"`
Permission string `json:"permission,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Remediation *ActionRemediation `json:"remediation,omitempty"`
AvailableTransitions []string `json:"available_transitions,omitempty"`
}
ActionState is the canonical server-authored availability payload for an action in a specific record or list context.
type ActivityDisplayHintPolicy ¶ added in v0.133.0
type ActivityDisplayHintPolicy interface {
AllowStoredDisplayHint(context.Context, ActivityReadContext, userstypes.ActivityRecord, string, string) bool
}
ActivityDisplayHintPolicy decides whether a stored display hint may be used when current resolution does not return a display value. A nil policy denies all stored hints.
type ActivityDisplayHintPolicyFunc ¶ added in v0.133.0
type ActivityDisplayHintPolicyFunc func(context.Context, ActivityReadContext, userstypes.ActivityRecord, string, string) bool
ActivityDisplayHintPolicyFunc adapts a function into an ActivityDisplayHintPolicy.
func (ActivityDisplayHintPolicyFunc) AllowStoredDisplayHint ¶ added in v0.133.0
func (f ActivityDisplayHintPolicyFunc) AllowStoredDisplayHint(ctx context.Context, readCtx ActivityReadContext, record userstypes.ActivityRecord, field, value string) bool
AllowStoredDisplayHint implements ActivityDisplayHintPolicy.
type ActivityEntry ¶
type ActivityEntry struct {
ID string `json:"id"`
Actor string `json:"actor,omitempty"`
Action string `json:"action,omitempty"`
ActionKey string `json:"action_key,omitempty"`
Object string `json:"object,omitempty"`
Channel string `json:"channel,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
ActivityEntry represents an activity feed entry.
type ActivityFeed ¶
type ActivityFeed struct {
// contains filtered or unexported fields
}
ActivityFeed stores activities in memory.
func NewActivityFeed ¶
func NewActivityFeed(opts ...func(*ActivityFeed)) *ActivityFeed
NewActivityFeed constructs a feed.
func (*ActivityFeed) List ¶
func (f *ActivityFeed) List(ctx context.Context, limit int, filters ...ActivityFilter) ([]ActivityEntry, error)
List returns the most recent entries.
func (*ActivityFeed) ListRecords ¶
func (f *ActivityFeed) ListRecords(ctx context.Context, limit int, filters ...ActivityFilter) ([]ActivityRecord, error)
ListRecords returns ActivityRecords for adapter use.
func (*ActivityFeed) Log ¶
func (f *ActivityFeed) Log(ctx context.Context, record ActivityRecord) error
Log implements a go-users-compatible logger.
func (*ActivityFeed) Record ¶
func (f *ActivityFeed) Record(ctx context.Context, entry ActivityEntry) error
Record appends an activity entry.
type ActivityFeedQuerier ¶ added in v0.14.0
type ActivityFeedQuerier interface {
Query(context.Context, types.ActivityFilter) (types.ActivityPage, error)
}
ActivityFeedQuerier represents the go-users activity feed query contract.
type ActivityFeedWidgetPayload ¶ added in v0.25.0
type ActivityFeedWidgetPayload struct {
Entries []ActivityEntry `json:"entries"`
}
type ActivityFilter ¶
type ActivityFilter struct {
Actor string `json:"actor"`
Action string `json:"action"`
Object string `json:"object"`
Channel string `json:"channel"`
}
ActivityFilter narrows feed listings.
type ActivityFilterOption ¶ added in v0.134.0
ActivityFilterOption is one stable machine value and its display label.
type ActivityFilterOptions ¶ added in v0.134.0
type ActivityFilterOptions struct {
Verbs []ActivityFilterOption `json:"verbs"`
Channels []ActivityFilterOption `json:"channels"`
ObjectTypes []ActivityFilterOption `json:"object_types"`
Revision string `json:"revision,omitempty"`
}
ActivityFilterOptions is the normalized Activity filter catalog returned to the browser. Revision is opaque provider metadata, not a response validator.
type ActivityFilterOptionsConfig ¶ added in v0.134.0
type ActivityFilterOptionsConfig struct {
Verbs []ActivityFilterOption `json:"verbs"`
Channels []ActivityFilterOption `json:"channels"`
ObjectTypes []ActivityFilterOption `json:"object_types"`
MaxOptions int `json:"max_options,omitempty"`
}
ActivityFilterOptionsConfig declares host-curated baseline options.
type ActivityFilterOptionsPolicy ¶ added in v0.134.0
type ActivityFilterOptionsPolicy interface {
FilterActivityFilterOptions(context.Context, ActivityFilterOptionsQuery, ActivityFilterOptions) (ActivityFilterOptions, error)
}
ActivityFilterOptionsPolicy applies host guards to the complete Config and provider result. Errors fail closed.
type ActivityFilterOptionsPolicyFunc ¶ added in v0.134.0
type ActivityFilterOptionsPolicyFunc func(context.Context, ActivityFilterOptionsQuery, ActivityFilterOptions) (ActivityFilterOptions, error)
ActivityFilterOptionsPolicyFunc adapts a function into a policy.
func (ActivityFilterOptionsPolicyFunc) FilterActivityFilterOptions ¶ added in v0.134.0
func (f ActivityFilterOptionsPolicyFunc) FilterActivityFilterOptions(ctx context.Context, query ActivityFilterOptionsQuery, options ActivityFilterOptions) (ActivityFilterOptions, error)
FilterActivityFilterOptions implements ActivityFilterOptionsPolicy.
type ActivityFilterOptionsProvider ¶ added in v0.134.0
type ActivityFilterOptionsProvider interface {
ActivityFilterOptions(context.Context, ActivityFilterOptionsQuery) (ActivityFilterOptions, error)
}
ActivityFilterOptionsProvider returns a request-time authorized option snapshot. Implementations are trusted backend integrations.
type ActivityFilterOptionsProviderFunc ¶ added in v0.134.0
type ActivityFilterOptionsProviderFunc func(context.Context, ActivityFilterOptionsQuery) (ActivityFilterOptions, error)
ActivityFilterOptionsProviderFunc adapts a function into a provider.
func (ActivityFilterOptionsProviderFunc) ActivityFilterOptions ¶ added in v0.134.0
func (f ActivityFilterOptionsProviderFunc) ActivityFilterOptions(ctx context.Context, query ActivityFilterOptionsQuery) (ActivityFilterOptions, error)
ActivityFilterOptions implements ActivityFilterOptionsProvider.
type ActivityFilterOptionsQuery ¶ added in v0.134.0
type ActivityFilterOptionsQuery struct {
ReadContext ActivityReadContext
EffectiveFilter usertypes.ActivityFilter
Selected ActivityFilterSelection
}
ActivityFilterOptionsQuery contains trusted request context for providers and policies. Callers receive detached values that are safe to mutate.
type ActivityFilterSelection ¶ added in v0.134.0
type ActivityFilterSelection struct {
Verbs []string `json:"verbs,omitempty"`
Channels []string `json:"channels,omitempty"`
ObjectType string `json:"object_type,omitempty"`
}
ActivityFilterSelection carries browser-owned values independently from the trusted visibility filter used for option discovery.
type ActivityLogger ¶
type ActivityLogger interface {
Log(context.Context, ActivityRecord) error
}
ActivityLogger matches the go-users ActivitySink shape (`Log` + ActivityRecord).
type ActivityModule ¶ added in v0.14.0
type ActivityModule struct {
// contains filtered or unexported fields
}
ActivityModule registers the activity log navigation and user detail tab.
func NewActivityModule ¶ added in v0.14.0
func NewActivityModule() *ActivityModule
NewActivityModule constructs the default activity module.
func (*ActivityModule) Manifest ¶ added in v0.14.0
func (m *ActivityModule) Manifest() ModuleManifest
Manifest describes the module metadata.
func (*ActivityModule) MenuItems ¶ added in v0.14.0
func (m *ActivityModule) MenuItems(locale string) []MenuItem
MenuItems contributes navigation for the activity module.
func (*ActivityModule) Register ¶ added in v0.14.0
func (m *ActivityModule) Register(ctx ModuleContext) error
Register wires the activity module metadata and user tab integration.
func (*ActivityModule) RouteContract ¶ added in v0.27.0
func (m *ActivityModule) RouteContract() routing.ModuleContract
func (*ActivityModule) WithMenuParent ¶ added in v0.14.0
func (m *ActivityModule) WithMenuParent(parent string) *ActivityModule
WithMenuParent nests the activity navigation under a parent menu item ID.
type ActivityNavigation ¶ added in v0.133.1
type ActivityNavigation struct {
}
ActivityNavigation contains optional host-owned navigation targets for one Activity record. Hrefs are presentation-only and are never persisted.
type ActivityNavigationError ¶ added in v0.133.1
type ActivityNavigationError struct {
}
ActivityNavigationError describes one fail-open navigation projection failure without conflating it with Activity page enrichment errors.
func (ActivityNavigationError) Error ¶ added in v0.133.1
func (e ActivityNavigationError) Error() string
Error implements error.
func (ActivityNavigationError) Unwrap ¶ added in v0.133.1
func (e ActivityNavigationError) Unwrap() error
Unwrap exposes the underlying resolver or href validation error.
type ActivityNavigationErrorHandler ¶ added in v0.133.1
type ActivityNavigationErrorHandler func(context.Context, ActivityReadContext, ActivityNavigationError)
ActivityNavigationErrorHandler observes fail-open navigation projection errors independently of page enrichment observability.
type ActivityNavigationResolver ¶ added in v0.133.1
type ActivityNavigationResolver interface {
}
ActivityNavigationResolver derives host-specific navigation for one authorized canonical Activity page. The result must preserve record order. Implementations must not treat record metadata as URL authority and should batch any request-level permission policy evaluation.
type ActivityNavigationResolverFunc ¶ added in v0.133.1
type ActivityNavigationResolverFunc func(context.Context, ActivityReadContext, []types.ActivityRecord) ([]ActivityNavigation, error)
ActivityNavigationResolverFunc adapts a function into an ActivityNavigationResolver.
func (ActivityNavigationResolverFunc) ResolveActivityNavigation ¶ added in v0.133.1
func (f ActivityNavigationResolverFunc) ResolveActivityNavigation(ctx context.Context, readCtx ActivityReadContext, records []types.ActivityRecord) ([]ActivityNavigation, error)
ResolveActivityNavigation implements ActivityNavigationResolver.
type ActivityNavigationTarget ¶ added in v0.133.1
type ActivityNavigationTarget string
ActivityNavigationTarget identifies the navigation projection stage that failed while preserving fail-open Activity reads.
const ( )
type ActivityPageEnricher ¶ added in v0.133.0
type ActivityPageEnricher interface {
EnrichActivityPage(context.Context, ActivityReadContext, types.ActivityPage) (types.ActivityPage, error)
}
ActivityPageEnricher enriches one authorized and sanitized activity page.
func NewResolverActivityPageEnricher ¶ added in v0.133.0
func NewResolverActivityPageEnricher(cfg ResolverActivityPageEnricherConfig) ActivityPageEnricher
NewResolverActivityPageEnricher builds a generic, repository-agnostic page enricher. Resolver calls receive only the trusted request scope.
type ActivityPageEnricherFunc ¶ added in v0.133.0
type ActivityPageEnricherFunc func(context.Context, ActivityReadContext, types.ActivityPage) (types.ActivityPage, error)
ActivityPageEnricherFunc adapts a function into an ActivityPageEnricher.
func (ActivityPageEnricherFunc) EnrichActivityPage ¶ added in v0.133.0
func (f ActivityPageEnricherFunc) EnrichActivityPage(ctx context.Context, readCtx ActivityReadContext, page types.ActivityPage) (types.ActivityPage, error)
EnrichActivityPage implements ActivityPageEnricher.
type ActivityReadContext ¶ added in v0.133.0
type ActivityReadContext struct {
Actor types.ActorRef
Scope types.ScopeFilter
}
ActivityReadContext carries trusted request authority into page enrichment. Scope is derived from the authenticated request and must never be inferred from activity metadata.
type ActivityReadEntry ¶ added in v0.133.1
type ActivityReadEntry struct {
ActivityEntry
ActorHref string `json:"actor_href,omitempty"`
ObjectHref string `json:"object_href,omitempty"`
}
ActivityReadEntry is the read-only API projection of an ActivityEntry. Navigation fields are deliberately excluded from the write-side entry so presentation state cannot cross a persistence boundary.
type ActivityReadErrorHandler ¶ added in v0.133.0
type ActivityReadErrorHandler func(context.Context, ActivityReadContext, error)
ActivityReadErrorHandler observes fail-open read-enrichment errors.
type ActivityRecord ¶
type ActivityRecord struct {
ID string `json:"id"`
UserID string `json:"user_id,omitempty"`
ActorID string `json:"actor_id,omitempty"`
Verb string `json:"verb,omitempty"`
ObjectType string `json:"object_type,omitempty"`
ObjectID string `json:"object_id,omitempty"`
Channel string `json:"channel,omitempty"`
IP string `json:"ip,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
Data map[string]any `json:"data,omitempty"`
OccurredAt time.Time `json:"occurred_at"`
}
ActivityRecord mirrors the go-users activity record contract for compatibility.
type ActivityRecordLister ¶
type ActivityRecordLister interface {
ListRecords(context.Context, int, ...ActivityFilter) ([]ActivityRecord, error)
}
ActivityRecordLister exposes listing ActivityRecords (for adapters backed by go-users).
type ActivitySink ¶
type ActivitySink interface {
Record(ctx context.Context, entry ActivityEntry) error
List(ctx context.Context, limit int, filters ...ActivityFilter) ([]ActivityEntry, error)
}
ActivitySink records activity entries.
type ActivitySinkAdapter ¶
type ActivitySinkAdapter struct {
// contains filtered or unexported fields
}
ActivitySinkAdapter bridges a go-users style logger into the ActivitySink contract.
func NewActivitySinkAdapter ¶
func NewActivitySinkAdapter(logger ActivityLogger, lister ActivityRecordLister) *ActivitySinkAdapter
NewActivitySinkAdapter builds an adapter that logs via the provided logger and, when possible, lists via lister; a fallback in-memory buffer preserves UI feeds.
func (*ActivitySinkAdapter) List ¶
func (a *ActivitySinkAdapter) List(ctx context.Context, limit int, filters ...ActivityFilter) ([]ActivityEntry, error)
List returns entries from the lister when present, otherwise from the fallback buffer.
func (*ActivitySinkAdapter) Record ¶
func (a *ActivitySinkAdapter) Record(ctx context.Context, entry ActivityEntry) error
Record converts ActivityEntry to ActivityRecord before delegating to the logger.
type ActivityUserBatchReader ¶ added in v0.133.0
type ActivityUserBatchReader interface {
ReadActivityUsers(context.Context, []uuid.UUID, usersactivity.ResolveContext) (map[uuid.UUID]UserRecord, error)
}
ActivityUserBatchReader supplies a true set-based user projection for Activity actor enrichment. The legacy UserRepository.Get path remains a compatibility fallback when this optional contract is absent.
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
Admin orchestrates CMS-backed admin features and adapters.
func New ¶
func New(cfg Config, deps Dependencies) (*Admin, error)
New constructs an Admin orchestrator with explicit dependencies.
func (*Admin) ActivityFeatureEnabled ¶ added in v0.32.0
ActivityFeatureEnabled reports whether the activity feature gate is enabled.
func (*Admin) ActivityFeed ¶
func (a *Admin) ActivityFeed() ActivitySink
ActivityFeed returns the activity sink.
func (*Admin) ActivityReadEnabled ¶ added in v0.25.0
ActivityReadEnabled reports whether the activity read API is both enabled and wired.
func (*Admin) ActivityWidget ¶
ActivityWidget registers the activity widget provider.
func (*Admin) AddCMSBootstrapHook ¶ added in v0.36.0
func (a *Admin) AddCMSBootstrapHook(hook CMSBootstrapHook)
AddCMSBootstrapHook registers a hook that can create or repair CMS content types before dynamic CMS reconciliation runs during admin initialization.
func (*Admin) AddInitHook ¶ added in v0.24.0
func (a *Admin) AddInitHook(hook func(AdminRouter) error)
AddInitHook registers a hook that runs after Initialize sets the router.
func (*Admin) AddPreviewURLAllowedHost ¶ added in v0.86.0
AddPreviewURLAllowedHost adds a host or URL host to the external preview URL allowlist.
func (*Admin) AdminAPIBasePath ¶ added in v0.24.0
AdminAPIBasePath returns the base path for admin API routes (including version when configured).
func (*Admin) AdminAPIGroup ¶ added in v0.24.0
AdminAPIGroup exposes the URLKit admin API group path.
func (*Admin) AdminUIGroup ¶ added in v0.27.0
AdminUIGroup exposes the URLKit admin UI group path.
func (*Admin) ApplyMediaSchemaHints ¶ added in v0.53.0
ApplyMediaSchemaHints enriches plain JSON Schema media fields with the endpoint contract expected by go-formgen's media picker component.
func (*Admin) AttachDebugLogBridge ¶ added in v0.25.0
func (a *Admin) AttachDebugLogBridge()
AttachDebugLogBridge wraps the admin DI logger/provider so application logs are captured by the debug collector in addition to any slog capture path.
func (*Admin) AuthWrapper ¶
func (a *Admin) AuthWrapper() boot.HandlerWrapper
AuthWrapper returns the configured auth wrapper for boot steps.
func (*Admin) Authenticator ¶ added in v0.27.0
func (a *Admin) Authenticator() Authenticator
Authenticator exposes the configured authenticator (if any).
func (*Admin) AuthorizedPanelBulkActions ¶ added in v0.130.0
func (a *Admin) AuthorizedPanelBulkActions(ctx context.Context, panelName string, actions []Action) []Action
AuthorizedPanelBulkActions filters panel bulk actions using every normalized required permission. A missing authorizer preserves the existing permissive compatibility behavior.
func (*Admin) Authorizer ¶ added in v0.22.0
func (a *Admin) Authorizer() Authorizer
Authorizer exposes the configured authorizer (if any).
func (*Admin) BootActivity ¶
func (a *Admin) BootActivity() boot.ActivityBinding
BootActivity exposes the activity binding.
func (*Admin) BootBulk ¶
func (a *Admin) BootBulk() boot.BulkBinding
BootBulk exposes the bulk binding.
func (*Admin) BootDashboard ¶
func (a *Admin) BootDashboard() boot.DashboardBinding
BootDashboard exposes the dashboard binding.
func (*Admin) BootFeatureOverrides ¶ added in v0.20.0
func (a *Admin) BootFeatureOverrides() boot.FeatureOverridesBinding
BootFeatureOverrides exposes the feature overrides binding.
func (*Admin) BootIcons ¶ added in v0.25.0
func (a *Admin) BootIcons() boot.IconsBinding
BootIcons exposes the icons binding for icon discovery and rendering.
func (*Admin) BootJobs ¶
func (a *Admin) BootJobs() boot.JobsBinding
BootJobs exposes the jobs binding.
func (*Admin) BootMedia ¶
func (a *Admin) BootMedia() boot.MediaBinding
BootMedia exposes the media binding.
func (*Admin) BootNavigation ¶
func (a *Admin) BootNavigation() boot.NavigationBinding
BootNavigation exposes the navigation binding.
func (*Admin) BootNotifications ¶
func (a *Admin) BootNotifications() boot.NotificationsBinding
BootNotifications exposes the notifications binding.
func (*Admin) BootSchemaRegistry ¶ added in v0.23.0
func (a *Admin) BootSchemaRegistry() boot.SchemaRegistryBinding
BootSchemaRegistry exposes schema registry bindings.
func (*Admin) BootSearch ¶
func (a *Admin) BootSearch() boot.SearchBinding
BootSearch exposes the search binding.
func (*Admin) BootSettings ¶
func (a *Admin) BootSettings() boot.SettingsBinding
BootSettings exposes the settings binding.
func (*Admin) BootTranslationExchange ¶ added in v0.25.0
func (a *Admin) BootTranslationExchange() boot.TranslationExchangeBinding
BootTranslationExchange exposes translation exchange bindings.
func (*Admin) BootTranslationFamilies ¶ added in v0.27.0
func (a *Admin) BootTranslationFamilies() boot.TranslationFamiliesBinding
BootTranslationFamilies exposes translation family list/detail bindings.
func (*Admin) BootTranslationQueue ¶ added in v0.25.0
func (a *Admin) BootTranslationQueue() boot.TranslationQueueBinding
BootTranslationQueue exposes translation queue aggregate bindings.
func (*Admin) BootUserImport ¶ added in v0.22.0
func (a *Admin) BootUserImport() boot.UserImportBinding
BootUserImport exposes the user import binding.
func (*Admin) BootWithContext ¶ added in v0.32.0
BootWithContext runs the admin boot pipeline with the given lifecycle context and steps. Nested lifecycle execution must pass the active lifecycle context explicitly.
func (*Admin) BootWorkflows ¶ added in v0.25.0
func (a *Admin) BootWorkflows() boot.WorkflowManagementBinding
BootWorkflows exposes persisted workflow management bindings.
func (*Admin) Bootstrap ¶
Bootstrap initializes CMS seed data (CMS container, admin menu, settings defaults).
func (*Admin) BuildSitePreviewURL ¶ added in v0.86.0
BuildSitePreviewURL applies this admin instance's external preview URL policy.
func (*Admin) BulkService ¶
func (a *Admin) BulkService() BulkService
BulkService exposes the bulk adapter.
func (*Admin) CloseCommandRunRuntime ¶ added in v0.121.3
CloseCommandRunRuntime is the explicit host cleanup path. Hosts should call it before closing injected transport drivers or routers.
func (*Admin) CloseNavigationContributions ¶ added in v0.90.0
func (a *Admin) CloseNavigationContributions() NavigationLifecycleReport
func (*Admin) CommandRunRuntime ¶ added in v0.121.3
func (a *Admin) CommandRunRuntime() *CommandRunRuntime
CommandRunRuntime returns the configured runtime for diagnostics, snapshots, and explicit host shutdown.
func (*Admin) Commands ¶
func (a *Admin) Commands() *CommandBus
Commands exposes the go-command registry hook.
func (*Admin) ConfigureTranslationSuggestionServiceDependencies ¶ added in v0.110.0
func (a *Admin) ConfigureTranslationSuggestionServiceDependencies(deps TranslationSuggestionServiceDependencies) *Admin
ConfigureTranslationSuggestionServiceDependencies records host-owned suggestion service dependencies and applies them to the current service.
func (*Admin) ContentService ¶ added in v0.24.0
func (a *Admin) ContentService() CMSContentService
ContentService exposes the configured CMS content service.
func (*Admin) ContentTypeService ¶ added in v0.24.0
func (a *Admin) ContentTypeService() CMSContentTypeService
ContentTypeService exposes the configured CMS content type service.
func (*Admin) DashboardService ¶
DashboardService exposes the dashboard orchestration.
func (*Admin) Debug ¶ added in v0.14.0
func (a *Admin) Debug() *DebugCollector
Debug exposes the debug collector when the module is enabled.
func (*Admin) DebugQueryHook ¶ added in v0.14.0
DebugQueryHook returns a Bun query hook for capturing SQL in the debug collector.
func (*Admin) DebugQueryHookOptions ¶ added in v0.14.0
func (a *Admin) DebugQueryHookOptions() []repository.Option
DebugQueryHookOptions returns repository options for wiring SQL capture hooks.
func (*Admin) DebugREPLSessionManager ¶ added in v0.16.0
func (a *Admin) DebugREPLSessionManager() *DebugREPLSessionManager
DebugREPLSessionManager exposes the REPL session lifecycle manager.
func (*Admin) DebugREPLSessions ¶ added in v0.16.0
func (a *Admin) DebugREPLSessions() DebugREPLSessionStore
DebugREPLSessions exposes the REPL session store.
func (*Admin) DebugUserSessions ¶ added in v0.24.0
func (a *Admin) DebugUserSessions() DebugUserSessionStore
DebugUserSessions exposes the debug user session store.
func (*Admin) DefaultLocale ¶
DefaultLocale exposes the configured default locale.
func (*Admin) DeploymentIdentity ¶ added in v0.122.0
func (a *Admin) DeploymentIdentity() DeploymentIdentity
DeploymentIdentity returns the immutable identity resolved for this Admin.
func (*Admin) DiagnoseNavigation ¶ added in v0.90.0
func (a *Admin) DiagnoseNavigation(ctx context.Context, opts NavigationDoctorOptions) (NavigationDoctorReport, error)
func (*Admin) DoctorChecks ¶ added in v0.25.0
func (a *Admin) DoctorChecks() []DoctorCheck
DoctorChecks returns a stable, sorted copy of registered doctor checks.
func (*Admin) EffectiveScope ¶ added in v0.83.0
func (a *Admin) EffectiveScope(ctx context.Context, input ScopeInput) EffectiveScope
EffectiveScope resolves trusted input, context actor scope, and configured single-tenant defaults into one scope value.
func (*Admin) EffectiveScopeFromRequest ¶ added in v0.83.0
func (a *Admin) EffectiveScopeFromRequest(c router.Context, input ScopeInput) EffectiveScope
EffectiveScopeFromRequest resolves scope from trusted request actor/claims plus optional trusted service input. Browser query parameters are ignored.
func (*Admin) EnforceDashboardAreas ¶
EnforceDashboardAreas toggles validation for unknown widget areas.
func (*Admin) EnhancedActionRuntimeOptions ¶ added in v0.86.0
func (a *Admin) EnhancedActionRuntimeOptions() EnhancedActionRuntimeOptions
func (*Admin) ErrorPresenter ¶ added in v0.122.0
func (a *Admin) ErrorPresenter() ErrorPresenter
ErrorPresenter returns the Admin-scoped presenter used by its registered request handlers and development error surfaces.
func (*Admin) ExportAPIAvailable ¶ added in v0.130.0
ExportAPIAvailable reports whether export routes were successfully registered by the boot pipeline.
func (*Admin) ExportHTTPRegistrar ¶
func (a *Admin) ExportHTTPRegistrar() ExportHTTPRegistrar
ExportHTTPRegistrar exposes the export HTTP registrar.
func (*Admin) ExportMetadataProvider ¶
func (a *Admin) ExportMetadataProvider() ExportMetadataProvider
ExportMetadataProvider exposes export metadata resolution.
func (*Admin) ExportRegistrar ¶
func (a *Admin) ExportRegistrar() boot.ExportRegistrar
ExportRegistrar exposes the export HTTP registrar.
func (*Admin) ExportRegistry ¶
func (a *Admin) ExportRegistry() ExportRegistry
ExportRegistry exposes the export definition registry.
func (*Admin) FeatureCatalog ¶ added in v0.22.0
FeatureCatalog exposes the configured feature catalog.
func (*Admin) FeatureGate ¶ added in v0.20.0
func (a *Admin) FeatureGate() fggate.FeatureGate
FeatureGate exposes the configured feature gate.
func (*Admin) FlushQueuedNavigationContributions ¶ added in v0.90.0
func (*Admin) FormTheme ¶ added in v0.126.0
func (a *Admin) FormTheme(ctx context.Context) *formrender.ThemeConfig
FormTheme resolves the request-scoped admin theme and projects it into the typed go-formgen contract. Callers receive defensive map copies and may safely customize the returned config for one render.
func (*Admin) HasAuthenticator ¶ added in v0.27.0
HasAuthenticator reports whether an authenticator is configured.
func (*Admin) IconService ¶ added in v0.25.0
func (a *Admin) IconService() *IconService
IconService returns the icon service for icon resolution and rendering.
func (*Admin) Initialize ¶
func (a *Admin) Initialize(r AdminRouter) error
Initialize attaches the router, bootstraps, and mounts base routes.
func (*Admin) InitializeWithContext ¶ added in v0.32.0
func (a *Admin) InitializeWithContext(ctx context.Context, r AdminRouter) error
InitializeWithContext attaches the router, bootstraps, and mounts base routes with a lifecycle context.
func (*Admin) LifecycleContext ¶ added in v0.32.0
LifecycleContext exposes the current boot lifecycle context to boot steps.
func (*Admin) LoggerProvider ¶ added in v0.25.0
func (a *Admin) LoggerProvider() LoggerProvider
LoggerProvider exposes the configured logger provider.
func (*Admin) MediaDeliveryURLs ¶ added in v0.62.0
func (a *Admin) MediaDeliveryURLs(id string) MediaDeliveryURLs
MediaDeliveryURLs resolves app-owned delivery URLs for an item ID.
func (*Admin) MediaLibrary ¶
func (a *Admin) MediaLibrary() MediaLibrary
MediaLibrary exposes the media library adapter.
func (*Admin) Menu ¶
func (a *Admin) Menu() *Navigation
Menu exposes the navigation resolver and fallback menu builder.
func (*Admin) MenuService ¶
func (a *Admin) MenuService() CMSMenuService
MenuService exposes the configured CMS menu service for host seeding.
func (*Admin) NamedLogger ¶ added in v0.25.0
NamedLogger resolves a named logger via the configured provider.
func (*Admin) NavMenuCode ¶
NavMenuCode returns the default navigation menu code.
func (*Admin) Navigation ¶
func (a *Admin) Navigation() *Navigation
Navigation returns the navigation resolver (alias for Menu).
func (*Admin) NavigationLifecycleReport ¶ added in v0.90.0
func (a *Admin) NavigationLifecycleReport() NavigationLifecycleReport
func (*Admin) NavigationPermissionRegistry ¶ added in v0.111.0
func (a *Admin) NavigationPermissionRegistry() *NavigationPermissionRegistry
func (*Admin) NotificationDeliveries ¶ added in v0.130.0
func (a *Admin) NotificationDeliveries() NotificationDeliveryInspector
NotificationDeliveries exposes privacy-safe delivery inspection.
func (*Admin) NotificationEvents ¶ added in v0.130.0
func (a *Admin) NotificationEvents() NotificationEventService
NotificationEvents exposes typed notification dispatch and recovery.
func (*Admin) NotificationReceipts ¶ added in v0.130.0
func (a *Admin) NotificationReceipts() NotificationReceiptService
NotificationReceipts exposes side-effect-free idempotent receipt lookup.
func (*Admin) NotificationRetention ¶ added in v0.130.0
func (a *Admin) NotificationRetention() NotificationRetentionService
NotificationRetention exposes one bounded retention purge pass.
func (*Admin) NotificationService ¶
func (a *Admin) NotificationService() NotificationService
NotificationService returns the inbox service.
func (*Admin) NotificationsWidget ¶
NotificationsWidget registers the notifications widget provider.
func (*Admin) OrganizationService ¶
func (a *Admin) OrganizationService() *OrganizationService
OrganizationService exposes the organization management service.
func (*Admin) Panel ¶
func (a *Admin) Panel(_ string) *PanelBuilder
Panel returns a panel builder pre-wired with the command registry. The caller configures fields/actions/hooks and registers the panel via RegisterPanel.
func (*Admin) PanelAPIAvailable ¶ added in v0.126.6
PanelAPIAvailable reports whether the boot pipeline successfully registered API routes for the named panel.
func (*Admin) PreferencesAPIAvailable ¶ added in v0.126.4
PreferencesAPIAvailable reports whether the Preferences service is enabled and its panel routes were successfully mounted.
func (*Admin) PreferencesAPICapabilities ¶ added in v0.126.6
func (a *Admin) PreferencesAPICapabilities(ctx context.Context) PreferencesAPICapabilities
PreferencesAPICapabilities returns request-scoped Preferences API capabilities using the same configured permissions as the Preferences panel.
func (*Admin) PreferencesAPIRequestCapabilities ¶ added in v0.126.6
PreferencesAPIRequestCapabilities is a compatibility-friendly projection for consumers that need request-scoped read/write booleans without sharing the capability struct type.
func (*Admin) PreferencesService ¶
func (a *Admin) PreferencesService() *PreferencesService
PreferencesService exposes the user preferences service.
func (*Admin) Prepare ¶
Prepare runs the pre-route initialization pipeline (bootstrap, module loading).
func (*Admin) Preview ¶ added in v0.22.0
func (a *Admin) Preview() *PreviewService
Preview returns the preview service.
func (*Admin) PreviewURLAllowedHosts ¶ added in v0.86.0
PreviewURLAllowedHosts returns the normalized external preview URL host allowlist.
func (*Admin) ProfileService ¶
func (a *Admin) ProfileService() *ProfileService
ProfileService exposes the user profile service.
func (*Admin) ProtectedRouter ¶ added in v0.25.0
func (a *Admin) ProtectedRouter() AdminRouter
ProtectedRouter exposes the admin router wrapped with auth middleware when configured.
func (*Admin) PublicRouter ¶ added in v0.14.0
func (a *Admin) PublicRouter() AdminRouter
PublicRouter exposes the configured admin router for module route registration.
func (*Admin) PublishCommandStatus ¶ added in v0.99.0
func (a *Admin) PublishCommandStatus(event CommandStatusEvent)
PublishCommandStatus broadcasts a command status transition to connected debug clients over the debug WebSocket. The command launcher publishes dispatch-time states automatically; queue/async workers can call this when a queued command finishes so the launcher result panel updates live without a refresh.
func (*Admin) PublishCommandStatusContext ¶ added in v0.121.3
func (a *Admin) PublishCommandStatusContext(ctx context.Context, event CommandStatusEvent)
PublishCommandStatusContext preserves the legacy command_status surface and, when possible, forwards the transition through the canonical command-run runtime so snapshots and live rows converge on the same projection.
func (*Admin) RPCServer ¶ added in v0.27.0
RPCServer exposes the command RPC server bound to this admin instance.
func (*Admin) ReconcileDynamicCMS ¶ added in v0.36.0
ReconcileDynamicCMS synchronizes dynamic CMS-backed panels with the current content type snapshot after modules have been loaded.
func (*Admin) RefreshRoutingReport ¶ added in v0.36.0
func (a *Admin) RefreshRoutingReport() routing.StartupReport
RefreshRoutingReport recomputes the cached routing report after planner mutations.
func (*Admin) RegisterCMSDemoPanels ¶
RegisterCMSDemoPanels seeds CMS-backed panels (content/tree/blocks/widgets/menus) using the configured CMS services. It provides tree/blocks/SEO metadata needed for the CMS management UI and demo block editor routes.
func (*Admin) RegisterDashboardProviders ¶
RegisterDashboardProviders registers built-in dashboard providers.
func (*Admin) RegisterDoctorChecks ¶ added in v0.25.0
func (a *Admin) RegisterDoctorChecks(checks ...DoctorCheck) *Admin
RegisterDoctorChecks registers checks used by RunDoctor and the doctor debug panel.
func (*Admin) RegisterMediaDeliveryAdapter ¶ added in v0.62.0
func (a *Admin) RegisterMediaDeliveryAdapter(provider string, adapter MediaDeliveryAdapter) error
RegisterMediaDeliveryAdapter registers a provider delivery adapter and reports invalid input.
func (*Admin) RegisterModule ¶
RegisterModule registers a pluggable module before initialization. Duplicate IDs are rejected to preserve ordering and idempotency.
func (*Admin) RegisterNavigationPermissions ¶ added in v0.111.0
func (a *Admin) RegisterNavigationPermissions(declarations ...NavigationPermissionDeclaration) *Admin
func (*Admin) RegisterPanel ¶
func (a *Admin) RegisterPanel(name string, builder *PanelBuilder) (*Panel, error)
RegisterPanel registers a built panel with the admin.
func (*Admin) RegisterPanelTab ¶ added in v0.2.0
RegisterPanelTab attaches a tab to an existing or future panel.
func (*Admin) RegisterPublicAPI ¶ added in v0.22.0
func (a *Admin) RegisterPublicAPI(r AdminRouter)
RegisterPublicAPI registers read-only endpoints for content delivery.
func (*Admin) RegisterWidgetArea ¶
func (a *Admin) RegisterWidgetArea(def WidgetAreaDefinition)
RegisterWidgetArea registers an additional dashboard widget area.
func (*Admin) RegisterWidgetAreas ¶
RegisterWidgetAreas registers default dashboard widget areas.
func (*Admin) RegisterWidgetDefinitions ¶
RegisterWidgetDefinitions registers default widget definitions.
func (*Admin) RemovePreviewURLAllowedHost ¶ added in v0.86.0
RemovePreviewURLAllowedHost removes a host or URL host from the external preview URL allowlist.
func (*Admin) ResolveLocaleFromRequest ¶ added in v0.27.0
ResolveLocaleFromRequest resolves the effective request locale using explicit query parameters first and Accept-Language against the active CMS locale catalog when one is available.
func (*Admin) ResolvePanelExportConfig ¶ added in v0.130.0
func (a *Admin) ResolvePanelExportConfig(ctx context.Context, definition, variant string) *ExportConfig
ResolvePanelExportConfig returns usable export metadata for a panel list. Unknown variants fall back to the base definition. Registry errors fail closed and are logged so view/schema rendering does not advertise a broken operation.
func (*Admin) ResolvePanelTabs ¶ added in v0.24.0
func (a *Admin) ResolvePanelTabs(ctx AdminContext, panelName string) ([]PanelTab, error)
ResolvePanelTabs returns the effective tabs for a panel using the provided admin context.
func (*Admin) ResolvePanelTabsFromRequest ¶ added in v0.24.0
func (a *Admin) ResolvePanelTabsFromRequest(c router.Context, panelName, locale string) ([]PanelTab, error)
ResolvePanelTabsFromRequest resolves panel tabs using request-derived context and permissions.
func (*Admin) RoutingPlanner ¶ added in v0.27.0
RoutingPlanner exposes the current routing planner.
func (*Admin) RoutingReport ¶ added in v0.27.0
func (a *Admin) RoutingReport() routing.StartupReport
RoutingReport exposes the current routing diagnostics snapshot.
func (*Admin) RunDoctor ¶ added in v0.25.0
func (a *Admin) RunDoctor(ctx context.Context) DoctorReport
RunDoctor executes registered checks and returns a full diagnostics report.
func (*Admin) RunDoctorAction ¶ added in v0.25.0
func (a *Admin) RunDoctorAction(ctx context.Context, checkID string, input map[string]any) (DoctorActionExecution, error)
RunDoctorAction executes a check action when configured and runnable.
func (*Admin) ScopeDefaults ¶ added in v0.27.0
func (a *Admin) ScopeDefaults() AuthenticatedRequestScopeDefaults
ScopeDefaults returns the admin single-tenant scope defaults when enabled.
func (*Admin) ScopePolicy ¶ added in v0.83.0
func (a *Admin) ScopePolicy() ScopePolicy
ScopePolicy returns the configured go-admin scope policy.
func (*Admin) SearchService ¶
func (a *Admin) SearchService() *SearchEngine
SearchService exposes the search engine.
func (*Admin) SetPreviewURLAllowedHosts ¶ added in v0.86.0
SetPreviewURLAllowedHosts replaces the external preview URL host allowlist at runtime.
func (*Admin) SettingsService ¶
func (a *Admin) SettingsService() *SettingsService
SettingsService exposes the settings resolver.
func (*Admin) SettingsWidget ¶
SettingsWidget registers the settings widget provider.
func (*Admin) StartCommandRunRuntime ¶ added in v0.121.3
func (a *Admin) StartCommandRunRuntime(ctx context.Context, config CommandRunRuntimeConfig) error
StartCommandRunRuntime constructs and starts the command-run runtime once. Hosts must start injected drivers before calling this method.
func (*Admin) StructuralPartials ¶ added in v0.131.10
func (a *Admin) StructuralPartials(ctx context.Context) AdminStructuralPartials
StructuralPartials resolves the bounded admin structural registry. Without a filesystem-aware lookup, raw manifest metadata is deliberately ignored.
func (*Admin) TenantService ¶
func (a *Admin) TenantService() *TenantService
TenantService exposes the tenant management service.
func (*Admin) ThemePayload ¶
func (*Admin) TranslationActorOptionProvider ¶ added in v0.113.6
func (a *Admin) TranslationActorOptionProvider() TranslationActorOptionProvider
TranslationActorOptionProvider exposes the configured actor option provider.
func (*Admin) TranslationSuggestionService ¶ added in v0.110.0
func (a *Admin) TranslationSuggestionService() TranslationSuggestionService
TranslationSuggestionService exposes the optional translation suggestion service.
func (*Admin) Translator ¶ added in v0.52.0
func (a *Admin) Translator() Translator
Translator returns the configured i18n translator, if any.
func (*Admin) UnregisterPanel ¶ added in v0.23.0
UnregisterPanel removes a previously registered panel.
func (*Admin) UseCMS ¶
func (a *Admin) UseCMS(container CMSContainer) *Admin
UseCMS overrides the default CMS container (menu/widget services). Call before Initialize to wire a real go-cms container.
func (*Admin) UserImportAllowed ¶ added in v0.25.0
UserImportAllowed reports whether the current actor can access users import.
func (*Admin) UserImportEnabled ¶ added in v0.25.0
UserImportEnabled reports whether the users bulk-import backend is wired.
func (*Admin) UserService ¶
func (a *Admin) UserService() *UserManagementService
UserService exposes the user and role management service.
func (*Admin) ValidateNavigationPolicy ¶ added in v0.111.0
func (a *Admin) ValidateNavigationPolicy(roles []RoleRecord) PermissionPolicyReport
func (*Admin) WidgetAreas ¶
func (a *Admin) WidgetAreas() []WidgetAreaDefinition
WidgetAreas returns known dashboard widget areas.
func (*Admin) WithActivitySink ¶
func (a *Admin) WithActivitySink(sink ActivitySink) *Admin
WithActivitySink injects a shared activity sink (go-users compatible via adapter).
func (*Admin) WithAdminStructuralDiagnosticSink ¶ added in v0.131.10
func (a *Admin) WithAdminStructuralDiagnosticSink(sink AdminStructuralDiagnosticSink) *Admin
WithAdminStructuralDiagnosticSink installs an optional safe diagnostic sink.
func (*Admin) WithAdminTemplateLookup ¶ added in v0.131.10
func (a *Admin) WithAdminTemplateLookup(lookup AdminTemplateLookup) *Admin
WithAdminTemplateLookup installs the configuration-time availability lookup used by StructuralPartials. Replacing it while serving is unsupported.
func (*Admin) WithAdminTheme ¶ added in v0.36.0
func (a *Admin) WithAdminTheme(selector gotheme.ThemeSelector) *Admin
WithAdminTheme wires a go-theme selector so CMS templates, dashboard widgets, and forms share the admin selection.
func (*Admin) WithAuth ¶
func (a *Admin) WithAuth(auth Authenticator, cfg *AuthConfig) *Admin
WithAuth attaches an authenticator for route protection.
func (*Admin) WithAuthorizer ¶
func (a *Admin) WithAuthorizer(authz Authorizer) *Admin
WithAuthorizer sets an authorizer for panel permissions.
func (*Admin) WithCMSWorkflowActions ¶ added in v0.24.0
WithCMSWorkflowActions overrides the default CMS workflow actions for demo panels.
func (*Admin) WithCMSWorkflowDefaults ¶ added in v0.24.0
WithCMSWorkflowDefaults enables registering default CMS workflows on a custom engine that can report existing definitions.
func (*Admin) WithEnhancedActionNegotiation ¶ added in v0.86.0
func (a *Admin) WithEnhancedActionNegotiation(cfg EnhancedActionNegotiationConfig) *Admin
WithEnhancedActionNegotiation configures how enhanced SSR mutation requests are detected and which media type enhanced responses emit.
func (*Admin) WithMediaDeliveryAdapter ¶ added in v0.62.0
func (a *Admin) WithMediaDeliveryAdapter(provider string, adapter MediaDeliveryAdapter) *Admin
WithMediaDeliveryAdapter registers a provider delivery adapter.
func (*Admin) WithMediaDeliveryConfig ¶ added in v0.62.0
func (a *Admin) WithMediaDeliveryConfig(cfg MediaDeliveryConfig) *Admin
WithMediaDeliveryConfig configures media delivery route exposure before initialization.
func (*Admin) WithMediaDeliveryCredentialResolver ¶ added in v0.62.0
func (a *Admin) WithMediaDeliveryCredentialResolver(resolver MediaDeliveryCredentialResolver) *Admin
WithMediaDeliveryCredentialResolver configures provider credential resolution.
func (*Admin) WithMediaDeliveryReferenceProjector ¶ added in v0.62.0
func (a *Admin) WithMediaDeliveryReferenceProjector(projector MediaDeliveryReferenceProjector) *Admin
WithMediaDeliveryReferenceProjector replaces the item-to-delivery-reference projector.
func (*Admin) WithMediaDeliveryRegistry ¶ added in v0.62.0
func (a *Admin) WithMediaDeliveryRegistry(registry *MediaDeliveryRegistry) *Admin
WithMediaDeliveryRegistry replaces the provider delivery adapter registry.
func (*Admin) WithMediaLibrary ¶ added in v0.61.0
func (a *Admin) WithMediaLibrary(lib MediaLibrary) *Admin
WithMediaLibrary overrides the media library used by media module routes.
func (*Admin) WithModuleStartupPolicy ¶ added in v0.25.0
func (a *Admin) WithModuleStartupPolicy(policy ModuleStartupPolicy) *Admin
WithModuleStartupPolicy configures how module startup validation errors are handled.
func (*Admin) WithNavigationContributionPolicy ¶ added in v0.90.0
func (a *Admin) WithNavigationContributionPolicy(policy NavigationContributionPolicy) *Admin
func (*Admin) WithNavigationRouteMissingPolicy ¶ added in v0.90.0
func (a *Admin) WithNavigationRouteMissingPolicy(policy NavigationRouteMissingPolicy) *Admin
func (*Admin) WithOrganizationManagement ¶
func (a *Admin) WithOrganizationManagement(repo OrganizationRepository) *Admin
WithOrganizationManagement overrides the organization repository.
func (*Admin) WithPanelTabCollisionHandler ¶ added in v0.2.0
func (a *Admin) WithPanelTabCollisionHandler(fn PanelTabCollisionHandler) *Admin
WithPanelTabCollisionHandler sets a collision handler for tab registrations.
func (*Admin) WithPanelTabPermissionEvaluator ¶ added in v0.2.0
func (a *Admin) WithPanelTabPermissionEvaluator(fn PanelTabPermissionEvaluator) *Admin
WithPanelTabPermissionEvaluator sets a custom permission evaluator for tabs.
func (*Admin) WithPreviewURLAllowedHosts ¶ added in v0.86.0
WithPreviewURLAllowedHosts replaces the external preview URL host allowlist. Relative preview paths do not require allowlisting.
func (*Admin) WithRoleAssignmentLookup ¶ added in v0.2.0
func (a *Admin) WithRoleAssignmentLookup(lookup RoleAssignmentLookup) *Admin
WithRoleAssignmentLookup sets the lookup used to validate custom role assignments.
func (*Admin) WithTenantManagement ¶
func (a *Admin) WithTenantManagement(repo TenantRepository) *Admin
WithTenantManagement overrides the tenant repository (go-users adapters or custom stores).
func (*Admin) WithThemeManifest ¶ added in v0.24.0
WithThemeManifest wires the active go-theme manifest for runtime variant reconciliation and downstream UI option building.
func (*Admin) WithThemeProvider ¶
func (a *Admin) WithThemeProvider(provider ThemeProvider) *Admin
WithThemeProvider wires a theme selector/registry to downstream renderers.
func (*Admin) WithTraitWorkflowDefaults ¶ added in v0.25.0
WithTraitWorkflowDefaults sets default workflow IDs by panel trait.
func (*Admin) WithTranslationActorOptionProvider ¶ added in v0.113.6
func (a *Admin) WithTranslationActorOptionProvider(provider TranslationActorOptionProvider) *Admin
WithTranslationActorOptionProvider wires host-owned assignee/reviewer option lookup.
func (*Admin) WithTranslationExchangeRuntime ¶ added in v0.27.0
func (a *Admin) WithTranslationExchangeRuntime(runtime *TranslationExchangeRuntime) *Admin
WithTranslationExchangeRuntime wires the exchange job runtime used by transport bindings.
func (*Admin) WithTranslationFamilyStore ¶ added in v0.27.0
func (a *Admin) WithTranslationFamilyStore(store translationservices.FamilyStore) *Admin
WithTranslationFamilyStore wires the canonical translation family store used by family bindings.
func (*Admin) WithTranslationPolicy ¶ added in v0.24.0
func (a *Admin) WithTranslationPolicy(policy TranslationPolicy) *Admin
WithTranslationPolicy attaches a translation policy used during workflow transitions.
func (*Admin) WithTranslationSuggestionService ¶ added in v0.110.0
func (a *Admin) WithTranslationSuggestionService(service TranslationSuggestionService) *Admin
WithTranslationSuggestionService wires optional translation suggestion generation.
func (*Admin) WithTranslator ¶
func (a *Admin) WithTranslator(t Translator) *Admin
WithTranslator wires an i18n translator for modules and UI surfaces.
func (*Admin) WithUserManagement ¶
func (a *Admin) WithUserManagement(users UserRepository, roles RoleRepository) *Admin
WithUserManagement overrides the user and role repositories (go-users adapters or custom stores).
func (*Admin) WithWorkflow ¶ added in v0.22.0
func (a *Admin) WithWorkflow(w WorkflowEngine) *Admin
WithWorkflow attaches a workflow engine to the admin orchestrator.
func (*Admin) WithWorkflowRuntime ¶ added in v0.25.0
func (a *Admin) WithWorkflowRuntime(runtime WorkflowRuntime) *Admin
WithWorkflowRuntime wires persisted workflow definitions/bindings.
type AdminActivityEnricherConfig ¶ added in v0.22.0
type AdminActivityEnricherConfig struct {
ActorResolver usersactivity.ActorResolver `json:"actor_resolver"`
ObjectResolver usersactivity.ObjectResolver `json:"object_resolver"`
EnricherVersion string `json:"enricher_version"`
Now func() time.Time `json:"now"`
}
AdminActivityEnricherConfig wires the actor/object resolvers for activity enrichment.
type AdminActorResolver ¶ added in v0.22.0
type AdminActorResolver struct {
Users UserRepository `json:"users"`
BatchUsers ActivityUserBatchReader `json:"batch_users"`
Profiles ProfileStore `json:"profiles"`
}
AdminActorResolver enriches actor details using admin user sources.
func (AdminActorResolver) ResolveActors ¶ added in v0.22.0
func (r AdminActorResolver) ResolveActors(ctx context.Context, ids []uuid.UUID, meta usersactivity.ResolveContext) (map[uuid.UUID]usersactivity.ActorInfo, error)
ResolveActors resolves actor details in batch.
type AdminBlockReadService ¶ added in v0.32.0
type AdminBlockReadService interface {
ListDefinitions(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
GetDefinition(ctx context.Context, id string) (map[string]any, error)
ListBlocks(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
GetBlock(ctx context.Context, id string) (map[string]any, error)
}
AdminBlockReadService provides admin-shaped read operations for CMS blocks and block definitions.
func NewAdminBlockReadService ¶ added in v0.32.0
func NewAdminBlockReadService(content CMSContentService, types ...CMSContentTypeService) AdminBlockReadService
NewAdminBlockReadService builds the local admin block read-service boundary.
type AdminBlockWriteService ¶ added in v0.32.0
type AdminBlockWriteService interface {
CreateDefinition(ctx context.Context, record map[string]any) (map[string]any, error)
UpdateDefinition(ctx context.Context, id string, record map[string]any) (map[string]any, error)
DeleteDefinition(ctx context.Context, id string) error
CreateBlock(ctx context.Context, record map[string]any) (map[string]any, error)
UpdateBlock(ctx context.Context, id string, record map[string]any) (map[string]any, error)
DeleteBlock(ctx context.Context, id string) error
}
AdminBlockWriteService provides admin-shaped write operations for CMS blocks and block definitions.
func NewAdminBlockWriteService ¶ added in v0.32.0
func NewAdminBlockWriteService(content CMSContentService) AdminBlockWriteService
NewAdminBlockWriteService builds the local admin block write-service boundary.
type AdminChromeState ¶ added in v0.34.0
type AdminChromeState struct {
Page AdminPageChrome `json:"page"`
Title string `json:"title,omitempty"`
PageHeader AdminPageHeader `json:"page_header"`
BasePath string `json:"base_path,omitempty"`
AssetBasePath string `json:"asset_base_path,omitempty"`
APIBasePath string `json:"api_base_path,omitempty"`
BodyClasses string `json:"body_classes,omitempty"`
Active string `json:"active,omitempty"`
SessionUser map[string]any `json:"session_user,omitempty"`
Theme map[string]map[string]string `json:"theme,omitempty"`
ExternalAssets map[string]string `json:"external_assets,omitempty"`
CSRFTemplateHelpers map[string]string `json:"csrf_template_helpers,omitempty"`
SidebarHideSearch bool `json:"sidebar_hide_search,omitempty"`
SidebarCollapsePlacement SidebarCollapsePlacement `json:"sidebar_collapse_placement,omitempty"`
SidebarHidePresence bool `json:"sidebar_hide_presence,omitempty"`
SidebarHideUserMenuIndicator bool `json:"sidebar_hide_user_menu_indicator,omitempty"`
TranslationCapabilities map[string]any `json:"translation_capabilities,omitempty"`
UsersImportAvailable bool `json:"users_import_available,omitempty"`
UsersImportEnabled bool `json:"users_import_enabled,omitempty"`
AdminPartials AdminStructuralPartials `json:"admin_partials"`
}
AdminChromeState captures host chrome metadata needed by go-admin templates.
func (AdminChromeState) Empty ¶ added in v0.34.0
func (state AdminChromeState) Empty() bool
type AdminContentReadService ¶ added in v0.32.0
type AdminContentReadService interface {
List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
Get(ctx context.Context, id string) (map[string]any, error)
ListForContentType(ctx context.Context, contentType CMSContentType, opts ListOptions) ([]map[string]any, int, error)
GetForContentType(ctx context.Context, contentType CMSContentType, id string) (map[string]any, error)
}
AdminContentReadService provides admin-shaped read operations for CMS content.
func NewAdminContentReadService ¶ added in v0.32.0
func NewAdminContentReadService(content CMSContentService, contentTypes ...CMSContentTypeService) AdminContentReadService
NewAdminContentReadService builds the local admin content read-service boundary.
func NewAdminContentReadServiceWithEntryNavigationOptions ¶ added in v0.111.0
func NewAdminContentReadServiceWithEntryNavigationOptions(content CMSContentService, options EntryNavigationOptions, contentTypes ...CMSContentTypeService) AdminContentReadService
NewAdminContentReadServiceWithEntryNavigationOptions builds the admin read boundary using the final merged entry-navigation policy.
type AdminContentWriteService ¶ added in v0.32.0
type AdminContentWriteService interface {
Create(ctx context.Context, record map[string]any) (map[string]any, error)
Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
Delete(ctx context.Context, id string) error
CreateTranslation(ctx context.Context, input TranslationCreateInput) (map[string]any, error)
CreateForContentType(ctx context.Context, contentType CMSContentType, record map[string]any) (map[string]any, error)
UpdateForContentType(ctx context.Context, contentType CMSContentType, id string, record map[string]any) (map[string]any, error)
DeleteForContentType(ctx context.Context, contentType CMSContentType, id string) error
CreateTranslationForContentType(ctx context.Context, contentType CMSContentType, input TranslationCreateInput) (map[string]any, error)
}
AdminContentWriteService provides admin-shaped write operations for CMS content.
func NewAdminContentWriteService ¶ added in v0.32.0
func NewAdminContentWriteService(content CMSContentService, contentTypes ...CMSContentTypeService) AdminContentWriteService
NewAdminContentWriteService builds the local admin content write-service boundary.
func NewAdminContentWriteServiceWithEntryNavigationOptions ¶ added in v0.111.0
func NewAdminContentWriteServiceWithEntryNavigationOptions(content CMSContentService, options EntryNavigationOptions, contentTypes ...CMSContentTypeService) AdminContentWriteService
NewAdminContentWriteServiceWithEntryNavigationOptions builds the admin write boundary using the final merged entry-navigation policy.
type AdminContext ¶
type AdminContext struct {
Context context.Context `json:"context"`
UserID string `json:"user_id"`
TenantID string `json:"tenant_id"`
OrgID string `json:"org_id"`
Channel string `json:"channel"`
Environment string `json:"environment"`
Locale string `json:"locale"`
FallbackLocales []string `json:"fallback_locales,omitempty"`
Theme *ThemeSelection `json:"theme"`
Translator Translator `json:"translator"`
}
AdminContext carries request-scoped information into panel operations.
type AdminDashboardPage ¶ added in v0.34.0
type AdminDashboardPage struct {
Dashboard dashcmp.Page `json:"dashboard"`
Chrome AdminChromeState `json:"chrome"`
}
AdminDashboardPage is the route/template-edge wrapper around the canonical typed go-dashboard page.
func ComposeAdminDashboardPage ¶ added in v0.34.0
func ComposeAdminDashboardPage(page dashcmp.Page) AdminDashboardPage
ComposeAdminDashboardPage rebuilds the typed admin route wrapper from the raw go-dashboard page. Route/page decoration stores host chrome in page metadata so renderers can reconstruct it without reintroducing payload-map mutation.
func (AdminDashboardPage) LayoutJSON ¶ added in v0.34.0
func (page AdminDashboardPage) LayoutJSON() string
LayoutJSON derives the dashboard state JSON from the canonical typed page.
func (AdminDashboardPage) PageChrome ¶ added in v0.132.0
func (page AdminDashboardPage) PageChrome() AdminPageChrome
PageChrome returns the normalized presentation projection used by dashboard templates. The typed page wins, followed by compatibility page-header/title fields, the go-dashboard page title, and finally the Dashboard default.
func (AdminDashboardPage) Title ¶ added in v0.34.0
func (page AdminDashboardPage) Title() string
Title returns the preferred page title after host composition.
type AdminMenuBindingRecord ¶ added in v0.26.0
type AdminMenuBindingRecord struct {
ID string `json:"id"`
Location string `json:"location"`
MenuCode string `json:"menu_code"`
ViewProfileCode string `json:"view_profile_code,omitempty"`
Locale string `json:"locale,omitempty"`
Priority int `json:"priority"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PublishedAt *time.Time `json:"published_at,omitempty"`
}
AdminMenuBindingRecord describes a menu location binding record.
type AdminMenuContracts ¶ added in v0.26.0
type AdminMenuContracts struct {
Endpoints map[string]string `json:"endpoints"`
ErrorCode map[string]string `json:"error_codes"`
}
AdminMenuContracts exposes endpoint metadata and machine-readable menu error mapping.
type AdminMenuPreviewSimulation ¶ added in v0.26.0
type AdminMenuPreviewSimulation struct {
RequestedID string `json:"requested_id"`
Location string `json:"location,omitempty"`
Locale string `json:"locale,omitempty"`
ViewProfile string `json:"view_profile,omitempty"`
IncludeDrafts bool `json:"include_drafts"`
PreviewTokenPresent bool `json:"preview_token_present"`
Binding *AdminMenuBindingRecord `json:"binding,omitempty"`
Profile *AdminMenuViewProfileRecord `json:"profile,omitempty"`
}
AdminMenuPreviewSimulation captures preview-specific location/profile context.
type AdminMenuRecord ¶ added in v0.26.0
type AdminMenuRecord struct {
ID string `json:"id"`
Code string `json:"code"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Status string `json:"status"`
Locale string `json:"locale,omitempty"`
FamilyID string `json:"family_id,omitempty"`
Archived bool `json:"archived,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PublishedAt *time.Time `json:"published_at,omitempty"`
ArchivedAt *time.Time `json:"archived_at,omitempty"`
}
AdminMenuRecord is the normalized menu contract used by admin menu builder APIs.
type AdminMenuViewProfileRecord ¶ added in v0.26.0
type AdminMenuViewProfileRecord struct {
Code string `json:"code"`
Name string `json:"name"`
Mode string `json:"mode"`
MaxTopLevel *int `json:"max_top_level,omitempty"`
MaxDepth *int `json:"max_depth,omitempty"`
IncludeItemIDs []string `json:"include_item_ids,omitempty"`
ExcludeItemIDs []string `json:"exclude_item_ids,omitempty"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PublishedAt *time.Time `json:"published_at,omitempty"`
}
AdminMenuViewProfileRecord describes a menu projection profile record.
type AdminObjectResolverConfig ¶ added in v0.22.0
type AdminObjectResolverConfig struct {
Users UserRepository `json:"users"`
Roles RoleRepository `json:"roles"`
Tenants TenantRepository `json:"tenants"`
Organizations OrganizationRepository `json:"organizations"`
Profiles ProfileStore `json:"profiles"`
Settings *SettingsService `json:"settings"`
Jobs *JobRegistry `json:"jobs"`
Widgets CMSWidgetService `json:"widgets"`
Menus CMSMenuService `json:"menus"`
Content CMSContentService `json:"content"`
Fallback usersactivity.ObjectResolver `json:"fallback"`
}
AdminObjectResolverConfig wires admin object resolvers.
type AdminPageChrome ¶ added in v0.132.0
type AdminPageChrome struct {
Header AdminPageHeader `json:"header"`
Active string `json:"active,omitempty"`
BodyClasses string `json:"body_classes,omitempty"`
}
AdminPageChrome is the presentation-only page contract used by authenticated route authors. Request/session/theme state is added by the layout enrichment boundary, while arbitrary action markup remains template-owned.
func (AdminPageChrome) Clone ¶ added in v0.132.0
func (chrome AdminPageChrome) Clone() AdminPageChrome
Clone returns an independent page-chrome value suitable for request storage.
func (AdminPageChrome) Empty ¶ added in v0.132.0
func (chrome AdminPageChrome) Empty() bool
Empty reports whether no page presentation has been supplied.
func (AdminPageChrome) TemplateContext ¶ added in v0.132.0
func (chrome AdminPageChrome) TemplateContext() map[string]any
TemplateContext returns the lowercase, presentation-only projection consumed by authenticated templates. Values are cloned and hook identifiers are normalized once so normal and dashboard renderers share identical behavior.
type AdminPageGetOptions ¶ added in v0.24.0
type AdminPageGetOptions struct {
Locale string `json:"locale"`
FallbackLocale string `json:"fallback_locale"`
AllowMissingTranslations bool `json:"allow_missing_translations"`
IncludeContent bool `json:"include_content"`
IncludeBlocks bool `json:"include_blocks"`
IncludeData bool `json:"include_data"`
EnvironmentKey string `json:"environment_key"`
}
AdminPageGetOptions configures admin page detail reads.
type AdminPageHeader ¶ added in v0.131.10
type AdminPageHeader struct {
Title string `json:"title,omitempty"`
Pretitle string `json:"pretitle,omitempty"`
Subtitle string `json:"subtitle,omitempty"`
Breadcrumbs []AdminPageHeaderBreadcrumb `json:"breadcrumbs,omitempty"`
HideHeader bool `json:"hide_header,omitempty"`
HideBreadcrumbs bool `json:"hide_breadcrumbs,omitempty"`
Hooks map[string]string `json:"hooks,omitempty"`
}
AdminPageHeader is the presentation-only model for handlers that need a typed page-header boundary. Action markup remains template-owned.
type AdminPageHeaderBreadcrumb ¶ added in v0.131.10
type AdminPageHeaderBreadcrumb struct {
Label string `json:"label"`
Href string `json:"href,omitempty"`
Current bool `json:"current,omitempty"`
}
AdminPageHeaderBreadcrumb is already-resolved breadcrumb presentation data.
type AdminPageListOptions ¶ added in v0.24.0
type AdminPageListOptions struct {
Locale string `json:"locale"`
FallbackLocale string `json:"fallback_locale"`
AllowMissingTranslations bool `json:"allow_missing_translations"`
ExpandTranslationFamilies bool `json:"expand_translation_families"`
IncludeContent bool `json:"include_content"`
IncludeBlocks bool `json:"include_blocks"`
IncludeData bool `json:"include_data"`
EnvironmentKey string `json:"environment_key"`
Page int `json:"page"`
PerPage int `json:"per_page"`
SortBy string `json:"sort_by"`
SortDesc bool `json:"sort_desc"`
Search string `json:"search"`
Filters map[string]any `json:"filters"`
}
AdminPageListOptions configures admin page list reads.
type AdminPageReadService ¶ added in v0.24.0
type AdminPageReadService interface {
List(ctx context.Context, opts AdminPageListOptions) ([]AdminPageRecord, int, error)
Get(ctx context.Context, id string, opts AdminPageGetOptions) (*AdminPageRecord, error)
}
AdminPageReadService provides list/detail admin read operations.
func NewGoCMSAdminPageReadAdapter ¶ added in v0.24.0
func NewGoCMSAdminPageReadAdapter(service cms.AdminPageReadService) AdminPageReadService
NewGoCMSAdminPageReadAdapter wraps a go-cms admin read service.
func NewGoCMSAdminPageReadAdapterWithContent ¶ added in v0.43.0
func NewGoCMSAdminPageReadAdapterWithContent(service cms.AdminPageReadService, content CMSContentService) AdminPageReadService
NewGoCMSAdminPageReadAdapterWithContent wraps a go-cms admin read service and optional CMS content service. When sibling-expanded translation families are requested, the content service is used to emit one page record per locale sibling.
type AdminPageRecord ¶ added in v0.24.0
type AdminPageRecord struct {
ID string `json:"id"`
ContentID string `json:"content_id"`
FamilyID string `json:"family_id"`
RouteKey string `json:"route_key"`
TemplateID string `json:"template_id"`
Title string `json:"title"`
Slug string `json:"slug"`
Path string `json:"path"`
RequestedLocale string `json:"requested_locale"`
ResolvedLocale string `json:"resolved_locale"`
Translation TranslationBundle[PageTranslation] `json:"translation"`
ContentTranslation TranslationBundle[ContentTranslation] `json:"content_translation"`
Status string `json:"status"`
ParentID string `json:"parent_id"`
MetaTitle string `json:"meta_title"`
MetaDescription string `json:"meta_description"`
Summary *string `json:"summary"`
Tags []string `json:"tags"`
SchemaVersion string `json:"schema_version"`
Data map[string]any `json:"data"`
Content any `json:"content"`
Blocks any `json:"blocks"`
PreviewURL string `json:"preview_url"`
PublishedAt *time.Time `json:"published_at"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
}
AdminPageRecord mirrors the admin read model contract for page data.
type AdminPageWriteService ¶ added in v0.24.0
type AdminPageWriteService interface {
Create(ctx context.Context, payload map[string]any) (*AdminPageRecord, error)
Update(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
Delete(ctx context.Context, id string) error
Publish(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
Unpublish(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
}
AdminPageWriteService provides admin write operations for pages.
type AdminRouter ¶
type AdminRouter interface {
Handle(method router.HTTPMethod, path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
Get(path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
Post(path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
Put(path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
Delete(path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
Patch(path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
Head(path string, handler router.HandlerFunc, mw ...router.MiddlewareFunc) router.RouteInfo
}
AdminRouter exposes an expressive routing surface used by admin and quickstart.
type AdminStaticRouter ¶ added in v0.84.0
type AdminStaticRouter[T any] interface { AdminRouter Static(prefix, root string, config ...router.Static) router.Router[T] }
AdminStaticRouter extends AdminRouter with typed static asset registration.
type AdminStructuralDiagnosticSink ¶ added in v0.131.10
type AdminStructuralDiagnosticSink interface {
RecordAdminStructuralPartialDiagnostics(context.Context, []AdminStructuralPartialDiagnostic)
}
AdminStructuralDiagnosticSink receives the same bounded records projected to the view context.
type AdminStructuralDiagnosticSinkFunc ¶ added in v0.131.10
type AdminStructuralDiagnosticSinkFunc func(context.Context, []AdminStructuralPartialDiagnostic)
AdminStructuralDiagnosticSinkFunc adapts a function to the optional sink.
func (AdminStructuralDiagnosticSinkFunc) RecordAdminStructuralPartialDiagnostics ¶ added in v0.131.10
func (fn AdminStructuralDiagnosticSinkFunc) RecordAdminStructuralPartialDiagnostics(ctx context.Context, diagnostics []AdminStructuralPartialDiagnostic)
type AdminStructuralPartialDiagnostic ¶ added in v0.131.10
type AdminStructuralPartialDiagnostic struct {
Key string `json:"key"`
ReasonCode string `json:"reason_code"`
CandidateFingerprint string `json:"candidate_fingerprint"`
CandidateBasename string `json:"candidate_basename,omitempty"`
}
AdminStructuralPartialDiagnostic is safe to project into a debug/view context. Candidate values are represented only by a bounded basename and a stable fingerprint.
type AdminStructuralPartials ¶ added in v0.131.10
type AdminStructuralPartials struct {
Sidebar string `json:"sidebar"`
Breadcrumbs string `json:"breadcrumbs"`
Diagnostics []AdminStructuralPartialDiagnostic `json:"diagnostics,omitempty"`
}
AdminStructuralPartials is the immutable request-scoped structural selection shared by ordinary views and dashboard chrome.
func DefaultAdminStructuralPartials ¶ added in v0.131.10
func DefaultAdminStructuralPartials() AdminStructuralPartials
DefaultAdminStructuralPartials returns a fresh packaged-default selection.
func (AdminStructuralPartials) Clone ¶ added in v0.131.10
func (selection AdminStructuralPartials) Clone() AdminStructuralPartials
Clone returns an independent selection suitable for request/view storage.
func (AdminStructuralPartials) TemplateContext ¶ added in v0.131.10
func (selection AdminStructuralPartials) TemplateContext() map[string]any
TemplateContext returns the serialized, lowercase view contract consumed by Pongo templates. Using the JSON-shaped map here keeps direct view rendering and router-serialized rendering identical.
type AdminTemplateLookup ¶ added in v0.131.10
AdminTemplateLookup reports whether an identifier is present in the exact registered admin view stack. Implementations must not interpret URLs.
type AdminTemplateLookupFunc ¶ added in v0.131.10
AdminTemplateLookupFunc adapts a function to AdminTemplateLookup.
func (AdminTemplateLookupFunc) TemplateExists ¶ added in v0.131.10
func (fn AdminTemplateLookupFunc) TemplateExists(identifier string) bool
type AssignmentStatus ¶ added in v0.25.0
type AssignmentStatus string
AssignmentStatus captures the translation queue lifecycle.
const ( AssignmentStatusOpen AssignmentStatus = "open" AssignmentStatusAssigned AssignmentStatus = "assigned" AssignmentStatusInProgress AssignmentStatus = "in_progress" AssignmentStatusInReview AssignmentStatus = "in_review" AssignmentStatusChangesRequested AssignmentStatus = "changes_requested" AssignmentStatusApproved AssignmentStatus = "approved" AssignmentStatusArchived AssignmentStatus = "archived" // Deprecated legacy aliases kept so older fixtures and persisted values can // be normalized to the canonical translation vocabulary. AssignmentStatusPending AssignmentStatus = AssignmentStatusOpen AssignmentStatusReview AssignmentStatus = AssignmentStatusInReview AssignmentStatusRejected AssignmentStatus = AssignmentStatusChangesRequested AssignmentStatusPublished AssignmentStatus = "published" )
func (AssignmentStatus) IsActive ¶ added in v0.27.0
func (s AssignmentStatus) IsActive() bool
func (AssignmentStatus) IsTerminal ¶ added in v0.25.0
func (s AssignmentStatus) IsTerminal() bool
func (AssignmentStatus) IsValid ¶ added in v0.25.0
func (s AssignmentStatus) IsValid() bool
type AssignmentType ¶ added in v0.25.0
type AssignmentType string
AssignmentType controls how an assignment is picked up.
const ( AssignmentTypeDirect AssignmentType = "assigned" AssignmentTypeOpenPool AssignmentType = "open_pool" )
func (AssignmentType) IsValid ¶ added in v0.25.0
func (t AssignmentType) IsValid() bool
type AuthConfig ¶
type AuthConfig struct {
LoginPath string `json:"login_path"`
LogoutPath string `json:"logout_path"`
RedirectPath string `json:"redirect_path"`
// AllowUnauthenticatedRoutes explicitly opts out of the default admin
// route-auth requirement. Leave false to require an authenticator before
// Initialize mounts the protected admin surface.
AllowUnauthenticatedRoutes bool `json:"allow_unauthenticated_routes,omitempty"`
}
AuthConfig captures login/logout endpoints and redirect defaults.
type AuthenticatedRequestIdentity ¶ added in v0.27.0
type AuthenticatedRequestIdentity struct {
ActorID string `json:"actor_id"`
Subject string `json:"subject"`
TenantID string `json:"tenant_id"`
OrgID string `json:"org_id"`
RequestID string `json:"request_id"`
CorrelationID string `json:"correlation_id"`
TraceID string `json:"trace_id"`
}
AuthenticatedRequestIdentity captures trusted actor, scope, and trace fields resolved from authenticated admin request context.
func ResolveAuthenticatedRequestIdentity ¶ added in v0.27.0
func ResolveAuthenticatedRequestIdentity(c router.Context, defaults AuthenticatedRequestScopeDefaults) AuthenticatedRequestIdentity
ResolveAuthenticatedRequestIdentity returns trusted actor, scope, and trace metadata without consulting browser-supplied user/tenant/org parameters.
type AuthenticatedRequestScopeDefaults ¶ added in v0.27.0
type AuthenticatedRequestScopeDefaults struct {
TenantID string `json:"tenant_id"`
OrgID string `json:"org_id"`
Enabled bool `json:"enabled"`
}
AuthenticatedRequestScopeDefaults captures single-tenant scope defaults for consumers that resolve scope strictly from authenticated request context.
type Authenticator ¶
Authenticator wraps HTTP handlers with auth checks.
type Authorizer ¶
Authorizer determines whether a subject can perform an action on a resource.
type AutosaveConflictError ¶ added in v0.25.0
type AutosaveConflictError struct {
Panel string `json:"panel"`
EntityID string `json:"entity_id"`
Version string `json:"version"`
ExpectedVersion string `json:"expected_version"`
LatestStatePath string `json:"latest_state_path"`
LatestServerState map[string]any `json:"latest_server_state"`
}
AutosaveConflictError captures the typed autosave conflict contract returned to clients.
func (AutosaveConflictError) Error ¶ added in v0.25.0
func (e AutosaveConflictError) Error() string
func (AutosaveConflictError) Unwrap ¶ added in v0.25.0
func (e AutosaveConflictError) Unwrap() error
type BatchActionStateResolver ¶ added in v0.27.0
type BatchActionStateResolver func( ctx AdminContext, records []map[string]any, actions []Action, scope ActionScope, ) (map[string]map[string]ActionState, error)
BatchActionStateResolver evaluates action availability for a record batch. The first key in the result map is the canonical record ID, the second key is the action name.
type BatchAuthorizer ¶ added in v0.25.0
type BatchAuthorizer interface {
Authorizer
CanAny(ctx context.Context, resource string, permissions ...string) bool
CanAll(ctx context.Context, resource string, permissions ...string) bool
}
BatchAuthorizer allows evaluating multiple permissions in one call.
type BrowserCSRFProtector ¶ added in v0.32.0
type BrowserCSRFProtector interface {
UsesBrowserSession(c router.Context) bool
EnforceBrowserCSRF(c router.Context) error
}
BrowserCSRFProtector exposes browser-session detection and CSRF enforcement for mutating routes that need browser-grade CSRF semantics without depending on a specific authenticator implementation.
type BulkActionStateConfig ¶ added in v0.27.0
type BulkActionStateConfig struct {
SelectionSensitive bool `json:"selection_sensitive,omitempty"`
SelectionStateEndpoint string `json:"selection_state_endpoint,omitempty"`
DebounceMS int `json:"debounce_ms,omitempty"`
}
BulkActionStateConfig advertises bulk action availability capabilities to shared clients.
type BulkActionStateResolver ¶ added in v0.27.0
type BulkActionStateResolver func( ctx AdminContext, actions []Action, listOpts ListOptions, ) (map[string]ActionState, error)
BulkActionStateResolver evaluates availability for list-level bulk actions.
type BulkCommand ¶
type BulkCommand struct {
Service BulkService `json:"service"`
}
BulkCommand triggers a bulk job via the command bus.
func (*BulkCommand) CLIHandler ¶ added in v0.12.0
func (c *BulkCommand) CLIHandler() any
func (*BulkCommand) CLIOptions ¶
func (c *BulkCommand) CLIOptions() command.CLIConfig
func (*BulkCommand) Execute ¶
func (c *BulkCommand) Execute(ctx context.Context, msg BulkStartMsg) error
type BulkConfig ¶
type BulkConfig struct {
Endpoint string `json:"endpoint"`
SupportsRollback bool `json:"supports_rollback,omitempty"`
}
BulkConfig captures bulk endpoint metadata and capabilities.
type BulkJob ¶
type BulkJob struct {
ID string `json:"id"`
Name string `json:"name"`
Action string `json:"action,omitempty"`
Status string `json:"status"`
Total int `json:"total"`
Processed int `json:"processed"`
Progress float64 `json:"progress,omitempty"`
Payload map[string]any `json:"payload,omitempty"`
Errors []string `json:"errors,omitempty"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
RollbackAvailable bool `json:"rollback_available,omitempty"`
}
BulkJob captures bulk job state for UI/progress.
type BulkRequest ¶
type BulkRequest struct {
Name string `json:"name"`
Action string `json:"action"`
Total int `json:"total"`
// Payload carries optional job metadata for downstream processors.
Payload map[string]any `json:"payload"`
}
BulkRequest describes a requested bulk job.
type BulkRoleChangeRequest ¶ added in v0.25.0
type BulkRoleChangeRequest struct {
UserIDs []string `json:"user_ids"`
RoleID string `json:"role_id"`
Assign bool `json:"assign"`
Replace bool `json:"replace"`
}
BulkRoleChangeRequest captures inputs for bulk role assignment operations.
type BulkRoleChangeResponse ¶ added in v0.25.0
type BulkRoleChangeResponse struct {
Summary BulkRoleChangeSummary `json:"summary"`
Results []BulkRoleChangeResult `json:"results"`
RoleID string `json:"role_id"`
Action string `json:"action"`
Replace bool `json:"replace"`
}
BulkRoleChangeResponse is the public API contract returned by bulk role endpoints.
type BulkRoleChangeResult ¶ added in v0.25.0
type BulkRoleChangeResult struct {
UserID string `json:"user_id"`
Status string `json:"status"`
Error string `json:"error,omitempty"`
}
BulkRoleChangeResult captures per-user execution details for bulk role changes.
type BulkRoleChangeSummary ¶ added in v0.25.0
type BulkRoleChangeSummary struct {
Processed int `json:"processed"`
Succeeded int `json:"succeeded"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
}
BulkRoleChangeSummary aggregates per-user execution status for bulk role changes.
type BulkRollbacker ¶
BulkRollbacker optionally supports rollback operations.
type BulkService ¶
type BulkService interface {
Start(ctx context.Context, req BulkRequest) (BulkJob, error)
List(ctx context.Context) []BulkJob
}
BulkService manages bulk jobs.
type BulkStartMsg ¶ added in v0.12.0
type BulkStartMsg struct {
Name string `json:"name"`
Action string `json:"action"`
Total int `json:"total"`
Payload map[string]any `json:"payload"`
}
BulkStartMsg triggers a bulk job.
func (BulkStartMsg) Type ¶ added in v0.12.0
func (BulkStartMsg) Type() string
func (BulkStartMsg) Validate ¶ added in v0.12.0
func (m BulkStartMsg) Validate() error
type BunRecordMapper ¶
type BunRecordMapper[T any] struct { ToRecord func(map[string]any) (T, error) `json:"to_record"` ToMap func(T) (map[string]any, error) `json:"to_map"` }
BunRecordMapper converts between map payloads and repository models.
type BunRepositoryAdapter ¶
type BunRepositoryAdapter[T any] struct { // contains filtered or unexported fields }
BunRepositoryAdapter wraps a go-repository-bun Repository to satisfy the admin Repository interface.
func NewBunRepositoryAdapter ¶
func NewBunRepositoryAdapter[T any](repo repository.Repository[T], opts ...BunRepositoryOption[T]) *BunRepositoryAdapter[T]
NewBunRepositoryAdapter constructs an adapter around a go-repository-bun Repository.
func (*BunRepositoryAdapter[T]) Create ¶
func (a *BunRepositoryAdapter[T]) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts a new record.
func (*BunRepositoryAdapter[T]) Delete ¶
func (a *BunRepositoryAdapter[T]) Delete(ctx context.Context, id string) error
Delete removes a record by id.
func (*BunRepositoryAdapter[T]) List ¶
func (a *BunRepositoryAdapter[T]) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List delegates to the underlying repository with translated pagination/sort/filter/search.
type BunRepositoryOption ¶
type BunRepositoryOption[T any] func(*BunRepositoryAdapter[T])
BunRepositoryOption configures the BunRepositoryAdapter.
func WithBunBaseCriteria ¶
func WithBunBaseCriteria[T any](criteria ...repository.SelectCriteria) BunRepositoryOption[T]
WithBunBaseCriteria applies select criteria to every list/get call.
func WithBunDeleteCriteria ¶
func WithBunDeleteCriteria[T any](criteria ...repository.DeleteCriteria) BunRepositoryOption[T]
WithBunDeleteCriteria applies delete criteria to every delete call.
func WithBunFilterMapping ¶
func WithBunFilterMapping[T any](builders map[string]func(any) repository.SelectCriteria) BunRepositoryOption[T]
WithBunFilterMapping configures per-field filter builders (fallback is equality).
func WithBunPatchAllowedFields ¶ added in v0.24.0
func WithBunPatchAllowedFields[T any](fields ...string) BunRepositoryOption[T]
WithBunPatchAllowedFields restricts update patch payloads to a known allowlist.
func WithBunRecordMapper ¶
func WithBunRecordMapper[T any](mapper BunRecordMapper[T]) BunRepositoryOption[T]
WithBunRecordMapper overrides the default map-native mapper.
func WithBunSearchColumns ¶
func WithBunSearchColumns[T any](columns ...string) BunRepositoryOption[T]
WithBunSearchColumns configures case-insensitive LIKE queries for the provided columns.
func WithBunUpdateCriteria ¶
func WithBunUpdateCriteria[T any](criteria ...repository.UpdateCriteria) BunRepositoryOption[T]
WithBunUpdateCriteria applies update criteria to every update call.
type BunSettingsAdapter ¶
type BunSettingsAdapter struct {
// contains filtered or unexported fields
}
BunSettingsAdapter persists settings using go-repository-bun and resolves values through go-options to preserve provenance and validation surface.
func NewBunSettingsAdapter ¶
func NewBunSettingsAdapter(db *bun.DB, repoOptions ...repository.Option) (*BunSettingsAdapter, error)
func (*BunSettingsAdapter) Apply ¶
func (a *BunSettingsAdapter) Apply(ctx context.Context, bundle SettingsBundle) error
Apply validates and persists scoped settings.
func (*BunSettingsAdapter) Definitions ¶
func (a *BunSettingsAdapter) Definitions() []SettingDefinition
Definitions returns sorted definitions.
func (*BunSettingsAdapter) RegisterDefinition ¶
func (a *BunSettingsAdapter) RegisterDefinition(def SettingDefinition)
RegisterDefinition records a setting definition.
func (*BunSettingsAdapter) Resolve ¶
func (a *BunSettingsAdapter) Resolve(key, userID string) ResolvedSetting
Resolve returns a setting value with provenance.
func (*BunSettingsAdapter) ResolveAll ¶
func (a *BunSettingsAdapter) ResolveAll(userID string) map[string]ResolvedSetting
ResolveAll resolves every definition for the given user.
func (*BunSettingsAdapter) Schema ¶
func (a *BunSettingsAdapter) Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
Schema returns the go-options schema document for UI renderers.
func (*BunSettingsAdapter) WithSchemaOptions ¶
func (a *BunSettingsAdapter) WithSchemaOptions(options ...opts.Option)
WithSchemaOptions appends schema merge options used during resolution.
type BunTranslationAssignmentRepository ¶ added in v0.27.0
type BunTranslationAssignmentRepository struct {
// contains filtered or unexported fields
}
func NewBunTranslationAssignmentRepository ¶ added in v0.27.0
func NewBunTranslationAssignmentRepository(db *bun.DB) *BunTranslationAssignmentRepository
func (*BunTranslationAssignmentRepository) AssignmentDashboardSummary ¶ added in v0.80.0
func (r *BunTranslationAssignmentRepository) AssignmentDashboardSummary(ctx context.Context, input TranslationAssignmentDashboardSummaryInput) (TranslationAssignmentDashboardSummary, error)
func (*BunTranslationAssignmentRepository) AssignmentMyWorkSummary ¶ added in v0.80.0
func (r *BunTranslationAssignmentRepository) AssignmentMyWorkSummary(ctx context.Context, input TranslationAssignmentMyWorkSummaryInput) (map[string]int, error)
func (*BunTranslationAssignmentRepository) AssignmentQueueSummary ¶ added in v0.80.0
func (r *BunTranslationAssignmentRepository) AssignmentQueueSummary(ctx context.Context, input TranslationAssignmentQueueSummaryInput) (TranslationAssignmentQueueSummary, error)
func (*BunTranslationAssignmentRepository) AssignmentReviewerAggregateCounts ¶ added in v0.80.0
func (r *BunTranslationAssignmentRepository) AssignmentReviewerAggregateCounts(_ context.Context, input TranslationAssignmentReviewerAggregateInput) (map[string]int, error)
func (*BunTranslationAssignmentRepository) AssignmentReviewerAggregateSummary ¶ added in v0.91.0
func (r *BunTranslationAssignmentRepository) AssignmentReviewerAggregateSummary(ctx context.Context, input TranslationAssignmentReviewerAggregateInput) (TranslationAssignmentReviewerAggregateSummary, error)
func (*BunTranslationAssignmentRepository) Create ¶ added in v0.27.0
func (r *BunTranslationAssignmentRepository) Create(ctx context.Context, assignment TranslationAssignment) (TranslationAssignment, error)
func (*BunTranslationAssignmentRepository) CreateOrReuseActive ¶ added in v0.27.0
func (r *BunTranslationAssignmentRepository) CreateOrReuseActive(ctx context.Context, assignment TranslationAssignment) (TranslationAssignment, bool, error)
func (*BunTranslationAssignmentRepository) DistinctAssignmentEntityTypes ¶ added in v0.100.0
func (r *BunTranslationAssignmentRepository) DistinctAssignmentEntityTypes(ctx context.Context) ([]string, error)
func (*BunTranslationAssignmentRepository) DistinctAssignmentLocales ¶ added in v0.100.0
func (*BunTranslationAssignmentRepository) DistinctAssignmentTranslationGroups ¶ added in v0.100.0
func (r *BunTranslationAssignmentRepository) DistinctAssignmentTranslationGroups(ctx context.Context, filters map[string]any) ([]TranslationAssignmentGroupOption, error)
func (*BunTranslationAssignmentRepository) Get ¶ added in v0.27.0
func (r *BunTranslationAssignmentRepository) Get(ctx context.Context, id string) (TranslationAssignment, error)
func (*BunTranslationAssignmentRepository) List ¶ added in v0.27.0
func (r *BunTranslationAssignmentRepository) List(ctx context.Context, opts ListOptions) ([]TranslationAssignment, int, error)
func (*BunTranslationAssignmentRepository) ListAssignmentFamilyGroups ¶ added in v0.82.1
func (r *BunTranslationAssignmentRepository) ListAssignmentFamilyGroups(ctx context.Context, input TranslationAssignmentFamilyGroupQueryInput) (TranslationAssignmentFamilyGroupQueryResult, error)
func (*BunTranslationAssignmentRepository) ListAssignmentFamilyOptions ¶ added in v0.113.5
func (r *BunTranslationAssignmentRepository) ListAssignmentFamilyOptions(ctx context.Context, input TranslationAssignmentFamilyOptionQueryInput) (TranslationAssignmentFamilyOptionQueryResult, error)
func (*BunTranslationAssignmentRepository) ListAssignmentPage ¶ added in v0.80.0
func (r *BunTranslationAssignmentRepository) ListAssignmentPage(ctx context.Context, input TranslationAssignmentPageQueryInput) (TranslationAssignmentPageQueryResult, error)
func (*BunTranslationAssignmentRepository) ListAssignmentSnapshot ¶ added in v0.82.1
func (r *BunTranslationAssignmentRepository) ListAssignmentSnapshot(ctx context.Context, input TranslationAssignmentSnapshotQueryInput) (TranslationAssignmentSnapshotQueryResult, error)
func (*BunTranslationAssignmentRepository) ListFamilyAssignments ¶ added in v0.82.1
func (r *BunTranslationAssignmentRepository) ListFamilyAssignments(ctx context.Context, input TranslationAssignmentFamilyAssignmentsQueryInput) (TranslationAssignmentFamilyAssignmentsQueryResult, error)
func (*BunTranslationAssignmentRepository) Update ¶ added in v0.27.0
func (r *BunTranslationAssignmentRepository) Update(ctx context.Context, assignment TranslationAssignment, expectedVersion int64) (TranslationAssignment, error)
type BunTranslationExchangeRuntimeStore ¶ added in v0.27.0
type BunTranslationExchangeRuntimeStore struct {
// contains filtered or unexported fields
}
func NewBunTranslationExchangeRuntimeStore ¶ added in v0.27.0
func NewBunTranslationExchangeRuntimeStore(db *bun.DB) *BunTranslationExchangeRuntimeStore
func (*BunTranslationExchangeRuntimeStore) CommitApplyRecord ¶ added in v0.132.1
func (s *BunTranslationExchangeRuntimeStore) CommitApplyRecord(ctx context.Context, reservation translationExchangeApplyReservation, record translationExchangeAppliedRecord) (translationExchangeAppliedRecord, error)
func (*BunTranslationExchangeRuntimeStore) CompleteJob ¶ added in v0.27.0
func (*BunTranslationExchangeRuntimeStore) CreateJob ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) CreateJob(ctx context.Context, job translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
func (*BunTranslationExchangeRuntimeStore) CreateOrGetApplyJob ¶ added in v0.132.1
func (s *BunTranslationExchangeRuntimeStore) CreateOrGetApplyJob(ctx context.Context, identity translationTransportIdentity, job translationExchangeAsyncJob, rows []TranslationExchangeRow) (translationExchangeAsyncJob, bool, error)
func (*BunTranslationExchangeRuntimeStore) FindJobByRequestHash ¶ added in v0.27.0
func (*BunTranslationExchangeRuntimeStore) HeartbeatJob ¶ added in v0.27.0
func (*BunTranslationExchangeRuntimeStore) ListJobRows ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) ListJobRows(ctx context.Context, jobID string) ([]translationExchangeStoredRow, error)
func (*BunTranslationExchangeRuntimeStore) ListJobs ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) ListJobs(ctx context.Context, query translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
func (*BunTranslationExchangeRuntimeStore) ListRecoverableJobs ¶ added in v0.27.0
func (*BunTranslationExchangeRuntimeStore) LookupApplyRecord ¶ added in v0.27.0
func (*BunTranslationExchangeRuntimeStore) RecordApplyRecord ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) RecordApplyRecord(ctx context.Context, identity translationTransportIdentity, record translationExchangeAppliedRecord) (translationExchangeAppliedRecord, bool, error)
func (*BunTranslationExchangeRuntimeStore) ReleaseApplyRecord ¶ added in v0.132.1
func (s *BunTranslationExchangeRuntimeStore) ReleaseApplyRecord(ctx context.Context, reservation translationExchangeApplyReservation) error
func (*BunTranslationExchangeRuntimeStore) ReplaceJobArtifacts ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) ReplaceJobArtifacts(ctx context.Context, job translationExchangeAsyncJob, artifacts []translationExchangeJobArtifact) error
func (*BunTranslationExchangeRuntimeStore) ReserveApplyRecord ¶ added in v0.132.1
func (*BunTranslationExchangeRuntimeStore) SaveJobRows ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) SaveJobRows(ctx context.Context, job translationExchangeAsyncJob, rows []TranslationExchangeRow) error
func (*BunTranslationExchangeRuntimeStore) UpsertJobRow ¶ added in v0.27.0
func (s *BunTranslationExchangeRuntimeStore) UpsertJobRow(ctx context.Context, jobID string, row translationExchangeStoredRow) error
type BunTranslationFamilyStore ¶ added in v0.27.0
type BunTranslationFamilyStore struct {
// contains filtered or unexported fields
}
func NewBunTranslationFamilyStore ¶ added in v0.27.0
func NewBunTranslationFamilyStore(db *bun.DB) *BunTranslationFamilyStore
func (*BunTranslationFamilyStore) Families ¶ added in v0.27.0
func (s *BunTranslationFamilyStore) Families(ctx context.Context) ([]translationservices.FamilyRecord, error)
func (*BunTranslationFamilyStore) Family ¶ added in v0.27.0
func (s *BunTranslationFamilyStore) Family(ctx context.Context, id string) (translationservices.FamilyRecord, bool, error)
func (*BunTranslationFamilyStore) FamilyQuery ¶ added in v0.83.0
func (s *BunTranslationFamilyStore) FamilyQuery(ctx context.Context, input translationservices.GetFamilyInput) (translationservices.FamilyRecord, bool, error)
func (*BunTranslationFamilyStore) ListFamiliesQuery ¶ added in v0.80.0
func (s *BunTranslationFamilyStore) ListFamiliesQuery(ctx context.Context, input translationservices.ListFamiliesInput) (translationservices.ListFamiliesResult, error)
func (*BunTranslationFamilyStore) SaveFamily ¶ added in v0.27.0
func (s *BunTranslationFamilyStore) SaveFamily(ctx context.Context, family translationservices.FamilyRecord) error
func (*BunTranslationFamilyStore) TranslationDashboardFamilyMetrics ¶ added in v0.80.0
func (s *BunTranslationFamilyStore) TranslationDashboardFamilyMetrics(ctx context.Context, input TranslationDashboardFamilyMetricsInput) (TranslationDashboardFamilyMetrics, error)
func (*BunTranslationFamilyStore) TranslationEditorMemorySuggestions ¶ added in v0.80.0
func (s *BunTranslationFamilyStore) TranslationEditorMemorySuggestions(ctx context.Context, input TranslationEditorMemorySuggestionInput) ([]TranslationEditorMemorySuggestion, error)
type BunWorkflowAuthoringStore ¶ added in v0.27.0
type BunWorkflowAuthoringStore struct {
// contains filtered or unexported fields
}
BunWorkflowAuthoringStore persists flow authoring state and version history.
func NewBunWorkflowAuthoringStore ¶ added in v0.27.0
func NewBunWorkflowAuthoringStore(db *bun.DB) *BunWorkflowAuthoringStore
func (*BunWorkflowAuthoringStore) List ¶ added in v0.27.0
func (s *BunWorkflowAuthoringStore) List(ctx context.Context, opts flow.AuthoringListOptions) (*flow.AuthoringListResult, error)
func (*BunWorkflowAuthoringStore) ListVersions ¶ added in v0.27.0
func (s *BunWorkflowAuthoringStore) ListVersions(ctx context.Context, machineID string, limit int, offset int) ([]*flow.AuthoringMachineRecord, bool, error)
func (*BunWorkflowAuthoringStore) Load ¶ added in v0.27.0
func (s *BunWorkflowAuthoringStore) Load(ctx context.Context, machineID string) (*flow.AuthoringMachineRecord, error)
func (*BunWorkflowAuthoringStore) LoadAny ¶ added in v0.27.0
func (s *BunWorkflowAuthoringStore) LoadAny(ctx context.Context, machineID string) (*flow.AuthoringMachineRecord, error)
func (*BunWorkflowAuthoringStore) LoadVersion ¶ added in v0.27.0
func (s *BunWorkflowAuthoringStore) LoadVersion(ctx context.Context, machineID string, version string) (*flow.AuthoringMachineRecord, error)
func (*BunWorkflowAuthoringStore) Save ¶ added in v0.27.0
func (s *BunWorkflowAuthoringStore) Save(ctx context.Context, rec *flow.AuthoringMachineRecord, expectedVersion string) (*flow.AuthoringMachineRecord, error)
type BunWorkflowBindingRepository ¶ added in v0.25.0
type BunWorkflowBindingRepository struct {
// contains filtered or unexported fields
}
BunWorkflowBindingRepository persists workflow bindings with active uniqueness checks.
func NewBunWorkflowBindingRepository ¶ added in v0.25.0
func NewBunWorkflowBindingRepository(db *bun.DB) *BunWorkflowBindingRepository
NewBunWorkflowBindingRepository constructs a Bun-backed binding repository.
func (*BunWorkflowBindingRepository) Create ¶ added in v0.25.0
func (r *BunWorkflowBindingRepository) Create(ctx context.Context, binding WorkflowBinding) (WorkflowBinding, error)
func (*BunWorkflowBindingRepository) Delete ¶ added in v0.25.0
func (r *BunWorkflowBindingRepository) Delete(ctx context.Context, id string) error
func (*BunWorkflowBindingRepository) Get ¶ added in v0.25.0
func (r *BunWorkflowBindingRepository) Get(ctx context.Context, id string) (WorkflowBinding, error)
func (*BunWorkflowBindingRepository) List ¶ added in v0.25.0
func (r *BunWorkflowBindingRepository) List(ctx context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
func (*BunWorkflowBindingRepository) ListByScope ¶ added in v0.25.0
func (r *BunWorkflowBindingRepository) ListByScope(ctx context.Context, scopeType WorkflowBindingScopeType, scopeRef string, status WorkflowBindingStatus) ([]WorkflowBinding, error)
func (*BunWorkflowBindingRepository) Update ¶ added in v0.25.0
func (r *BunWorkflowBindingRepository) Update(ctx context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
type BunWorkflowDefinitionRepository ¶ added in v0.25.0
type BunWorkflowDefinitionRepository struct {
// contains filtered or unexported fields
}
BunWorkflowDefinitionRepository persists workflow definitions and version snapshots.
func NewBunWorkflowDefinitionRepository ¶ added in v0.25.0
func NewBunWorkflowDefinitionRepository(db *bun.DB) *BunWorkflowDefinitionRepository
NewBunWorkflowDefinitionRepository constructs a Bun-backed workflow repository.
func (*BunWorkflowDefinitionRepository) Create ¶ added in v0.25.0
func (r *BunWorkflowDefinitionRepository) Create(ctx context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
func (*BunWorkflowDefinitionRepository) Get ¶ added in v0.25.0
func (r *BunWorkflowDefinitionRepository) Get(ctx context.Context, id string) (PersistedWorkflow, error)
func (*BunWorkflowDefinitionRepository) GetVersion ¶ added in v0.25.0
func (r *BunWorkflowDefinitionRepository) GetVersion(ctx context.Context, id string, version int) (PersistedWorkflow, error)
func (*BunWorkflowDefinitionRepository) List ¶ added in v0.25.0
func (r *BunWorkflowDefinitionRepository) List(ctx context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
func (*BunWorkflowDefinitionRepository) Update ¶ added in v0.25.0
func (r *BunWorkflowDefinitionRepository) Update(ctx context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
type CMSBlockConflictRepository ¶ added in v0.23.0
type CMSBlockConflictRepository struct {
// contains filtered or unexported fields
}
CMSBlockConflictRepository reports mismatches between embedded and legacy blocks.
func NewCMSBlockConflictRepository ¶ added in v0.23.0
func NewCMSBlockConflictRepository(content CMSContentService) *CMSBlockConflictRepository
NewCMSBlockConflictRepository builds a conflict repository.
func (*CMSBlockConflictRepository) Create ¶ added in v0.23.0
func (r *CMSBlockConflictRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create is not supported.
func (*CMSBlockConflictRepository) Delete ¶ added in v0.23.0
func (r *CMSBlockConflictRepository) Delete(ctx context.Context, id string) error
Delete is not supported.
func (*CMSBlockConflictRepository) List ¶ added in v0.23.0
func (r *CMSBlockConflictRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns block conflicts.
type CMSBlockDefinition ¶
type CMSBlockDefinition = cmsboot.CMSBlockDefinition
CMSBlockDefinition describes a reusable block schema.
type CMSBlockDefinitionRepository ¶
type CMSBlockDefinitionRepository struct {
// contains filtered or unexported fields
}
CMSBlockDefinitionRepository manages block definitions through CMSContentService.
func NewCMSBlockDefinitionRepository ¶
func NewCMSBlockDefinitionRepository(content CMSContentService, types CMSContentTypeService) *CMSBlockDefinitionRepository
NewCMSBlockDefinitionRepository builds a block definition repository.
func (*CMSBlockDefinitionRepository) Create ¶
func (r *CMSBlockDefinitionRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create adds a block definition.
func (*CMSBlockDefinitionRepository) Delete ¶
func (r *CMSBlockDefinitionRepository) Delete(ctx context.Context, id string) error
Delete removes a block definition.
func (*CMSBlockDefinitionRepository) List ¶
func (r *CMSBlockDefinitionRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns block definitions.
type CMSBlockDefinitionVersion ¶ added in v0.24.0
type CMSBlockDefinitionVersion = cmsboot.CMSBlockDefinitionVersion
CMSBlockDefinitionVersion captures a block definition schema version.
type CMSBlockRepository ¶
type CMSBlockRepository struct {
// contains filtered or unexported fields
}
CMSBlockRepository manages blocks assigned to content/pages.
func NewCMSBlockRepository ¶
func NewCMSBlockRepository(content CMSContentService) *CMSBlockRepository
NewCMSBlockRepository builds a block repository.
func (*CMSBlockRepository) Create ¶
func (r *CMSBlockRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create saves a new block.
func (*CMSBlockRepository) Delete ¶
func (r *CMSBlockRepository) Delete(ctx context.Context, id string) error
Delete removes a block.
func (*CMSBlockRepository) List ¶
func (r *CMSBlockRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns blocks for a content ID (or all when unspecified).
type CMSBootstrapHook ¶ added in v0.36.0
CMSBootstrapHook runs after CMS services are prepared and before module loading.
type CMSContainer ¶
type CMSContainer = cmsboot.CMSContainer
CMSContainer abstracts CMS services used by admin.
func BuildGoCMSContainer ¶
func BuildGoCMSContainer(ctx context.Context, cfg Config) (CMSContainer, error)
BuildGoCMSContainer constructs a CMSContainer from go-cms configuration or module values.
type CMSContainerBuilder ¶
type CMSContainerBuilder func(ctx context.Context, cfg Config) (CMSContainer, error)
CMSContainerBuilder constructs a CMSContainer from admin configuration.
type CMSContainerUnwrapper ¶ added in v0.46.0
type CMSContainerUnwrapper interface {
UnwrapCMSContainer() CMSContainer
}
CMSContainerUnwrapper allows wrapped CMS containers to expose the underlying container for optional capability discovery.
type CMSContent ¶
type CMSContent = cmsboot.CMSContent
CMSContent represents structured content managed by the CMS.
type CMSContentListOption ¶ added in v0.24.0
type CMSContentListOption = cmscontracts.CMSContentListOption
CMSContentListOption represents list option tokens understood by go-cms List. It remains re-exported from the root package for compatibility.
func WithContentTypeID ¶ added in v0.54.0
func WithContentTypeID(id string) CMSContentListOption
WithContentTypeID requests that upstream content list reads scope rows to the supplied content type before loading translations or projections.
func WithDerivedFields ¶ added in v0.25.0
func WithDerivedFields() CMSContentListOption
WithDerivedFields requests canonical top-level derived content fields from go-cms.
func WithFamilyID ¶ added in v0.105.0
func WithFamilyID(id string) CMSContentListOption
WithFamilyID requests that upstream content list reads scope rows to one canonical translation family before loading variants.
func WithFamilyIDs ¶ added in v0.113.10
func WithFamilyIDs(ids ...string) CMSContentListOption
WithFamilyIDs requests one bounded upstream read for multiple canonical translation families.
func WithLocaleVariants ¶ added in v0.42.0
func WithLocaleVariants() CMSContentListOption
WithLocaleVariants requests one list item per locale sibling for translation-enabled content. This is handled inside go-admin's CMS adapter and is not forwarded to go-cms.
func WithTranslations ¶ added in v0.24.0
func WithTranslations() CMSContentListOption
WithTranslations requests that list operations preload translations for CMS content. This opt-in token mirrors the go-cms list option of the same name.
type CMSContentRepository ¶
type CMSContentRepository struct {
// contains filtered or unexported fields
}
CMSContentRepository adapts CMSContentService for structured content entities.
func NewCMSContentRepository ¶
func NewCMSContentRepository(content CMSContentService) *CMSContentRepository
NewCMSContentRepository builds a content repository.
func NewCMSContentRepositoryWithEntryNavigationOptions ¶ added in v0.111.0
func NewCMSContentRepositoryWithEntryNavigationOptions(content CMSContentService, options EntryNavigationOptions) *CMSContentRepository
NewCMSContentRepositoryWithEntryNavigationOptions builds a content repository using the final merged entry-navigation policy.
func (*CMSContentRepository) Create ¶
func (r *CMSContentRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts new content.
func (*CMSContentRepository) CreateTranslation ¶ added in v0.25.0
func (r *CMSContentRepository) CreateTranslation(ctx context.Context, input TranslationCreateInput) (map[string]any, error)
CreateTranslation creates a locale variant through a first-class translation command.
func (*CMSContentRepository) Delete ¶
func (r *CMSContentRepository) Delete(ctx context.Context, id string) error
Delete removes a content item.
func (*CMSContentRepository) List ¶
func (r *CMSContentRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns content filtered by locale and search query.
type CMSContentService ¶
type CMSContentService = cmsboot.CMSContentService
CMSContentService manages pages/blocks backed by the CMS.
func NewGoCMSContentAdapter ¶ added in v0.23.0
func NewGoCMSContentAdapter(contentSvc any, blockSvc any, contentTypeSvc CMSContentTypeService) CMSContentService
NewGoCMSContentAdapter wraps go-cms services into the admin CMSContentService contract.
type CMSContentServiceUnwrapper ¶ added in v0.46.0
type CMSContentServiceUnwrapper interface {
UnwrapCMSContentService() CMSContentService
}
CMSContentServiceUnwrapper allows wrappers to expose their underlying content service so optional capabilities remain discoverable.
type CMSContentTranslationCreator ¶ added in v0.25.0
type CMSContentTranslationCreator interface {
CreateTranslation(ctx context.Context, input TranslationCreateInput) (*CMSContent, error)
}
CMSContentTranslationCreator allows CMS content services/adapters to expose a first-class translation creation command.
type CMSContentType ¶ added in v0.23.0
type CMSContentType = cmsboot.CMSContentType
CMSContentType represents a content type definition.
type CMSContentTypeEntryRepository ¶ added in v0.23.0
type CMSContentTypeEntryRepository struct {
// contains filtered or unexported fields
}
CMSContentTypeEntryRepository scopes content CRUD to a specific content type.
func NewCMSContentTypeEntryRepository ¶ added in v0.23.0
func NewCMSContentTypeEntryRepository(content CMSContentService, contentType CMSContentType) *CMSContentTypeEntryRepository
NewCMSContentTypeEntryRepository builds a content repository scoped to the supplied content type.
func NewCMSContentTypeEntryRepositoryWithEntryNavigationOptions ¶ added in v0.111.0
func NewCMSContentTypeEntryRepositoryWithEntryNavigationOptions(content CMSContentService, contentType CMSContentType, options EntryNavigationOptions) *CMSContentTypeEntryRepository
NewCMSContentTypeEntryRepositoryWithEntryNavigationOptions builds a scoped content repository using the final merged entry-navigation policy.
func (*CMSContentTypeEntryRepository) Create ¶ added in v0.23.0
func (r *CMSContentTypeEntryRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts new content with the bound content type.
func (*CMSContentTypeEntryRepository) CreateTranslation ¶ added in v0.25.0
func (r *CMSContentTypeEntryRepository) CreateTranslation(ctx context.Context, input TranslationCreateInput) (map[string]any, error)
CreateTranslation creates a locale variant through a first-class translation command.
func (*CMSContentTypeEntryRepository) Delete ¶ added in v0.23.0
func (r *CMSContentTypeEntryRepository) Delete(ctx context.Context, id string) error
Delete removes a content item after validating its type.
func (*CMSContentTypeEntryRepository) Get ¶ added in v0.23.0
Get retrieves content by id, enforcing content type membership.
func (*CMSContentTypeEntryRepository) List ¶ added in v0.23.0
func (r *CMSContentTypeEntryRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns content filtered by the bound content type.
func (*CMSContentTypeEntryRepository) ListTranslationFamilies ¶ added in v0.103.0
func (r *CMSContentTypeEntryRepository) ListTranslationFamilies(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
ListTranslationFamilies returns optimized grouped family rows when supported by the backing service.
type CMSContentTypeRepository ¶ added in v0.23.0
type CMSContentTypeRepository struct {
// contains filtered or unexported fields
}
CMSContentTypeRepository adapts CMSContentTypeService for content type definitions.
func NewCMSContentTypeRepository ¶ added in v0.23.0
func NewCMSContentTypeRepository(types CMSContentTypeService) *CMSContentTypeRepository
NewCMSContentTypeRepository builds a repository backed by a CMSContentTypeService.
func (*CMSContentTypeRepository) Create ¶ added in v0.23.0
func (r *CMSContentTypeRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts a content type.
func (*CMSContentTypeRepository) Delete ¶ added in v0.23.0
func (r *CMSContentTypeRepository) Delete(ctx context.Context, id string) error
Delete removes a content type.
func (*CMSContentTypeRepository) Get ¶ added in v0.23.0
Get returns a single content type by slug (preferred) or id.
func (*CMSContentTypeRepository) List ¶ added in v0.23.0
func (r *CMSContentTypeRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns content types filtered by search query.
type CMSContentTypeService ¶ added in v0.23.0
type CMSContentTypeService = cmsboot.CMSContentTypeService
CMSContentTypeService manages content type definitions.
func NewGoCMSContentTypeAdapter ¶ added in v0.23.0
func NewGoCMSContentTypeAdapter(service any) CMSContentTypeService
NewGoCMSContentTypeAdapter wraps a typed go-cms content type service.
type CMSLegacyBlockService ¶ added in v0.23.0
type CMSLegacyBlockService interface {
LegacyBlocksForContent(ctx context.Context, contentID, locale string) ([]CMSBlock, error)
}
CMSLegacyBlockService exposes legacy block retrieval for conflict reports.
type CMSMenuRepository ¶
type CMSMenuRepository struct {
// contains filtered or unexported fields
}
CMSMenuRepository manages menu items for CMS-backed navigation.
func NewCMSMenuRepository ¶
func NewCMSMenuRepository(menu CMSMenuService, defaultCode string) *CMSMenuRepository
NewCMSMenuRepository builds a menu repository with a default menu code.
func (*CMSMenuRepository) Create ¶
func (r *CMSMenuRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts a menu item.
func (*CMSMenuRepository) Delete ¶
func (r *CMSMenuRepository) Delete(ctx context.Context, id string) error
Delete removes a menu item.
func (*CMSMenuRepository) List ¶
func (r *CMSMenuRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns menu items for a menu code and locale.
type CMSMenuService ¶
type CMSMenuService = cmsboot.CMSMenuService
CMSMenuService manages CMS-backed menus.
type CMSOptions ¶
type CMSOptions struct {
Container CMSContainer `json:"container"`
ContainerBuilder CMSContainerBuilder `json:"container_builder"`
GoCMSConfig any `json:"go_cms_config"`
}
CMSOptions configures how the CMS container is resolved (in-memory, go-cms, or host-provided).
type CMSPageRepository ¶
type CMSPageRepository struct {
// contains filtered or unexported fields
}
CMSPageRepository adapts a CMSContentService to the admin Repository contract. It supports locale-aware listings, basic search, parent/child metadata for tree views, and slug uniqueness validation for preview links.
func NewCMSPageRepository ¶
func NewCMSPageRepository(content CMSContentService) *CMSPageRepository
NewCMSPageRepository builds a repository backed by a CMSContentService.
func (*CMSPageRepository) Create ¶
func (r *CMSPageRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts a page with path collision checks.
func (*CMSPageRepository) Delete ¶
func (r *CMSPageRepository) Delete(ctx context.Context, id string) error
Delete removes a page.
func (*CMSPageRepository) List ¶
func (r *CMSPageRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns CMS pages filtered by locale and simple search.
type CMSWidgetService ¶
type CMSWidgetService = cmsboot.CMSWidgetService
CMSWidgetService registers dashboard widget areas/definitions.
type CRUDRepositoryAdapter ¶
type CRUDRepositoryAdapter struct {
// contains filtered or unexported fields
}
CRUDRepositoryAdapter wraps a go-crud Service so panels can target Bun-backed repos.
func NewCRUDRepositoryAdapter ¶
func NewCRUDRepositoryAdapter(service crud.Service[map[string]any]) *CRUDRepositoryAdapter
NewCRUDRepositoryAdapter constructs the adapter.
func (*CRUDRepositoryAdapter) Create ¶
func (r *CRUDRepositoryAdapter) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create inserts a record.
func (*CRUDRepositoryAdapter) Delete ¶
func (r *CRUDRepositoryAdapter) Delete(ctx context.Context, id string) error
Delete removes a record by id.
func (*CRUDRepositoryAdapter) List ¶
func (r *CRUDRepositoryAdapter) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List delegates to the go-crud service using translated list options.
type CanonicalURLResolver ¶ added in v0.26.0
type CanonicalURLResolver struct {
BaseURL string `json:"base_url"`
}
CanonicalURLResolver resolves canonical paths and URLs with an optional base URL prefix.
func (CanonicalURLResolver) ContentPath ¶ added in v0.26.0
func (r CanonicalURLResolver) ContentPath(contentType, slug string) string
ContentPath returns a canonical content path for (type, slug).
func (CanonicalURLResolver) ContentURL ¶ added in v0.26.0
func (r CanonicalURLResolver) ContentURL(contentType, slug string) string
ContentURL returns a canonical absolute/relative URL for (type, slug).
func (CanonicalURLResolver) NormalizePath ¶ added in v0.26.0
func (r CanonicalURLResolver) NormalizePath(path, fallback string) string
NormalizePath returns a normalized path with leading slash and fallback support.
type ChartPointWidgetPayload ¶ added in v0.25.0
type CommandBus ¶ added in v0.12.0
type CommandBus struct {
// contains filtered or unexported fields
}
CommandBus registers command/query handlers and dispatches by name.
func NewCommandBus ¶ added in v0.12.0
func NewCommandBus(enabled bool) *CommandBus
NewCommandBus constructs a command bus that can be toggled off.
func (*CommandBus) Close ¶ added in v0.12.0
func (b *CommandBus) Close()
Close is an alias for Reset.
func (*CommandBus) CommandDescriptors ¶ added in v0.126.8
func (b *CommandBus) CommandDescriptors() []command.CommandDescriptor
CommandDescriptors returns the deterministic catalog snapshot contributed by all currently committed owner generations.
func (*CommandBus) CommandRegistration ¶ added in v0.110.0
func (b *CommandBus) CommandRegistration(name string) CommandRegistrationState
CommandRegistration returns the registration state for name-based dispatch.
func (*CommandBus) DispatchByName ¶ added in v0.12.0
func (b *CommandBus) DispatchByName(ctx context.Context, name string, payload map[string]any, ids []string) error
DispatchByName routes a named command through the dispatcher.
func (*CommandBus) DispatchByNameWithOptions ¶ added in v0.27.0
func (b *CommandBus) DispatchByNameWithOptions(ctx context.Context, name string, payload map[string]any, ids []string, opts command.DispatchOptions) (command.DispatchReceipt, error)
DispatchByNameWithOptions routes a named command through the dispatcher using explicit dispatch options.
func (*CommandBus) DispatchByNameWithOutcome ¶ added in v0.88.0
func (b *CommandBus) DispatchByNameWithOutcome(ctx context.Context, name string, payload map[string]any, ids []string, opts command.DispatchOptions) (DispatchOutcome, error)
DispatchByNameWithOutcome routes a named command and returns an optional inline result.
func (*CommandBus) Enable ¶ added in v0.12.0
func (b *CommandBus) Enable(enabled bool)
Enable toggles the command bus on/off.
func (*CommandBus) ExecutionPolicy ¶ added in v0.27.0
func (b *CommandBus) ExecutionPolicy() CommandExecutionPolicy
ExecutionPolicy returns the current command execution policy snapshot.
func (*CommandBus) HasFactory ¶ added in v0.25.0
func (b *CommandBus) HasFactory(name string) bool
HasFactory reports whether a named message factory is registered.
func (*CommandBus) MarkCommandHandlerRegistered ¶ added in v0.110.0
func (b *CommandBus) MarkCommandHandlerRegistered(name string)
MarkCommandHandlerRegistered records that a typed command handler exists for a public command name. This is used by capability checks before advertising browser-dispatchable actions.
func (*CommandBus) Names ¶ added in v0.27.0
func (b *CommandBus) Names() []string
Names returns a sorted snapshot of command names known to the bus.
func (*CommandBus) NewRegistrationSet ¶ added in v0.126.8
func (b *CommandBus) NewRegistrationSet(owner string) (*CommandRegistrationSet, error)
NewRegistrationSet creates a single-use owner-scoped registration builder.
func (*CommandBus) RegisterFactory ¶ added in v0.12.0
func (b *CommandBus) RegisterFactory(name string, factory MessageFactory) error
RegisterFactory stores a message factory for name-based dispatch.
func (*CommandBus) Reset ¶ added in v0.12.0
func (b *CommandBus) Reset()
Reset unsubscribes registered handlers and clears factories.
func (*CommandBus) SetExecutionPolicy ¶ added in v0.27.0
func (b *CommandBus) SetExecutionPolicy(policy CommandExecutionPolicy) error
SetExecutionPolicy replaces command dispatch policy for name-based dispatch.
func (*CommandBus) SetOwnedRuntimeConfig ¶ added in v0.126.8
func (b *CommandBus) SetOwnedRuntimeConfig(config OwnedCommandRuntimeConfig) error
SetOwnedRuntimeConfig replaces the snapshot used by future registration-set commits. Existing owner generations are unchanged.
type CommandConfig ¶ added in v0.27.0
type CommandConfig struct {
Execution CommandExecutionPolicy `json:"execution"`
RPC RPCCommandConfig `json:"rpc"`
}
CommandConfig controls command subsystem behavior.
type CommandExecutionPolicy ¶ added in v0.27.0
type CommandExecutionPolicy struct {
DefaultMode command.ExecutionMode `json:"default_mode"`
PerCommand map[string]command.ExecutionMode `json:"per_command"`
}
CommandExecutionPolicy controls dispatch mode resolution for name-based command dispatch.
func (CommandExecutionPolicy) Clone ¶ added in v0.27.0
func (p CommandExecutionPolicy) Clone() CommandExecutionPolicy
Clone returns a deep copy of the policy.
func (CommandExecutionPolicy) Resolve ¶ added in v0.27.0
func (p CommandExecutionPolicy) Resolve(commandID string) (command.ExecutionMode, bool)
Resolve returns the configured mode for a command id.
type CommandLauncherDiagnostic ¶ added in v0.97.0
type CommandLauncherSnapshot ¶ added in v0.97.0
type CommandLauncherSnapshot struct {
Commands []gocommand.CommandDescriptor `json:"commands"`
Diagnostics []CommandLauncherDiagnostic `json:"diagnostics,omitempty"`
}
type CommandRegistrationHandle ¶ added in v0.126.8
CommandRegistrationHandle owns one committed registration generation.
func RegisterDataCommands ¶ added in v0.139.0
func RegisterDataCommands(bus *CommandBus, service *data.Service) (CommandRegistrationHandle, error)
RegisterDataCommands owns the sole lifecycle handler/factory generation. The service resolves current trusted actor and delegated identity for every call.
type CommandRegistrationSet ¶ added in v0.126.8
type CommandRegistrationSet struct {
// contains filtered or unexported fields
}
CommandRegistrationSet stages one owner's handlers and factories before publishing them atomically to a CommandBus.
func (*CommandRegistrationSet) Commit ¶ added in v0.126.8
func (s *CommandRegistrationSet) Commit() (CommandRegistrationHandle, error)
Commit validates and publishes the complete owner generation.
type CommandRegistrationState ¶ added in v0.110.0
type CommandRegistrationState struct {
Handler bool
Factory bool
Dispatcher bool
ResultDispatcher bool
}
CommandRegistrationState describes how a command name can be dispatched.
func (CommandRegistrationState) CanDispatch ¶ added in v0.110.0
func (s CommandRegistrationState) CanDispatch() bool
CanDispatch reports whether the command can be executed by name.
func (CommandRegistrationState) Registered ¶ added in v0.110.0
func (s CommandRegistrationState) Registered() bool
Registered reports whether the command name is known to the command bus.
func (CommandRegistrationState) SupportsInlineResult ¶ added in v0.110.0
func (s CommandRegistrationState) SupportsInlineResult() bool
SupportsInlineResult reports whether the command can return an inline result.
type CommandResultFailureReporter ¶ added in v0.113.13
type CommandResultFailureReporter interface {
CommandResultFailure() error
}
CommandResultFailureReporter lets an inline command result report an operational failure while remaining available to outcome-aware callers. Dispatch APIs that discard inline results return this failure to the caller.
type CommandRunAtomicClearStore ¶ added in v0.124.0
type CommandRunAtomicClearStore interface {
SnapshotForCommandRunClear(context.Context, CommandRunSelector) (CommandRunClearSnapshot, error)
ClearCommandRunsIfUnchanged(context.Context, CommandRunSelector, uint64) (bool, error)
}
CommandRunAtomicClearStore closes the authorization/mutation race for stores whose base CommandRunStore clear operation is selector-wide. Implementations must compare version and mutate under one consistency boundary.
type CommandRunClearSnapshot ¶ added in v0.124.0
type CommandRunClearSnapshot struct {
Records []CommandRunRecord
Version uint64
}
CommandRunClearSnapshot is an isolated candidate set plus the opaque store version that produced it.
type CommandRunContractLimits ¶ added in v0.121.3
type CommandRunContractLimits struct {
MaxIDLength int
MaxTextLength int
MaxMetadataKeys int
MaxMetadataDepth int
MaxMetadataBytes int
MaxMetadataString int
}
CommandRunContractLimits bounds normalization at trust and transport boundaries.
func DefaultCommandRunContractLimits ¶ added in v0.121.3
func DefaultCommandRunContractLimits() CommandRunContractLimits
DefaultCommandRunContractLimits returns conservative contract limits.
type CommandRunDiagnosticStatus ¶ added in v0.121.3
type CommandRunDiagnosticStatus string
CommandRunDiagnosticStatus is a provider-neutral runtime readiness state.
const ( CommandRunDiagnosticDisabled CommandRunDiagnosticStatus = "disabled" CommandRunDiagnosticNotStarted CommandRunDiagnosticStatus = "not_started" CommandRunDiagnosticReady CommandRunDiagnosticStatus = "ready" CommandRunDiagnosticDegraded CommandRunDiagnosticStatus = "degraded" CommandRunDiagnosticClosed CommandRunDiagnosticStatus = "closed" )
type CommandRunDiagnostics ¶ added in v0.121.3
type CommandRunDiagnostics struct {
Enabled bool `json:"enabled"`
Role string `json:"role"`
Status CommandRunDiagnosticStatus `json:"status"`
Ready bool `json:"ready"`
Started bool `json:"started"`
Closed bool `json:"closed"`
Local bool `json:"local"`
Transport string `json:"transport"`
Capabilities CommandRunTransportCapabilities `json:"capabilities"`
PublishFailures uint64 `json:"publish_failures"`
SubscriptionFailures uint64 `json:"subscription_failures"`
RejectedEvents uint64 `json:"rejected_events"`
DroppedEvents uint64 `json:"dropped_events"`
ProjectionFailures uint64 `json:"projection_failures"`
ProjectionCount uint64 `json:"projection_count"`
OtherFailures uint64 `json:"other_failures"`
LastSuccessfulEventAt *time.Time `json:"last_successful_event_at,omitempty"`
LastFailureAt *time.Time `json:"last_failure_at,omitempty"`
LastFailureCode string `json:"last_failure_code,omitempty"`
}
CommandRunDiagnostics is a bounded, operator-safe runtime snapshot.
type CommandRunFailure ¶ added in v0.121.3
type CommandRunFailure struct {
Category string `json:"category,omitempty"`
Code string `json:"code,omitempty"`
}
CommandRunFailure is a bounded, operator-safe failure classification. It must not contain a raw error, stack trace, payload, or provider cause.
type CommandRunHandler ¶ added in v0.121.3
type CommandRunHandler func(context.Context, CommandRunUpdate) error
CommandRunHandler consumes one isolated update. Returning an error reports a delivery failure; publishers and command execution remain fail-open.
type CommandRunMemoryStoreConfig ¶ added in v0.121.3
type CommandRunMemoryStoreConfig struct {
Retention int
DedupeLimit int
ContractLimits CommandRunContractLimits
}
CommandRunMemoryStoreConfig controls independent record and event-ID bounds.
type CommandRunObserverBridge ¶ added in v0.121.3
type CommandRunObserverBridge struct {
// contains filtered or unexported fields
}
CommandRunObserverBridge maps go-command lifecycle events into the canonical go-admin contract and owns only its dispatcher observer registration.
func NewCommandRunObserverBridge ¶ added in v0.121.3
func NewCommandRunObserverBridge(config CommandRunObserverConfig) (*CommandRunObserverBridge, error)
func (*CommandRunObserverBridge) Close ¶ added in v0.121.3
func (b *CommandRunObserverBridge) Close()
Close unregisters the package-global observer. It is idempotent and the bridge may be started again without retaining duplicate callbacks.
func (*CommandRunObserverBridge) OnCommandRunEvent ¶ added in v0.121.3
func (b *CommandRunObserverBridge) OnCommandRunEvent(ctx context.Context, event command.CommandRunEvent) error
OnCommandRunEvent implements command.CommandRunObserver. Dispatcher treats returned errors as diagnostics and never changes command execution results.
func (*CommandRunObserverBridge) Start ¶ added in v0.121.3
func (b *CommandRunObserverBridge) Start(role CommandRunProcessRole) error
Start registers the bridge only for roles that publish command lifecycle. Repeated starts do not duplicate the package-global observer.
type CommandRunObserverConfig ¶ added in v0.121.3
type CommandRunObserverConfig struct {
Publisher CommandRunPublisher
PublishTimeout time.Duration
RevisionLimit int
ContractLimits CommandRunContractLimits
ApplicationID string
EnvironmentID string
ScopeResolver CommandRunScopeResolver
OnError func(error)
}
CommandRunObserverConfig configures lifecycle mapping and bounded publication.
type CommandRunOutcome ¶ added in v0.124.0
type CommandRunOutcome struct {
Summary string `json:"summary,omitempty"`
Fields map[string]any `json:"fields,omitempty"`
}
CommandRunOutcome is an explicitly approved operator-facing result projection. Fields are limited to named scalar values during normalization; generic Metadata is never promoted into this view.
type CommandRunPhase ¶ added in v0.121.3
type CommandRunPhase string
CommandRunPhase identifies one canonical command lifecycle transition.
const ( CommandRunPhaseSubmitted CommandRunPhase = "submitted" CommandRunPhaseStarted CommandRunPhase = "started" CommandRunPhaseCheckpoint CommandRunPhase = "checkpoint" CommandRunPhaseProgress CommandRunPhase = "progress" CommandRunPhaseSucceeded CommandRunPhase = "succeeded" CommandRunPhaseFailed CommandRunPhase = "failed" CommandRunPhaseCanceled CommandRunPhase = "canceled" CommandRunPhaseRejected CommandRunPhase = "rejected" )
func (CommandRunPhase) Terminal ¶ added in v0.121.3
func (p CommandRunPhase) Terminal() bool
Terminal reports whether later non-terminal updates must not regress this phase.
func (CommandRunPhase) Valid ¶ added in v0.121.3
func (p CommandRunPhase) Valid() bool
Valid reports whether the phase is part of the current schema.
type CommandRunProcessRole ¶ added in v0.121.3
type CommandRunProcessRole uint8
CommandRunProcessRole is a bitmask so publisher and gateway responsibilities can be assembled independently.
const ( CommandRunRolePublisher CommandRunProcessRole = 1 << iota CommandRunRoleGateway CommandRunRoleMonolith = CommandRunRolePublisher | CommandRunRoleGateway )
func (CommandRunProcessRole) Has ¶ added in v0.121.3
func (r CommandRunProcessRole) Has(role CommandRunProcessRole) bool
Has reports whether the role includes every requested responsibility.
func (CommandRunProcessRole) String ¶ added in v0.121.3
func (r CommandRunProcessRole) String() string
func (CommandRunProcessRole) Valid ¶ added in v0.121.3
func (r CommandRunProcessRole) Valid() bool
Valid reports whether the bitmask contains one or both known responsibilities.
type CommandRunProjection ¶ added in v0.121.3
type CommandRunProjection interface {
ProjectCommandRun(context.Context, CommandRunUpdate) (CommandRunRecord, bool, error)
}
CommandRunProjection applies one update and returns a complete row when the update changed current state.
type CommandRunProjectionFunc ¶ added in v0.121.3
type CommandRunProjectionFunc func(context.Context, CommandRunUpdate) (CommandRunRecord, bool, error)
CommandRunProjectionFunc adapts a function into CommandRunProjection.
func (CommandRunProjectionFunc) ProjectCommandRun ¶ added in v0.121.3
func (f CommandRunProjectionFunc) ProjectCommandRun(ctx context.Context, update CommandRunUpdate) (CommandRunRecord, bool, error)
type CommandRunProjector ¶ added in v0.121.3
type CommandRunProjector struct {
// contains filtered or unexported fields
}
CommandRunProjector validates updates before applying them to any store.
func NewCommandRunProjector ¶ added in v0.121.3
func NewCommandRunProjector(store CommandRunStore, limits CommandRunContractLimits) (*CommandRunProjector, error)
func (*CommandRunProjector) ProjectCommandRun ¶ added in v0.121.3
func (p *CommandRunProjector) ProjectCommandRun(ctx context.Context, update CommandRunUpdate) (CommandRunRecord, bool, error)
type CommandRunPublisher ¶ added in v0.121.3
type CommandRunPublisher interface {
PublishCommandRun(context.Context, CommandRunUpdate) error
}
CommandRunPublisher publishes canonical command-run updates.
type CommandRunRecord ¶ added in v0.121.3
type CommandRunRecord struct {
CommandRunUpdate
FirstOccurredAt time.Time `json:"first_occurred_at"`
UpdatedAt time.Time `json:"updated_at"`
}
CommandRunRecord is the complete current projection for one run. The embedded update is the latest accepted lifecycle state and marshals as a flat JSON row.
func (CommandRunRecord) Clone ¶ added in v0.121.3
func (r CommandRunRecord) Clone() CommandRunRecord
Clone returns an isolated snapshot row.
type CommandRunRecordAuthorizer ¶ added in v0.124.0
type CommandRunRecordAuthorizer interface {
AuthorizeCommandRunRecord(context.Context, CommandRunRecord) (bool, error)
}
CommandRunRecordAuthorizer provides an additive host policy for complete command-run records. The Command Runs panel applies catalog eligibility before this policy for known descriptors; hosts may only use it to further restrict eligible records or explicitly authorize otherwise unknown records.
type CommandRunRecordAuthorizerFunc ¶ added in v0.124.0
type CommandRunRecordAuthorizerFunc func(context.Context, CommandRunRecord) (bool, error)
CommandRunRecordAuthorizerFunc adapts a function into a record authorizer. A nil adapter fails closed.
func (CommandRunRecordAuthorizerFunc) AuthorizeCommandRunRecord ¶ added in v0.124.0
func (f CommandRunRecordAuthorizerFunc) AuthorizeCommandRunRecord(ctx context.Context, record CommandRunRecord) (bool, error)
type CommandRunRecordHandler ¶ added in v0.121.3
type CommandRunRecordHandler func(context.Context, CommandRunRecord) error
CommandRunRecordHandler receives a complete accepted projection row.
type CommandRunRuntime ¶ added in v0.121.3
type CommandRunRuntime struct {
// contains filtered or unexported fields
}
CommandRunRuntime composes observation, transport subscription, projection, and lifecycle ownership for one process role.
func NewCommandRunRuntime ¶ added in v0.121.3
func NewCommandRunRuntime(config CommandRunRuntimeConfig) (*CommandRunRuntime, error)
NewCommandRunRuntime resolves local defaults without starting injected drivers.
func (*CommandRunRuntime) Capabilities ¶ added in v0.121.3
func (r *CommandRunRuntime) Capabilities() CommandRunTransportCapabilities
func (*CommandRunRuntime) Close ¶ added in v0.121.3
func (r *CommandRunRuntime) Close(ctx context.Context) error
Close stops observation before subscriptions, waits within the configured bound, and closes only the runtime-owned local transport.
func (*CommandRunRuntime) Diagnostics ¶ added in v0.121.3
func (r *CommandRunRuntime) Diagnostics() CommandRunDiagnostics
Diagnostics returns an isolated, provider-neutral runtime snapshot.
func (*CommandRunRuntime) Publisher ¶ added in v0.121.3
func (r *CommandRunRuntime) Publisher() CommandRunPublisher
func (*CommandRunRuntime) Ready ¶ added in v0.121.3
func (r *CommandRunRuntime) Ready() <-chan struct{}
Ready closes after successful startup (or immediately when disabled).
func (*CommandRunRuntime) Start ¶ added in v0.121.3
func (r *CommandRunRuntime) Start(ctx context.Context) error
Start creates runtime-owned subscriptions and observer registrations. It is concurrency-safe and idempotent; external transports must already be ready.
func (*CommandRunRuntime) Store ¶ added in v0.121.3
func (r *CommandRunRuntime) Store() CommandRunStore
func (*CommandRunRuntime) Subscriber ¶ added in v0.121.3
func (r *CommandRunRuntime) Subscriber() CommandRunSubscriber
type CommandRunRuntimeConfig ¶ added in v0.121.3
type CommandRunRuntimeConfig struct {
Enabled bool `json:"enabled"`
Role CommandRunProcessRole `json:"role"`
Transport CommandRunTransport `json:"-"`
Publisher CommandRunPublisher `json:"-"`
Subscriber CommandRunSubscriber `json:"-"`
Store CommandRunStore `json:"-"`
Projection CommandRunProjection `json:"-"`
ApplicationID string `json:"application_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
Retention int `json:"retention,omitempty"`
DedupeLimit int `json:"dedupe_limit,omitempty"`
BufferSize int `json:"buffer_size,omitempty"`
PublishTimeout time.Duration `json:"publish_timeout,omitempty"`
CloseTimeout time.Duration `json:"close_timeout,omitempty"`
ContractLimits CommandRunContractLimits `json:"contract_limits"`
ScopeResolver CommandRunScopeResolver `json:"-"`
ScopeAuthorizer CommandRunScopeAuthorizer `json:"-"`
RecordAuthorizer CommandRunRecordAuthorizer `json:"-"`
OnProjected CommandRunRecordHandler `json:"-"`
OnError func(error) `json:"-"`
RequireFanout bool `json:"require_fanout,omitempty"`
RequireDurability bool `json:"require_durability,omitempty"`
RequireReplay bool `json:"require_replay,omitempty"`
}
CommandRunRuntimeConfig configures the go-admin-owned observer, subscriptions, projection, and local defaults. Injected publishers, subscribers, transports, and stores remain host-owned; the runtime closes only observer registrations and subscriptions it creates.
func DefaultCommandRunRuntimeConfig ¶ added in v0.121.3
func DefaultCommandRunRuntimeConfig() CommandRunRuntimeConfig
DefaultCommandRunRuntimeConfig returns a zero-service monolith configuration.
func NormalizeCommandRunRuntimeConfig ¶ added in v0.121.3
func NormalizeCommandRunRuntimeConfig(config CommandRunRuntimeConfig) (CommandRunRuntimeConfig, error)
NormalizeCommandRunRuntimeConfig applies local-safe defaults and validates role, ownership, and requested delivery semantics. Missing transport/store dependencies intentionally select runtime-owned local implementations later.
type CommandRunScope ¶ added in v0.121.3
type CommandRunScope struct {
ApplicationID string `json:"application_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
}
CommandRunScope carries trusted isolation identifiers. Values are opaque and case-sensitive; normalization only trims surrounding whitespace.
func (CommandRunScope) Empty ¶ added in v0.121.3
func (s CommandRunScope) Empty() bool
Empty reports whether no scope dimension is configured.
func (CommandRunScope) Normalize ¶ added in v0.121.3
func (s CommandRunScope) Normalize() CommandRunScope
Normalize returns a scope with whitespace removed from its opaque identifiers.
type CommandRunScopeAuthorizer ¶ added in v0.121.3
type CommandRunScopeAuthorizer interface {
CommandRunSelector(context.Context) (CommandRunSelector, error)
AuthorizeCommandRun(context.Context, CommandRunScope) (bool, error)
}
CommandRunScopeAuthorizer resolves one authenticated request selector and authorizes live event scopes through the same policy.
type CommandRunScopeAuthorizerFuncs ¶ added in v0.121.3
type CommandRunScopeAuthorizerFuncs struct {
Selector func(context.Context) (CommandRunSelector, error)
Authorize func(context.Context, CommandRunScope) (bool, error)
}
CommandRunScopeAuthorizerFuncs adapts request-scoped functions into an authorizer.
func (CommandRunScopeAuthorizerFuncs) AuthorizeCommandRun ¶ added in v0.121.3
func (f CommandRunScopeAuthorizerFuncs) AuthorizeCommandRun(ctx context.Context, scope CommandRunScope) (bool, error)
func (CommandRunScopeAuthorizerFuncs) CommandRunSelector ¶ added in v0.121.3
func (f CommandRunScopeAuthorizerFuncs) CommandRunSelector(ctx context.Context) (CommandRunSelector, error)
type CommandRunScopeResolver ¶ added in v0.121.3
type CommandRunScopeResolver interface {
ResolveCommandRunScope(context.Context, CommandRunUpdate) (CommandRunScope, error)
}
CommandRunScopeResolver derives trusted scope before an update crosses a transport boundary. Implementations must not trust command payload fields.
type CommandRunScopeResolverFunc ¶ added in v0.121.3
type CommandRunScopeResolverFunc func(context.Context, CommandRunUpdate) (CommandRunScope, error)
CommandRunScopeResolverFunc adapts a function into CommandRunScopeResolver.
func (CommandRunScopeResolverFunc) ResolveCommandRunScope ¶ added in v0.121.3
func (f CommandRunScopeResolverFunc) ResolveCommandRunScope(ctx context.Context, update CommandRunUpdate) (CommandRunScope, error)
type CommandRunSelector ¶ added in v0.121.3
type CommandRunSelector struct {
Scope CommandRunScope `json:"scope"`
Global bool `json:"global,omitempty"`
}
CommandRunSelector limits records and live updates to an authorized scope. Global must be granted explicitly; an empty selector matches only unscoped data.
func (CommandRunSelector) Matches ¶ added in v0.121.3
func (s CommandRunSelector) Matches(scope CommandRunScope) bool
Matches reports whether a trusted scope is visible through this selector. A missing selector dimension never grants access to data scoped by that dimension.
func (CommandRunSelector) Normalize ¶ added in v0.121.3
func (s CommandRunSelector) Normalize() CommandRunSelector
Normalize returns a selector with a normalized scope.
func (CommandRunSelector) Validate ¶ added in v0.121.3
func (s CommandRunSelector) Validate() error
Validate rejects global selectors combined with narrower filters.
type CommandRunStore ¶ added in v0.121.3
type CommandRunStore interface {
Apply(context.Context, CommandRunUpdate) (CommandRunRecord, bool, error)
List(context.Context, CommandRunSelector) ([]CommandRunRecord, error)
Clear(context.Context, CommandRunSelector) error
}
CommandRunStore persists the complete current projection independently from transient transport delivery. Implementations must return isolated records.
type CommandRunSubscriber ¶ added in v0.121.3
type CommandRunSubscriber interface {
SubscribeCommandRuns(context.Context, CommandRunSelector, CommandRunHandler) (CommandRunSubscription, error)
}
CommandRunSubscriber creates scope-limited command-run subscriptions.
type CommandRunSubscription ¶ added in v0.121.3
type CommandRunSubscription interface {
Ready() <-chan struct{}
Errors() <-chan error
Close(context.Context) error
}
CommandRunSubscription is owned by the runtime that creates it. Closing a subscription must not close an injected driver, router, or transport.
type CommandRunTransport ¶ added in v0.121.3
type CommandRunTransport interface {
CommandRunPublisher
CommandRunSubscriber
Capabilities() CommandRunTransportCapabilities
}
CommandRunTransport combines publishing, subscribing, and capability reporting.
type CommandRunTransportCapabilities ¶ added in v0.121.3
type CommandRunTransportCapabilities struct {
Name string `json:"name"`
Fanout bool `json:"fanout"`
Durability CommandRunTransportDurability `json:"durability"`
Replay bool `json:"replay"`
}
CommandRunTransportCapabilities describes delivery semantics for validation and diagnostics without exposing provider-specific types.
func DefaultLocalCommandRunTransportCapabilities ¶ added in v0.121.3
func DefaultLocalCommandRunTransportCapabilities() CommandRunTransportCapabilities
DefaultLocalCommandRunTransportCapabilities describes the zero-service hub.
func (CommandRunTransportCapabilities) Validate ¶ added in v0.121.3
func (c CommandRunTransportCapabilities) Validate() error
Validate rejects incomplete or contradictory capability declarations.
type CommandRunTransportDurability ¶ added in v0.121.3
type CommandRunTransportDurability string
CommandRunTransportDurability describes whether transport delivery survives process or broker interruption. Snapshot persistence remains a store concern.
const ( CommandRunTransportDurabilityEphemeral CommandRunTransportDurability = "ephemeral" CommandRunTransportDurabilityDurable CommandRunTransportDurability = "durable" )
type CommandRunUpdate ¶ added in v0.121.3
type CommandRunUpdate struct {
SchemaVersion int `json:"schema_version"`
EventID string `json:"event_id"`
RunID string `json:"run_id"`
Revision uint64 `json:"revision"`
CommandID string `json:"command_id"`
DispatchID string `json:"dispatch_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
Phase CommandRunPhase `json:"phase"`
OccurredAt time.Time `json:"occurred_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
DurationMS *int64 `json:"duration_ms,omitempty"`
Mode string `json:"mode,omitempty"`
Checkpoint string `json:"checkpoint,omitempty"`
Message string `json:"message,omitempty"`
Current *int64 `json:"current,omitempty"`
Total *int64 `json:"total,omitempty"`
Attempt int `json:"attempt,omitempty"`
MaxAttempts int `json:"max_attempts,omitempty"`
Failure *CommandRunFailure `json:"failure,omitempty"`
Outcome *CommandRunOutcome `json:"outcome,omitempty"`
Scope CommandRunScope `json:"scope"`
Metadata map[string]any `json:"metadata,omitempty"`
}
CommandRunUpdate is the transport-independent versioned lifecycle delta.
func NormalizeCommandRunUpdate ¶ added in v0.121.3
func NormalizeCommandRunUpdate(update CommandRunUpdate, limits CommandRunContractLimits) (CommandRunUpdate, error)
NormalizeCommandRunUpdate validates and normalizes a command-run update.
func (CommandRunUpdate) Clone ¶ added in v0.121.3
func (u CommandRunUpdate) Clone() CommandRunUpdate
Clone returns a deep copy across ownership boundaries.
type CommandRunsDebugPanel ¶ added in v0.121.3
type CommandRunsDebugPanel struct {
// contains filtered or unexported fields
}
CommandRunsDebugPanel exposes scoped command-run snapshots and lookup.
func NewCommandRunsDebugPanel ¶ added in v0.121.3
func NewCommandRunsDebugPanel(adm *Admin) *CommandRunsDebugPanel
func (*CommandRunsDebugPanel) Clear ¶ added in v0.121.3
func (p *CommandRunsDebugPanel) Clear(ctx context.Context) error
Clear removes records only after repeating the complete authorization preflight immediately before the scope-wide store mutation.
func (*CommandRunsDebugPanel) ClearCheck ¶ added in v0.124.0
func (p *CommandRunsDebugPanel) ClearCheck(ctx context.Context) error
ClearCheck rejects scope-wide clear when any selected record is hidden.
func (*CommandRunsDebugPanel) Lookup ¶ added in v0.121.3
func (p *CommandRunsDebugPanel) Lookup(ctx context.Context, id string) (CommandRunRecord, bool, error)
Lookup resolves an authorized row by run ID, dispatch ID, then correlation ID.
func (*CommandRunsDebugPanel) Snapshot ¶ added in v0.121.3
func (p *CommandRunsDebugPanel) Snapshot(ctx context.Context) CommandRunsSnapshot
Snapshot returns only records visible to the authenticated request selector.
type CommandRunsSnapshot ¶ added in v0.121.3
type CommandRunsSnapshot []CommandRunRecord
CommandRunsSnapshot is the stable Command Runs panel snapshot payload. Every element is a complete row suitable for keyed replacement by run_id.
type CommandStatusEvent ¶ added in v0.99.0
type CommandStatusEvent struct {
RunID string `json:"run_id,omitempty"`
Revision uint64 `json:"revision,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
DispatchID string `json:"dispatch_id,omitempty"`
CommandID string `json:"command_id,omitempty"`
State string `json:"state"`
Mode string `json:"mode,omitempty"`
Message string `json:"message,omitempty"`
Code string `json:"code,omitempty"`
StatusReference string `json:"status_reference,omitempty"`
At string `json:"at,omitempty"`
}
CommandStatusEvent is broadcast over the debug WebSocket when a command is dispatched or transitions state, so the launcher reflects live status across every connected debug client. Host queue/async workers may publish these directly (see Admin.PublishCommandStatus) to report true completion of queued commands, which core go-admin cannot observe on its own.
type Config ¶
type Config struct {
Title string `json:"title"`
BasePath string `json:"base_path"`
URLs URLConfig `json:"urls"`
DefaultLocale string `json:"default_locale"`
Theme string `json:"theme"`
ThemeVariant string `json:"theme_variant"`
ThemeTokens map[string]string `json:"theme_tokens"`
ThemeTokenOverrides map[string]string `json:"theme_token_overrides,omitempty"`
// ThemeAssets carries final resolved asset URLs/paths that override themed assets
// after go-theme selection. Use reserved keys like "logo", "icon", and "favicon".
ThemeAssets map[string]string `json:"theme_assets,omitempty"`
ThemeAssetPrefix string `json:"theme_asset_prefix"`
PreviewSecret string `json:"preview_secret"`
PreviewURLAllowedHosts []string `json:"preview_url_allowed_hosts,omitempty"`
CMSConfig any `json:"cms_config"`
CMS CMSOptions `json:"cms"`
Debug DebugConfig `json:"debug"`
Errors ErrorConfig `json:"errors"`
Deployment DeploymentIdentityConfig `json:"deployment"`
// LogoURL is the legacy override for the expanded/admin lockup asset.
// Prefer ThemeAssets["logo"] for new integrations.
LogoURL string `json:"logo_url"`
// FaviconURL is the legacy override for the browser/app icon asset.
// Prefer ThemeAssets["favicon"] for new integrations.
FaviconURL string `json:"favicon_url"`
CustomCSS string `json:"custom_css"`
CustomJS string `json:"custom_js"`
// LoginLogoPlacement changes only the login page composition. The selected
// theme continues to own the logo/icon assets. Empty defaults to
// "outside-card" for backward compatibility.
LoginLogoPlacement LoginLogoPlacement `json:"login_logo_placement,omitempty"`
// SidebarHideSearch removes the sidebar search slot from the admin shell.
// It defaults to false so existing consumers keep the search field; set it
// when the approved navigation design has no search affordance.
SidebarHideSearch bool `json:"sidebar_hide_search,omitempty"`
// SidebarCollapsePlacement moves the existing desktop collapse action
// without changing its interaction contract. Empty defaults to "header".
SidebarCollapsePlacement SidebarCollapsePlacement `json:"sidebar_collapse_placement,omitempty"`
// SidebarUseInitialsAvatar keeps an empty avatar URL so the shared template
// renders the identity initials fallback instead of the packaged image.
SidebarUseInitialsAvatar bool `json:"sidebar_use_initials_avatar,omitempty"`
// SidebarHidePresence suppresses the optional online/presence indicator.
SidebarHidePresence bool `json:"sidebar_hide_presence,omitempty"`
// SidebarHideUserMenuIndicator suppresses the optional disclosure arrow.
SidebarHideUserMenuIndicator bool `json:"sidebar_hide_user_menu_indicator,omitempty"`
SidebarCompactFooter bool `json:"sidebar_compact_footer,omitempty"`
// DisabledDefaultModules lets hosts omit built-in product surfaces that are
// outside their approved application composition. Empty preserves all
// legacy default-module behavior.
DisabledDefaultModules []DefaultModuleID `json:"disabled_default_modules,omitempty"`
// ExternalAssets overrides the packaged third-party stylesheets and scripts
// the admin document loads. Empty fields use the pinned copies embedded in
// go-admin, so the default shell has no public-CDN dependency.
ExternalAssets ExternalAssetConfig `json:"external_assets"`
SettingsPermission string `json:"settings_permission"`
SettingsUpdatePermission string `json:"settings_update_permission"`
FeatureFlagsViewPermission string `json:"feature_flags_view_permission"`
FeatureFlagsUpdatePermission string `json:"feature_flags_update_permission"`
SettingsThemeTokens map[string]string `json:"settings_theme_tokens"`
NotificationsPermission string `json:"notifications_permission"`
NotificationsUpdatePermission string `json:"notifications_update_permission"`
NotificationsInspectPermission string `json:"notifications_inspect_permission"`
NotificationsReceiptPermission string `json:"notifications_receipt_permission"`
NotificationsRetentionPurgePermission string `json:"notifications_retention_purge_permission"`
ActivityPermission string `json:"activity_permission"`
// ActivityTabPermissionFailureMode controls how users detail activity tab handles
// activity permission failures. Supported values:
// - "strict": return a 403 error
// - "inline": render tab-level unavailable state
// - "": auto mode (strict in dev, inline otherwise)
ActivityTabPermissionFailureMode string `json:"activity_tab_permission_failure_mode"`
ActivityActionLabels map[string]string `json:"activity_action_labels"`
ActivityFilterOptions ActivityFilterOptionsConfig `json:"activity_filter_options"`
JobsPermission string `json:"jobs_permission"`
JobsTriggerPermission string `json:"jobs_trigger_permission"`
PreferencesPermission string `json:"preferences_permission"`
PreferencesUpdatePermission string `json:"preferences_update_permission"`
DashboardPreferencesPermission string `json:"dashboard_preferences_permission"`
DashboardPreferencesUpdatePermission string `json:"dashboard_preferences_update_permission"`
PreferencesManageTenantPermission string `json:"preferences_manage_tenant_permission"`
PreferencesManageOrgPermission string `json:"preferences_manage_org_permission"`
PreferencesManageSystemPermission string `json:"preferences_manage_system_permission"`
ProfilePermission string `json:"profile_permission"`
ProfileUpdatePermission string `json:"profile_update_permission"`
UsersPermission string `json:"users_permission"`
UsersCreatePermission string `json:"users_create_permission"`
UsersImportPermission string `json:"users_import_permission"`
UsersUpdatePermission string `json:"users_update_permission"`
UsersDeletePermission string `json:"users_delete_permission"`
RolesPermission string `json:"roles_permission"`
RolesCreatePermission string `json:"roles_create_permission"`
RolesUpdatePermission string `json:"roles_update_permission"`
RolesDeletePermission string `json:"roles_delete_permission"`
TenantsPermission string `json:"tenants_permission"`
TenantsCreatePermission string `json:"tenants_create_permission"`
TenantsUpdatePermission string `json:"tenants_update_permission"`
TenantsDeletePermission string `json:"tenants_delete_permission"`
OrganizationsPermission string `json:"organizations_permission"`
OrganizationsCreatePermission string `json:"organizations_create_permission"`
OrganizationsUpdatePermission string `json:"organizations_update_permission"`
OrganizationsDeletePermission string `json:"organizations_delete_permission"`
MenuBuilderPermission string `json:"menu_builder_permission"`
MenuBuilderEditPermission string `json:"menu_builder_edit_permission"`
MenuBuilderPublishPermission string `json:"menu_builder_publish_permission"`
MediaPermission string `json:"media_permission"`
MediaCreatePermission string `json:"media_create_permission"`
MediaUpdatePermission string `json:"media_update_permission"`
MediaDeletePermission string `json:"media_delete_permission"`
MediaDelivery MediaDeliveryConfig `json:"media_delivery"`
AuthConfig *AuthConfig `json:"auth_config"`
EnhancedActions EnhancedActionNegotiationConfig `json:"enhanced_actions"`
// Empty values fall back to Debug.Environment, then "default".
NavEnvironment string `json:"nav_environment"`
// hidden or retained as disabled diagnostics. Empty and unknown values
// normalize to "hide".
NavPermissionDeniedMode NavigationPermissionDeniedMode `json:"nav_permission_denied_mode"`
// Empty auto mode is strict in dev/test-like environments and report-only
// otherwise. Explicit "strict" and "report" override auto behavior.
NavRouteMissingPolicy NavigationRouteMissingPolicy `json:"nav_route_missing_policy"`
FeatureFlagKeys []string `json:"feature_flag_keys"`
FeatureCatalogPath string `json:"feature_catalog_path"`
EnablePublicAPI bool `json:"enable_public_api"`
Site SiteConfig `json:"site"`
ScopeMode string `json:"scope_mode"`
DefaultTenantID string `json:"default_tenant_id"`
DefaultOrgID string `json:"default_org_id"`
Commands CommandConfig `json:"commands"`
Routing routing.Config `json:"routing"`
}
Config holds core admin settings and feature flags.
type ConsoleAccess ¶ added in v0.139.0
type ConsoleAccess struct {
Resolve func(context.Context, console.Identity) (context.Context, console.Identity, error)
Read func(context.Context, console.Identity) error
Panel func(context.Context, console.Identity, console.PanelDefinition) bool
Action func(context.Context, console.Identity, string, string) bool
Record func(context.Context, console.Identity, string, console.Record) bool
Project func(context.Context, console.Identity, string, console.Record) console.Record
}
ConsoleAccess resolves current identity/grants on every operation and idle delivery tick. Resolve must consult current trusted session/account state; returning the original request's claims without revalidation is insufficient. Resolve must derive its returned context from the supplied context to retain request cancellation, snapshot deadlines and host shutdown.
type ConsoleDashboardConfig ¶ added in v0.139.0
type ConsoleDashboardConfig struct {
Identity func(AdminContext) (console.Identity, error)
WidgetTemplate string
}
ConsoleDashboardConfig adapts the existing dashboard renderer and providers. Identity must resolve trusted viewer scope; the host then reloads current grants.
type ConsoleHost ¶ added in v0.139.0
type ConsoleHost struct {
// contains filtered or unexported fields
}
ConsoleHost owns delivery and lifecycle, not the router or application's bus. Routes are registered once at startup; Close denies handlers without unmounting.
func NewConsoleHost ¶ added in v0.139.0
func NewConsoleHost(config ConsoleHostConfig) (*ConsoleHost, error)
func (*ConsoleHost) Close ¶ added in v0.139.0
func (h *ConsoleHost) Close() error
func (*ConsoleHost) DashboardArea ¶ added in v0.139.0
func (h *ConsoleHost) DashboardArea() string
func (*ConsoleHost) DashboardPage ¶ added in v0.139.0
func (h *ConsoleHost) DashboardPage(viewer AdminContext, identity console.Identity, template string) (AdminDashboardPage, error)
DashboardPage isolates layout preferences by the same full identity as records. It uses the existing service, renderer and typed page/chrome adapter.
func (*ConsoleHost) Events ¶ added in v0.139.0
func (h *ConsoleHost) Events() *console.EventStream
func (*ConsoleHost) Manifest ¶ added in v0.139.0
func (h *ConsoleHost) Manifest() ModuleManifest
func (*ConsoleHost) Register ¶ added in v0.139.0
func (h *ConsoleHost) Register(ctx ModuleContext) error
func (*ConsoleHost) RegisterDashboard ¶ added in v0.139.0
func (h *ConsoleHost) RegisterDashboard(admin *Admin, config ConsoleDashboardConfig) error
RegisterDashboard registers before Admin.Initialize. Areas and providers are instance-namespaced; a collision fails instead of replacing another callback.
func (*ConsoleHost) RouteContract ¶ added in v0.139.0
func (h *ConsoleHost) RouteContract() routing.ModuleContract
func (*ConsoleHost) RunAction ¶ added in v0.139.0
func (h *ConsoleHost) RunAction(ctx context.Context, identity console.Identity, request console.PanelActionRequest) (console.PanelActionResult, error)
func (*ConsoleHost) SaveDashboardLayout ¶ added in v0.139.0
func (h *ConsoleHost) SaveDashboardLayout(ctx context.Context, identity console.Identity, overrides dashcmp.LayoutOverrides) error
func (*ConsoleHost) Watch ¶ added in v0.139.0
func (h *ConsoleHost) Watch(ctx context.Context, identity console.Identity, panels []string, send func(any) error) error
Watch is the shared page/dashboard delivery adapter. Subscription precedes loading the snapshot; newer events are buffered. Every reconnect loads a fresh authorized snapshot, so no client cursor can replay retained foreign records.
type ConsoleHostConfig ¶ added in v0.139.0
type ConsoleHostConfig struct {
ID, Title, FeatureKey string
// RouteNamespace defaults to ID and isolates named routes from module identity.
RouteNamespace string
Registry *console.PanelRegistry
Events *console.EventStream
Access ConsoleAccess
Enabled func() bool
RequestIdentity func(router.Context) (console.Identity, error)
Snapshot console.SnapshotSource
Lookup console.LookupSource
RenderPage func(router.Context, console.Bootstrap) error
PreferencesNamespace string
LoadPreferences func(context.Context, string) ([]string, error)
SavePreferences func(context.Context, string, []string) error
RevalidateInterval time.Duration
SnapshotTimeout time.Duration
// Invalidated may be a broadcast host signal. Idle checks remain mandatory.
Invalidated <-chan struct{}
}
ConsoleHostConfig composes services and policy with an independent console. Page rendering remains an adapter so shared hosting never owns product markup.
type ConsolePanelWidgetPayload ¶ added in v0.139.0
type ConsolePanelWidgetPayload struct {
console.Identity
Panel console.PanelSnapshot `json:"panel"`
Watermark uint64 `json:"watermark"`
}
type ContentPreviewPathOptions ¶ added in v0.96.0
type ContentPreviewPathOptions struct {
// AllowSlugFallback permits deriving a public preview path from record.slug.
// Callers should only enable this for routed/deliverable content types.
AllowSlugFallback bool
}
ContentPreviewPathOptions controls how preview URLs are inferred from content records when no explicit path or preview_url is present.
type ContentTranslation ¶ added in v0.24.0
type ContentTranslation = cmsinterfaces.ContentTranslation
ContentTranslation mirrors the go-cms content translation DTO.
type ContentTypeBuilderModule ¶ added in v0.23.0
type ContentTypeBuilderModule struct {
// contains filtered or unexported fields
}
ContentTypeBuilderModule wires the content type builder UI and dynamic panels.
func NewContentTypeBuilderModule ¶ added in v0.23.0
func NewContentTypeBuilderModule(opts ...ContentTypeBuilderOption) *ContentTypeBuilderModule
NewContentTypeBuilderModule constructs a content type builder module.
func (*ContentTypeBuilderModule) AfterMenuSeed ¶ added in v0.24.0
func (m *ContentTypeBuilderModule) AfterMenuSeed(ctx context.Context, admin *Admin) error
AfterMenuSeed refreshes panels/navigation after menu seeding.
func (*ContentTypeBuilderModule) Manifest ¶ added in v0.23.0
func (m *ContentTypeBuilderModule) Manifest() ModuleManifest
Manifest describes the module metadata.
func (*ContentTypeBuilderModule) MenuItems ¶ added in v0.23.0
func (m *ContentTypeBuilderModule) MenuItems(locale string) []MenuItem
MenuItems contributes navigation for content modeling. TODO: we should be able to configure menu icons
func (*ContentTypeBuilderModule) Register ¶ added in v0.23.0
func (m *ContentTypeBuilderModule) Register(ctx ModuleContext) error
Register wires the module panels, commands, and dynamic panel registration.
func (*ContentTypeBuilderModule) RouteContract ¶ added in v0.27.0
func (m *ContentTypeBuilderModule) RouteContract() routing.ModuleContract
type ContentTypeBuilderOption ¶ added in v0.23.0
type ContentTypeBuilderOption func(*ContentTypeBuilderModule)
ContentTypeBuilderOption configures the content type builder module.
func WithContentTypeBuilderBasePath ¶ added in v0.23.0
func WithContentTypeBuilderBasePath(path string) ContentTypeBuilderOption
WithContentTypeBuilderBasePath configures the module base path.
func WithContentTypeBuilderEntryMenuParent ¶ added in v0.24.0
func WithContentTypeBuilderEntryMenuParent(menuParent string) ContentTypeBuilderOption
WithContentTypeBuilderEntryMenuParent configures the menu parent for content type entry panels.
func WithContentTypeBuilderGuardrails ¶ added in v0.23.0
func WithContentTypeBuilderGuardrails(guardrails *SchemaGuardrails) ContentTypeBuilderOption
WithContentTypeBuilderGuardrails sets custom schema guardrails.
func WithContentTypeBuilderMenu ¶ added in v0.23.0
func WithContentTypeBuilderMenu(menuCode, menuParent string) ContentTypeBuilderOption
WithContentTypeBuilderMenu configures the menu code + parent.
func WithContentTypeBuilderPanelFactory ¶ added in v0.23.0
func WithContentTypeBuilderPanelFactory(factory *DynamicPanelFactory) ContentTypeBuilderOption
WithContentTypeBuilderPanelFactory injects a custom panel factory.
func WithContentTypeBuilderPermission ¶ added in v0.23.0
func WithContentTypeBuilderPermission(permission string) ContentTypeBuilderOption
WithContentTypeBuilderPermission sets the module permission guard.
func WithContentTypeBuilderPreviewFallback ¶ added in v0.24.0
func WithContentTypeBuilderPreviewFallback(fallback SchemaPreviewFallback) ContentTypeBuilderOption
WithContentTypeBuilderPreviewFallback sets a fallback renderer for preview errors.
func WithContentTypeBuilderRateLimiter ¶ added in v0.23.0
func WithContentTypeBuilderRateLimiter(limiter *RateLimiter) ContentTypeBuilderOption
WithContentTypeBuilderRateLimiter sets a custom rate limiter.
func WithContentTypeBuilderSchemaValidator ¶ added in v0.23.0
func WithContentTypeBuilderSchemaValidator(validator SchemaValidator) ContentTypeBuilderOption
WithContentTypeBuilderSchemaValidator injects a schema validator.
func WithContentTypeBuilderWorkflow ¶ added in v0.24.0
func WithContentTypeBuilderWorkflow(workflow WorkflowEngine) ContentTypeBuilderOption
WithContentTypeBuilderWorkflow sets a workflow engine for content type builder panels.
func WithContentTypeBuilderWorkflowAuthorizer ¶ added in v0.24.0
func WithContentTypeBuilderWorkflowAuthorizer(authorizer WorkflowAuthorizer) ContentTypeBuilderOption
WithContentTypeBuilderWorkflowAuthorizer sets a workflow authorizer for builder panels.
type ContentTypeCapabilityContracts ¶ added in v0.26.0
type ContentTypeCapabilityContracts struct {
Normalized map[string]any `json:"normalized"`
Delivery map[string]any `json:"delivery"`
Search map[string]any `json:"search"`
Validation map[string]string `json:"validation"`
MigratedDeliveryMenu bool `json:"migrated_delivery_menu"`
}
ContentTypeCapabilityContracts captures normalized capability payloads and validation metadata used by admin and quickstart callers.
func ParseContentTypeCapabilityContracts ¶ added in v0.26.0
func ParseContentTypeCapabilityContracts(capabilities map[string]any) ContentTypeCapabilityContracts
ParseContentTypeCapabilityContracts resolves normalized capability contracts from a raw capabilities payload.
func ReadContentTypeCapabilityContracts ¶ added in v0.26.0
func ReadContentTypeCapabilityContracts(contentType CMSContentType) ContentTypeCapabilityContracts
ReadContentTypeCapabilityContracts resolves normalized capability contracts from a full CMS content type payload.
type ContentTypeCreateMsg ¶ added in v0.23.0
type ContentTypeCreateMsg struct {
ContentType CMSContentType `json:"content_type"`
}
ContentTypeCreateMsg is a command payload for creating content types.
func (ContentTypeCreateMsg) Type ¶ added in v0.23.0
func (ContentTypeCreateMsg) Type() string
func (ContentTypeCreateMsg) Validate ¶ added in v0.23.0
func (m ContentTypeCreateMsg) Validate() error
type ContentTypeDeleteMsg ¶ added in v0.23.0
type ContentTypeDeleteMsg struct {
ID string `json:"id"`
}
ContentTypeDeleteMsg is a command payload for deleting content types.
func (ContentTypeDeleteMsg) Type ¶ added in v0.23.0
func (ContentTypeDeleteMsg) Type() string
func (ContentTypeDeleteMsg) Validate ¶ added in v0.23.0
func (m ContentTypeDeleteMsg) Validate() error
type ContentTypePublishMsg ¶ added in v0.23.0
type ContentTypePublishMsg struct {
ID string `json:"id"`
Status string `json:"status"`
AllowBreakingChanges bool `json:"allow_breaking_changes"`
}
ContentTypePublishMsg is a command payload for publishing content types.
func (ContentTypePublishMsg) Type ¶ added in v0.23.0
func (ContentTypePublishMsg) Type() string
func (ContentTypePublishMsg) Validate ¶ added in v0.23.0
func (m ContentTypePublishMsg) Validate() error
type ContentTypeUpdateMsg ¶ added in v0.23.0
type ContentTypeUpdateMsg struct {
ContentType CMSContentType `json:"content_type"`
}
ContentTypeUpdateMsg is a command payload for updating content types.
func (ContentTypeUpdateMsg) Type ¶ added in v0.23.0
func (ContentTypeUpdateMsg) Type() string
func (ContentTypeUpdateMsg) Validate ¶ added in v0.23.0
func (m ContentTypeUpdateMsg) Validate() error
type ContextMessageFactory ¶ added in v0.126.8
type ContextMessageFactory func(ctx context.Context, payload map[string]any, ids []string) (command.Message, error)
ContextMessageFactory builds typed command messages from request data and the effective dispatch context.
type ConvertedFields ¶ added in v0.23.0
type ConvertedFields struct {
List []Field `json:"list"`
Form []Field `json:"form"`
Detail []Field `json:"detail"`
Filters []Filter `json:"filters"`
}
ConvertedFields captures the derived list/form/detail fields and filters.
type CountTranslator ¶ added in v0.52.0
type CountTranslator interface {
TranslateCount(locale, key string, count int, args ...any) (string, error)
}
CountTranslator resolves pluralized i18n keys into localized strings. Implementations can opt into this richer contract without replacing the baseline Translator interface.
type CurrentContextResolver ¶ added in v0.139.0
type CurrentContextResolver interface {
ResolveCurrentContext(context.Context) (context.Context, error)
}
CurrentContextResolver is an optional authenticator capability for long-lived delivery. It reloads current account/session/grants from trusted host state.
type CustomLogEntry ¶ added in v0.14.0
type CustomLogEntry struct {
Timestamp time.Time `json:"timestamp"`
Category string `json:"category"`
Message string `json:"message"`
Fields map[string]any `json:"fields,omitempty"`
}
CustomLogEntry captures custom debug logs.
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard orchestrates widget providers and instances.
func NewDashboard ¶
func NewDashboard() *Dashboard
NewDashboard constructs a dashboard registry with in-memory defaults.
func (*Dashboard) AddDefaultInstance ¶
func (d *Dashboard) AddDefaultInstance(area, defCode string, cfg map[string]any, span int, locale string)
AddDefaultInstance stores a default widget instance (used when no CMS/prefs are present).
func (*Dashboard) Areas ¶
func (d *Dashboard) Areas() []WidgetAreaDefinition
Areas returns known widget areas sorted by code.
func (*Dashboard) EnforceKnownAreas ¶
EnforceKnownAreas toggles validation to prevent default instances from using unknown areas.
func (*Dashboard) HasProvider ¶ added in v0.28.0
HasProvider reports whether a provider with the given code is already registered.
func (*Dashboard) HasRenderer ¶
HasRenderer returns true if a renderer is configured.
func (*Dashboard) Page ¶ added in v0.34.0
func (d *Dashboard) Page(ctx AdminContext) (dashcmp.Page, error)
Page resolves the canonical typed dashboard page for the current viewer.
func (*Dashboard) Providers ¶
func (d *Dashboard) Providers() []DashboardProviderSpec
Providers returns registered provider metadata.
func (*Dashboard) RegisterArea ¶
func (d *Dashboard) RegisterArea(def WidgetAreaDefinition)
RegisterArea registers a dashboard widget area for provider/default-instance use.
func (*Dashboard) RegisterManifest ¶
func (d *Dashboard) RegisterManifest(providers []DashboardProviderSpec)
RegisterManifest bulk registers providers (lightweight manifest discovery hook).
func (*Dashboard) RegisterProvider ¶
func (d *Dashboard) RegisterProvider(spec DashboardProviderSpec)
RegisterProvider registers a widget provider and optional default instance.
Invalid specifications retain the historical best-effort behavior and are ignored. Hosts that need registration failures surfaced during startup should use RegisterProviderChecked.
func (*Dashboard) RegisterProviderChecked ¶ added in v0.126.7
func (d *Dashboard) RegisterProviderChecked(spec DashboardProviderSpec) error
RegisterProviderChecked registers a widget provider and reports invalid provider metadata to the host.
func (*Dashboard) Resolve ¶
func (d *Dashboard) Resolve(ctx AdminContext) ([]map[string]any, error)
Resolve returns widgets for a viewer, applying per-user preferences when present.
func (*Dashboard) SetUserLayout ¶
func (d *Dashboard) SetUserLayout(userID string, instances []DashboardWidgetInstance)
SetUserLayout stores per-user layout/preferences.
func (*Dashboard) SetUserLayoutWithContext ¶
func (d *Dashboard) SetUserLayoutWithContext(ctx AdminContext, instances []DashboardWidgetInstance)
SetUserLayoutWithContext stores layouts with actor metadata for activity sinks.
func (*Dashboard) WithActivitySink ¶
func (d *Dashboard) WithActivitySink(sink ActivitySink)
WithActivitySink wires an activity sink for layout or widget changes.
func (*Dashboard) WithAuthorizer ¶
func (d *Dashboard) WithAuthorizer(authz Authorizer)
WithAuthorizer sets the authorizer for role/permission visibility.
func (*Dashboard) WithCommandBus ¶
func (d *Dashboard) WithCommandBus(bus *CommandBus)
WithCommandBus wires the command bus so providers can expose commands.
func (*Dashboard) WithLogger ¶ added in v0.25.0
WithLogger sets the runtime logger used by dashboard internals.
func (*Dashboard) WithPreferenceService ¶
func (d *Dashboard) WithPreferenceService(service *PreferencesService)
WithPreferenceService wires the PreferencesService used for go-dashboard overrides.
func (*Dashboard) WithPreferences ¶
func (d *Dashboard) WithPreferences(store DashboardPreferences)
WithPreferences sets the preference store used for per-user layouts.
func (*Dashboard) WithRegistry ¶
WithRegistry wires the shared registry for discovery/use by other transports.
func (*Dashboard) WithRenderer ¶
func (d *Dashboard) WithRenderer(renderer DashboardRenderer)
WithRenderer sets the dashboard renderer for HTML generation. When set, enables server-side rendering of dashboard HTML.
func (*Dashboard) WithWidgetService ¶
func (d *Dashboard) WithWidgetService(svc CMSWidgetService)
WithWidgetService wires a CMS widget service for definitions/instances.
type DashboardAssetOwnershipProvider ¶ added in v0.120.3
type DashboardAssetOwnershipProvider interface {
DashboardAssetsManagedExternally() bool
}
DashboardAssetOwnershipProvider is an optional router capability for hosts that mount go-dashboard's embedded assets on a dedicated static surface. Admin dashboard initialization uses it to avoid registering duplicate static routes through the admin surface.
type DashboardDiagnosticsMsg ¶ added in v0.24.0
type DashboardDiagnosticsMsg struct {
Locale string `json:"locale,omitempty"`
Area string `json:"area,omitempty"`
}
DashboardDiagnosticsMsg requests dashboard diagnostics for a locale/area.
func (DashboardDiagnosticsMsg) Type ¶ added in v0.24.0
func (DashboardDiagnosticsMsg) Type() string
Type identifies the dashboard diagnostics query.
type DashboardDiagnosticsReport ¶ added in v0.24.0
type DashboardDiagnosticsReport struct {
Locale string `json:"locale"`
Diagnostics dashcmp.DashboardDiagnostics `json:"diagnostics"`
Catalog dashcmp.CatalogSnapshot `json:"catalog"`
Page *AdminDashboardPage `json:"page,omitempty"`
Providers int `json:"providers"`
Definitions int `json:"definitions"`
Instances int `json:"instances"`
InstancesByArea map[string]int `json:"instances_by_area"`
WidgetService string `json:"widget_service,omitempty"`
HasWidgetService bool `json:"has_widget_service"`
}
DashboardDiagnosticsReport captures resolved dashboard state for troubleshooting.
type DashboardHandle ¶
type DashboardHandle = Dashboard
DashboardHandle and MenuHandle are kept for API compatibility and now alias real services.
type DashboardLayoutOverrides ¶
type DashboardLayoutOverrides struct {
Locale string `json:"locale,omitempty"`
AreaOrder map[string][]string `json:"area_order,omitempty"`
AreaRows map[string][]DashboardLayoutRow `json:"area_rows,omitempty"`
HiddenWidgets map[string]bool `json:"hidden_widgets,omitempty"`
}
DashboardLayoutOverrides persists go-dashboard layout adjustments.
type DashboardLayoutRow ¶
type DashboardLayoutRow struct {
Widgets []DashboardLayoutSlot `json:"widgets,omitempty"`
}
DashboardLayoutRow captures widget slots on a single row.
type DashboardLayoutSlot ¶
type DashboardLayoutSlot struct {
ID string `json:"id,omitempty"`
Width int `json:"width,omitempty"`
}
DashboardLayoutSlot describes a widget placement and width.
type DashboardPreferences ¶
type DashboardPreferences = dashinternal.DashboardPreferences
DashboardPreferences stores per-user layouts.
func NewDashboardPreferencesAdapter ¶
func NewDashboardPreferencesAdapter(service *PreferencesService) DashboardPreferences
NewDashboardPreferencesAdapter bridges PreferencesService into the DashboardPreferences contract. When the service is nil, it falls back to in-memory preferences.
type DashboardPreferencesWithContext ¶
type DashboardPreferencesWithContext = dashinternal.DashboardPreferencesWithContext
DashboardPreferencesWithContext allows contextual access to preferences (for activity/locale-aware stores).
type DashboardProviderMsg ¶ added in v0.12.0
type DashboardProviderMsg struct {
CommandName string `json:"command_name"`
Code string `json:"code"`
Config map[string]any `json:"config"`
}
DashboardProviderMsg routes dashboard provider commands.
func (DashboardProviderMsg) Type ¶ added in v0.12.0
func (DashboardProviderMsg) Type() string
func (DashboardProviderMsg) Validate ¶ added in v0.12.0
func (m DashboardProviderMsg) Validate() error
type DashboardProviderSpec ¶
type DashboardProviderSpec struct {
Code string `json:"code"`
Name string `json:"name"`
Template string `json:"template,omitempty"`
Schema map[string]any `json:"schema,omitempty"`
DefaultArea string `json:"default_area,omitempty"`
DefaultConfig map[string]any `json:"default_config,omitempty"`
DefaultSpan int `json:"default_span,omitempty"`
Permission string `json:"permission,omitempty"`
Schedule string `json:"schedule,omitempty"`
Description string `json:"description,omitempty"`
CommandName string `json:"command_name,omitempty"`
VisibilityRole []string `json:"visibility_role,omitempty"`
Handler WidgetProvider `json:"-"`
}
DashboardProviderSpec captures provider metadata and behavior.
type DashboardRenderer ¶
type DashboardRenderer interface {
RenderPage(name string, page AdminDashboardPage, out ...io.Writer) (string, error)
}
DashboardRenderer defines the typed renderer contract used by go-admin. Host chrome is composed at the route edge and passed alongside the canonical go-dashboard page model.
type DashboardRendererFunc ¶ added in v0.34.0
type DashboardRendererFunc func(name string, page AdminDashboardPage, out ...io.Writer) (string, error)
DashboardRendererFunc adapts a function to DashboardRenderer.
func (DashboardRendererFunc) RenderPage ¶ added in v0.34.0
func (fn DashboardRendererFunc) RenderPage(name string, page AdminDashboardPage, out ...io.Writer) (string, error)
RenderPage implements DashboardRenderer.
type DashboardWidgetInstance ¶
type DashboardWidgetInstance = dashinternal.DashboardWidgetInstance
DashboardWidgetInstance represents a widget placed in an area.
type DataActionChoice ¶ added in v0.139.0
DataActionChoice is one lifecycle action the current actor may start. The module derives choices from authorized reads and current capabilities; Input carries everything except the request key, dry-run flag and batch limit, which the operator supplies. Cancel choices appear on the operations panel and every other kind on the overview.
type DataCheckView ¶ added in v0.139.0
type DataCheckView struct {
Origin admindata.Kind
OperationID string
VerificationID string
ReceiptID string
DryRun bool
Check admindata.Check
}
DataCheckView is one check from a validation, verification or dry-run plan. Checks from a dry run are always presented as planned, never as executed.
type DataCoverageView ¶ added in v0.139.0
DataCoverageView is one verified sample period.
type DataModule ¶ added in v0.139.0
type DataModule struct {
// contains filtered or unexported fields
}
DataModule owns its console and command registrations, never the provider, target or operation store. Close it before closing those application resources.
func NewDataModule ¶ added in v0.139.0
func NewDataModule(cfg DataModuleConfig) (*DataModule, error)
func (*DataModule) Close ¶ added in v0.139.0
func (m *DataModule) Close() error
func (*DataModule) Console ¶ added in v0.139.0
func (m *DataModule) Console() *ConsoleHost
Console exposes the instance host for authorized snapshots and dashboard adapters.
func (*DataModule) Manifest ¶ added in v0.139.0
func (m *DataModule) Manifest() ModuleManifest
func (*DataModule) MenuItems ¶ added in v0.139.0
func (m *DataModule) MenuItems(locale string) []MenuItem
func (*DataModule) Register ¶ added in v0.139.0
func (m *DataModule) Register(ctx ModuleContext) error
func (*DataModule) RouteContract ¶ added in v0.139.0
func (m *DataModule) RouteContract() routing.ModuleContract
type DataModuleConfig ¶ added in v0.139.0
type DataModuleConfig struct {
Service *data.Service
TargetID string
Enabled func() bool
ResolveIdentity func(context.Context) (console.Identity, error)
MenuParent string
}
DataModuleConfig binds application-owned lifecycle adapters to the Data UI. ResolveIdentity must revalidate current account/session state on every call; Service must use the same trusted actor/scope and independently enforce policy. Enabled is a current Data feature gate, independent of Debug.
type DataOverviewCounts ¶ added in v0.139.0
DataOverviewCounts are totals over records the current actor may read.
type DataOverviewView ¶ added in v0.139.0
type DataOverviewView struct {
Targets []DataTargetView
Capabilities map[admindata.Kind]admindata.Capability
LatestOperation *admindata.Operation
Counts DataOverviewCounts
}
DataOverviewView supplies the overview's single record. The first target is presented as the primary one.
type DataPanelActions ¶ added in v0.139.0
type DataPanelActions struct {
Choices func(context.Context) ([]DataActionChoice, error)
Dispatch func(context.Context, admindata.Kind, admindata.Input) (admindata.Result, error)
}
DataPanelActions binds module dispatch to the Data presentation. Choices is called for every authorized definition and again before dispatch, so a choice that is no longer offered cannot run. Dispatch runs the registered typed command for the current trusted actor.
type DataScenarioView ¶ added in v0.139.0
type DataScenarioView struct {
Scenario admindata.ScenarioRef
TargetID string
Receipt *admindata.PreparationReceipt
Active bool
}
DataScenarioView is one scenario, optionally with its latest preparation on a target. Active reports that the receipt is the target's active receipt.
type DataTargetView ¶ added in v0.139.0
type DataTargetView struct {
State admindata.ActiveState
Receipt *admindata.PreparationReceipt
}
DataTargetView is one managed target from the service's safe ActiveState read model. Receipt is the target's active receipt when known; a receipt that is not the active one is ignored.
type DebugCollector ¶ added in v0.14.0
type DebugCollector struct {
// contains filtered or unexported fields
}
DebugCollector aggregates debug data from multiple sources.
func NewDebugCollector ¶ added in v0.14.0
func NewDebugCollector(cfg DebugConfig) *DebugCollector
NewDebugCollector initializes a collector with the provided configuration.
func (*DebugCollector) CaptureConfigSnapshot ¶ added in v0.14.0
func (c *DebugCollector) CaptureConfigSnapshot(snapshot map[string]any)
CaptureConfigSnapshot stores a config snapshot for the config panel.
func (*DebugCollector) CaptureJSError ¶ added in v0.24.0
func (c *DebugCollector) CaptureJSError(entry JSErrorEntry)
CaptureJSError records a frontend JavaScript error.
func (*DebugCollector) CaptureLog ¶ added in v0.14.0
func (c *DebugCollector) CaptureLog(entry LogEntry)
CaptureLog adds a log entry.
func (*DebugCollector) CaptureRequest ¶ added in v0.14.0
func (c *DebugCollector) CaptureRequest(entry RequestEntry)
CaptureRequest logs an HTTP request.
func (*DebugCollector) CaptureRoutes ¶ added in v0.14.0
func (c *DebugCollector) CaptureRoutes(routes []RouteEntry)
CaptureRoutes stores a routes snapshot for the routes panel.
func (*DebugCollector) CaptureSQL ¶ added in v0.14.0
func (c *DebugCollector) CaptureSQL(entry SQLEntry)
CaptureSQL logs a database query.
func (*DebugCollector) CaptureSession ¶ added in v0.14.0
func (c *DebugCollector) CaptureSession(session map[string]any)
CaptureSession stores session information.
func (*DebugCollector) CaptureTemplateData ¶ added in v0.14.0
func (c *DebugCollector) CaptureTemplateData(viewCtx router.ViewContext)
CaptureTemplateData stores the current template context.
func (*DebugCollector) Clear ¶ added in v0.14.0
func (c *DebugCollector) Clear()
Clear removes all stored debug data across panels.
func (*DebugCollector) ClearPanel ¶ added in v0.14.0
func (c *DebugCollector) ClearPanel(panelID string) bool
ClearPanel removes stored data for a single panel.
func (*DebugCollector) ClearPanelStrictWithContext ¶ added in v0.124.0
func (c *DebugCollector) ClearPanelStrictWithContext(ctx context.Context, panelID string) (bool, error)
ClearPanelStrictWithContext clears one panel and returns any registered authorization or mutation error to the initiating client.
func (*DebugCollector) ClearPanelWithContext ¶ added in v0.121.3
func (c *DebugCollector) ClearPanelWithContext(ctx context.Context, panelID string) bool
ClearPanelWithContext clears a panel while retaining authenticated scope for registered clear hooks.
func (*DebugCollector) ClearPanelsStrictWithContext ¶ added in v0.124.0
func (c *DebugCollector) ClearPanelsStrictWithContext(ctx context.Context, panelIDs []string) (bool, error)
ClearPanelsStrictWithContext clears an explicit panel batch as one collector transaction. All targets and clear checks are resolved before mutation. Batches with more than one external registered clear are rejected because the collector cannot provide an atomic transaction across independent stores.
func (*DebugCollector) ClearStrictWithContext ¶ added in v0.124.0
func (c *DebugCollector) ClearStrictWithContext(ctx context.Context) error
ClearStrictWithContext preflights every enabled registered panel before mutating any collector state, then propagates clear failures to the caller.
func (*DebugCollector) ClearWithContext ¶ added in v0.121.3
func (c *DebugCollector) ClearWithContext(ctx context.Context)
ClearWithContext removes stored debug data and preserves request scope for registered panel clear hooks.
func (*DebugCollector) Get ¶ added in v0.14.0
func (c *DebugCollector) Get(key string) (any, bool)
Get retrieves custom debug data.
func (*DebugCollector) Log ¶ added in v0.14.0
func (c *DebugCollector) Log(category, message string, fields ...any)
Log adds a custom debug message.
func (*DebugCollector) PanelDefinitions ¶ added in v0.17.0
func (c *DebugCollector) PanelDefinitions() []debugregistry.PanelDefinition
PanelDefinitions returns metadata for enabled panels.
func (*DebugCollector) PanelDefinitionsWithContext ¶ added in v0.88.0
func (c *DebugCollector) PanelDefinitionsWithContext(ctx context.Context) []debugregistry.PanelDefinition
PanelDefinitionsWithContext returns metadata for enabled panels using the provided context.
func (*DebugCollector) PublishEvent ¶ added in v0.17.0
func (c *DebugCollector) PublishEvent(eventType string, payload any)
PublishEvent emits a custom debug event by event type.
func (*DebugCollector) PublishPanel ¶ added in v0.16.0
func (c *DebugCollector) PublishPanel(panelID string, payload any)
PublishPanel stores a custom panel snapshot and publishes it to subscribers.
func (*DebugCollector) RegisterPanel ¶ added in v0.14.0
func (c *DebugCollector) RegisterPanel(panel DebugPanel)
RegisterPanel adds a custom debug panel.
func (*DebugCollector) RunPanelAction ¶ added in v0.69.0
func (c *DebugCollector) RunPanelAction(ctx context.Context, req debugregistry.PanelActionRequest) (debugregistry.PanelActionResult, error)
RunPanelAction dispatches a schema-declared action to its registered handler.
func (*DebugCollector) SessionSnapshot ¶ added in v0.24.0
func (c *DebugCollector) SessionSnapshot(sessionID string, opts DebugSessionSnapshotOptions) map[string]any
SessionSnapshot returns session-scoped debug data filtered by session ID using a background context for global panel collection.
func (*DebugCollector) SessionSnapshotWithContext ¶ added in v0.121.3
func (c *DebugCollector) SessionSnapshotWithContext(ctx context.Context, sessionID string, opts DebugSessionSnapshotOptions) map[string]any
SessionSnapshotWithContext returns session-scoped debug data and, when requested, collects global panels through the authenticated caller context. Session-owned request, SQL, and log rows always replace their global counterparts so enabling global panels cannot widen those data sets.
func (*DebugCollector) Set ¶ added in v0.14.0
func (c *DebugCollector) Set(key string, value any)
Set adds custom debug data.
func (*DebugCollector) SetDeliveryFailureHandler ¶ added in v0.121.3
func (c *DebugCollector) SetDeliveryFailureHandler(handler func(DebugEvent)) *DebugCollector
SetDeliveryFailureHandler installs a bounded callback for browser-edge delivery recoveries. The callback must not block; it is invoked after a slow subscriber queue is compacted into an authoritative snapshot invalidation.
func (*DebugCollector) SetJSErrorRouteEnabled ¶ added in v0.32.0
func (c *DebugCollector) SetJSErrorRouteEnabled(enabled bool) *DebugCollector
func (*DebugCollector) SetLiveTransportEnabled ¶ added in v0.51.0
func (c *DebugCollector) SetLiveTransportEnabled(enabled bool) *DebugCollector
func (*DebugCollector) Snapshot ¶ added in v0.14.0
func (c *DebugCollector) Snapshot() map[string]any
Snapshot returns current state of all panels using a background context.
func (*DebugCollector) SnapshotWithContext ¶ added in v0.25.0
func (c *DebugCollector) SnapshotWithContext(ctx context.Context) map[string]any
SnapshotWithContext returns current state of all panels using the provided context.
func (*DebugCollector) Subscribe ¶ added in v0.14.0
func (c *DebugCollector) Subscribe(id string) <-chan DebugEvent
Subscribe creates a WebSocket subscriber channel.
func (*DebugCollector) Unsubscribe ¶ added in v0.14.0
func (c *DebugCollector) Unsubscribe(id string)
Unsubscribe removes a WebSocket subscriber.
func (*DebugCollector) WithSessionStore ¶ added in v0.24.0
func (c *DebugCollector) WithSessionStore(store DebugUserSessionStore) *DebugCollector
WithSessionStore configures the debug user session store.
func (*DebugCollector) WithURLs ¶ added in v0.24.0
func (c *DebugCollector) WithURLs(urls urlkit.Resolver) *DebugCollector
WithURLs sets the URL resolver used for debug integrations.
type DebugCollectorProvider ¶ added in v0.119.0
type DebugCollectorProvider func() *DebugCollector
DebugCollectorProvider resolves the active collector at log handling time. Returning nil is valid during startup, shutdown, or when debug capture is disabled.
type DebugConfig ¶ added in v0.14.0
type DebugConfig struct {
// ResolveCurrentContext refreshes current account/session/scope/grants for live
// delivery. When omitted, current authorizer resolution and claim expiry still
// run on every event and at the idle interval. Hosts with mutable session or
// scope state should supply this hook or implement CurrentContextResolver.
ResolveCurrentContext func(context.Context) (context.Context, error) `json:"-"`
LiveRevalidateInterval time.Duration `json:"live_revalidate_interval,omitempty"`
Enabled bool `json:"enabled"`
CaptureSQL bool `json:"capture_sql"`
CaptureLogs bool `json:"capture_logs"`
CaptureRequestBody bool `json:"capture_request_body"`
// CaptureJSErrors enables the global JS error collector on all pages.
// When true, an inline script is injected into every page <head> that
// captures uncaught exceptions, unhandled rejections, and console.error
// calls, then reports them to the debug backend. This flag is independent
// of ToolbarMode — the collector works in production without the toolbar.
CaptureJSErrors bool `json:"capture_js_errors"`
StrictQueryHooks bool `json:"strict_query_hooks"`
MaxLogEntries int `json:"max_log_entries"`
MaxSQLQueries int `json:"max_sql_queries"`
MaskFieldTypes map[string]string `json:"mask_field_types"`
MaskPlaceholder string `json:"mask_placeholder"`
Panels []string `json:"panels"`
FeatureKey string `json:"feature_key"`
Permission string `json:"permission"`
BasePath string `json:"base_path"`
// AppID identifies the running application instance for remote debug clients.
AppID string `json:"app_id"`
// AppName is a human-friendly application name for remote debug clients.
AppName string `json:"app_name"`
// Environment labels the current deployment (e.g., "staging", "prod").
Environment string `json:"environment"`
// RemoteEnabled toggles the remote debug identity/token endpoints.
RemoteEnabled bool `json:"remote_enabled"`
// TokenTTL overrides the default TTL for debug exchange tokens.
TokenTTL time.Duration `json:"token_ttl"`
// AllowedOrigins restricts remote debug origins (identity/token/ws).
AllowedOrigins []string `json:"allowed_origins"`
// CommandLauncherDoctorEnabled registers command-launcher readiness checks even
// when the generic command launcher panel is not registered.
CommandLauncherDoctorEnabled bool `json:"command_launcher_doctor_enabled"`
// CommandRuns enables transport-neutral live command lifecycle projection.
CommandRuns CommandRunRuntimeConfig `json:"command_runs"`
// LayoutMode controls which debug template is rendered for the HTML route.
LayoutMode DebugLayoutMode `json:"layout_mode"`
// PageTemplate is the primary debug template used for HTML rendering.
PageTemplate string `json:"page_template"`
// StandaloneTemplate is used when forcing a standalone render via query param.
StandaloneTemplate string `json:"standalone_template"`
// DashboardTemplate overrides the go-dashboard HTML template for debug routes.
DashboardTemplate string `json:"dashboard_template"`
// ViewContextBuilder can inject navigation/session data for admin-layout templates.
ViewContextBuilder DebugViewContextBuilder `json:"view_context_builder"`
// SecureRequestResolver determines secure transport checks for debug cookies/nonces.
// When nil, debug secure detection only trusts direct TLS.
SecureRequestResolver DebugSecureRequestResolver `json:"secure_request_resolver"`
SlowQueryThreshold time.Duration `json:"slow_query_threshold"`
// SnapshotTimeout bounds initial and requested Debug snapshot collection.
SnapshotTimeout time.Duration `json:"snapshot_timeout"`
AllowedIPs []string `json:"allowed_ips"`
PersistLayout bool `json:"persist_layout"`
Repl DebugREPLConfig `json:"repl"`
// ToolbarMode injects a debug toolbar at the bottom of all admin pages.
// When true, the toolbar is shown in addition to the /admin/debug page.
ToolbarMode bool `json:"toolbar_mode"`
// ToolbarPanels specifies which panels appear in the toolbar.
// Defaults to ["requests", "sql", "logs", "routes", "config"] if empty.
ToolbarPanels []string `json:"toolbar_panels"`
// ToolbarExcludePaths disables the toolbar on matching paths.
// Use exact paths ("/admin/debug") or prefix wildcards ("/admin/debug/*").
ToolbarExcludePaths []string `json:"toolbar_exclude_paths"`
// SessionTracking enables debug session tracking with optional cookie fallback.
SessionTracking bool `json:"session_tracking"`
// SessionIncludeGlobalPanels controls whether global panels are included in session views.
SessionIncludeGlobalPanels *bool `json:"session_include_global_panels"`
// SessionCookieName controls the debug session cookie name.
SessionCookieName string `json:"session_cookie_name"`
// SessionInactivityExpiry controls the TTL for session cookies and session registry expiry.
SessionInactivityExpiry time.Duration `json:"session_inactivity_expiry"`
}
DebugConfig controls the debug module behavior and feature flags.
func (DebugConfig) SessionIncludeGlobalPanelsEnabled ¶ added in v0.24.0
func (cfg DebugConfig) SessionIncludeGlobalPanelsEnabled() bool
SessionIncludeGlobalPanelsEnabled returns the effective session global panel toggle.
type DebugEvent ¶ added in v0.14.0
type DebugEvent struct {
Type string `json:"type"`
Payload any `json:"payload"`
Timestamp time.Time `json:"timestamp"`
// contains filtered or unexported fields
}
DebugEvent is sent to WebSocket subscribers.
type DebugLayoutMode ¶ added in v0.16.0
type DebugLayoutMode string
DebugLayoutMode controls how the debug UI is rendered.
const ( DebugLayoutStandalone DebugLayoutMode = "standalone" DebugLayoutAdmin DebugLayoutMode = "admin" DebugLayoutDashboard DebugLayoutMode = "dashboard" )
type DebugLogContext ¶ added in v0.119.0
DebugLogContext contains optional request and trace correlation metadata.
type DebugLogContextResolver ¶ added in v0.119.0
type DebugLogContextResolver func(context.Context) DebugLogContext
DebugLogContextResolver extracts correlation metadata from a log context.
type DebugLogHandler ¶ added in v0.14.0
type DebugLogHandler struct {
// contains filtered or unexported fields
}
DebugLogHandler forwards final slog records into the debug collector.
func NewDebugLogHandler ¶ added in v0.14.0
func NewDebugLogHandler(collector *DebugCollector, next slog.Handler) *DebugLogHandler
NewDebugLogHandler creates a slog.Handler that forwards to the debug collector and an optional delegate.
func NewDebugLogHandlerProvider ¶ added in v0.119.0
func NewDebugLogHandlerProvider(provider DebugCollectorProvider, next slog.Handler, options ...DebugLogHandlerOption) *DebugLogHandler
NewDebugLogHandlerProvider creates a handler that resolves its collector for every record.
type DebugLogHandlerOption ¶ added in v0.119.0
type DebugLogHandlerOption func(*debugLogHandlerConfig)
DebugLogHandlerOption configures final-record normalization and metadata.
func WithDebugLogContextResolver ¶ added in v0.119.0
func WithDebugLogContextResolver(resolver DebugLogContextResolver) DebugLogHandlerOption
WithDebugLogContextResolver overrides request/trace metadata extraction.
func WithDebugLogLimits ¶ added in v0.119.0
func WithDebugLogLimits(limits DebugLogLimits) DebugLogHandlerOption
WithDebugLogLimits overrides normalization limits. Non-positive fields use defaults.
type DebugLogLimits ¶ added in v0.119.0
type DebugLogLimits struct {
MaxDepth int
MaxCollectionItems int
MaxStringBytes int
MaxStackBytes int
MaxEventBytes int
}
DebugLogLimits bounds normalized values retained by the debug collector.
type DebugModule ¶ added in v0.14.0
type DebugModule struct {
// contains filtered or unexported fields
}
DebugModule registers the debug dashboard integration and menu entry.
func NewDebugModule ¶ added in v0.14.0
func NewDebugModule(config DebugConfig) *DebugModule
NewDebugModule constructs a debug module with the provided configuration.
func (*DebugModule) Close ¶ added in v0.139.0
func (m *DebugModule) Close() error
Close releases Debug-owned delivery without stopping a shared command runtime or dashboard. The router retains startup routes, which now deny access.
func (*DebugModule) Manifest ¶ added in v0.14.0
func (m *DebugModule) Manifest() ModuleManifest
func (*DebugModule) MenuItems ¶ added in v0.14.0
func (m *DebugModule) MenuItems(locale string) []MenuItem
func (*DebugModule) Register ¶ added in v0.14.0
func (m *DebugModule) Register(ctx ModuleContext) error
func (*DebugModule) RouteContract ¶ added in v0.27.0
func (m *DebugModule) RouteContract() routing.ModuleContract
func (*DebugModule) WithMenuParent ¶ added in v0.24.0
func (m *DebugModule) WithMenuParent(parent string) *DebugModule
WithMenuParent nests the debug navigation under a parent menu item ID.
type DebugPanel ¶ added in v0.14.0
type DebugPanel interface {
ID() string
Label() string
Icon() string
Collect(ctx context.Context) map[string]any
}
DebugPanel defines a pluggable debug panel.
type DebugPanelActionProvider ¶ added in v0.69.0
type DebugPanelActionProvider interface {
Actions() map[string]debugregistry.PanelActionHandler
}
DebugPanelActionProvider optionally adds action handlers to a rich panel.
type DebugPanelUIProvider ¶ added in v0.69.0
type DebugPanelUIProvider interface {
UI() *debugregistry.PanelUI
}
DebugPanelUIProvider optionally adds a declarative rich UI schema to a panel.
type DebugPanelWidgetPayload ¶ added in v0.25.0
type DebugQueryHook ¶ added in v0.14.0
type DebugQueryHook struct {
Collector *DebugCollector `json:"collector"`
CollectorProvider func() *DebugCollector `json:"collector_provider"`
}
DebugQueryHook captures Bun query events and forwards them to the debug collector.
func NewDebugQueryHook ¶ added in v0.14.0
func NewDebugQueryHook(collector *DebugCollector) *DebugQueryHook
NewDebugQueryHook builds a query hook bound to a specific collector.
func NewDebugQueryHookProvider ¶ added in v0.14.0
func NewDebugQueryHookProvider(provider func() *DebugCollector) *DebugQueryHook
NewDebugQueryHookProvider builds a query hook that resolves the collector at runtime.
func (*DebugQueryHook) AfterQuery ¶ added in v0.14.0
func (h *DebugQueryHook) AfterQuery(ctx context.Context, event *bun.QueryEvent)
AfterQuery captures query details after execution.
func (*DebugQueryHook) BeforeQuery ¶ added in v0.14.0
func (h *DebugQueryHook) BeforeQuery(ctx context.Context, event *bun.QueryEvent) context.Context
BeforeQuery preserves the context; Bun requires the hook contract.
func (*DebugQueryHook) QueryHookKey ¶ added in v0.14.0
func (h *DebugQueryHook) QueryHookKey() string
QueryHookKey provides a stable identity for hook deduplication.
type DebugREPLCommand ¶ added in v0.16.0
type DebugREPLCommand struct {
Command string `json:"command"`
Path []string `json:"path,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Aliases []string `json:"aliases,omitempty"`
Mutates bool `json:"mutates"`
Permissions []string `json:"-"`
Roles []string `json:"-"`
MessageType string `json:"-"`
}
DebugREPLCommand describes a CLI command exposed to the REPL UI.
type DebugREPLCommandCatalog ¶ added in v0.16.0
type DebugREPLCommandCatalog struct {
// contains filtered or unexported fields
}
DebugREPLCommandCatalog collects exposed CLI commands via go-command resolvers.
func NewDebugREPLCommandCatalog ¶ added in v0.16.0
func NewDebugREPLCommandCatalog() *DebugREPLCommandCatalog
NewDebugREPLCommandCatalog constructs a catalog and attaches its resolver.
func (*DebugREPLCommandCatalog) List ¶ added in v0.16.0
func (c *DebugREPLCommandCatalog) List() []DebugREPLCommand
List returns all captured commands sorted by command path.
func (*DebugREPLCommandCatalog) VisibleCommands ¶ added in v0.16.0
func (c *DebugREPLCommandCatalog) VisibleCommands(admin *Admin, adminCtx AdminContext, cfg DebugREPLConfig) []DebugREPLCommand
VisibleCommands filters commands for a specific admin context + REPL config.
type DebugREPLConfig ¶ added in v0.16.0
type DebugREPLConfig struct {
Enabled bool `json:"enabled"`
ShellEnabled bool `json:"shell_enabled"`
AppEnabled bool `json:"app_enabled"`
Permission string `json:"permission"`
ExecPermission string `json:"exec_permission"`
ReadOnly *bool `json:"read_only"`
AllowedRoles []string `json:"allowed_roles"`
AllowedIPs []string `json:"allowed_ips"`
ShellCommand string `json:"shell_command"`
ShellArgs []string `json:"shell_args"`
WorkingDir string `json:"working_dir"`
Environment []string `json:"environment"`
MaxSessionSeconds int `json:"max_session_seconds"`
AppEvalTimeoutMs int `json:"app_eval_timeout_ms"`
AppAllowedPackages []string `json:"app_allowed_packages"`
OverrideStrategy DebugREPLOverrideStrategy `json:"override_strategy"`
MaxSessionsPerUser int `json:"max_sessions_per_user"`
}
DebugREPLConfig controls shell + app console access.
func (DebugREPLConfig) ReadOnlyEnabled ¶ added in v0.16.0
func (cfg DebugREPLConfig) ReadOnlyEnabled() bool
type DebugREPLOverrideStrategy ¶ added in v0.16.0
type DebugREPLOverrideStrategy interface {
Allows(ctx context.Context, req DebugREPLRequest) (bool, error)
}
DebugREPLOverrideStrategy decides whether a request can override a disabled REPL.
type DebugREPLRequest ¶ added in v0.16.0
type DebugREPLRequest struct {
UserID string `json:"user_id"`
IP string `json:"ip"`
UserAgent string `json:"user_agent"`
Kind string `json:"kind"`
RequestedAt time.Time `json:"requested_at"`
Metadata map[string]any `json:"metadata"`
}
DebugREPLRequest captures request metadata for override strategies.
type DebugREPLSession ¶ added in v0.16.0
type DebugREPLSession struct {
ID string `json:"id"`
UserID string `json:"user_id"`
Username string `json:"username"`
IP string `json:"ip"`
UserAgent string `json:"user_agent"`
Kind string `json:"kind"`
ReadOnly bool `json:"read_only"`
StartedAt time.Time `json:"started_at"`
ExpiresAt time.Time `json:"expires_at"`
ClosedAt *time.Time `json:"closed_at"`
Metadata map[string]any `json:"metadata"`
}
DebugREPLSession tracks an active REPL session.
type DebugREPLSessionManager ¶ added in v0.16.0
type DebugREPLSessionManager struct {
// contains filtered or unexported fields
}
DebugREPLSessionManager enforces REPL session lifecycle rules.
func NewDebugREPLSessionManager ¶ added in v0.16.0
func NewDebugREPLSessionManager(store DebugREPLSessionStore, cfg DebugREPLConfig) *DebugREPLSessionManager
NewDebugREPLSessionManager constructs a lifecycle manager.
func (*DebugREPLSessionManager) Active ¶ added in v0.16.0
func (m *DebugREPLSessionManager) Active(ctx context.Context) ([]DebugREPLSession, error)
Active returns sessions that are still active.
func (*DebugREPLSessionManager) Start ¶ added in v0.16.0
func (m *DebugREPLSessionManager) Start(ctx context.Context, session DebugREPLSession) (DebugREPLSession, error)
Start creates a new session after enforcing limits.
type DebugREPLSessionStore ¶ added in v0.16.0
type DebugREPLSessionStore interface {
Create(ctx context.Context, session DebugREPLSession) error
Close(ctx context.Context, id string, closedAt time.Time) error
Get(ctx context.Context, id string) (DebugREPLSession, bool, error)
ListActive(ctx context.Context) ([]DebugREPLSession, error)
}
DebugREPLSessionStore persists REPL sessions.
type DebugSecureRequestResolver ¶ added in v0.27.0
DebugSecureRequestResolver determines whether a request should be treated as secure.
type DebugSessionSnapshotOptions ¶ added in v0.24.0
type DebugSessionSnapshotOptions struct {
IncludeGlobalPanels bool `json:"include_global_panels"`
}
DebugSessionSnapshotOptions controls session-scoped snapshot behavior.
type DebugUserSession ¶ added in v0.24.0
type DebugUserSession struct {
SessionID string `json:"session_id"`
UserID string `json:"user_id"`
Username string `json:"username"`
IP string `json:"ip"`
UserAgent string `json:"user_agent"`
CurrentPage string `json:"current_page"`
StartedAt time.Time `json:"started_at"`
LastActivity time.Time `json:"last_activity"`
RequestCount int `json:"request_count"`
Metadata map[string]any `json:"metadata,omitempty"`
}
DebugUserSession tracks an active user session for session-scoped debug views.
type DebugUserSessionStore ¶ added in v0.24.0
type DebugUserSessionStore interface {
Upsert(ctx context.Context, session DebugUserSession) error
Get(ctx context.Context, sessionID string) (DebugUserSession, bool, error)
ListActive(ctx context.Context) ([]DebugUserSession, error)
Expire(ctx context.Context, olderThan time.Duration) (int, error)
}
DebugUserSessionStore persists active debug user sessions.
type DebugViewContextBuilder ¶ added in v0.16.0
type DebugViewContextBuilder func(adm *Admin, cfg DebugConfig, c router.Context, view router.ViewContext) router.ViewContext
DebugViewContextBuilder can augment the view context for debug templates.
type DefaultIconRenderer ¶ added in v0.25.0
type DefaultIconRenderer struct {
// CDNURLs maps library IDs to their CDN stylesheet URLs.
CDNURLs map[string]string `json:"cdnur_ls"`
// ClassPatterns maps library IDs to class patterns (e.g., "iconoir-{name}").
ClassPatterns map[string]string `json:"class_patterns"`
// DefaultSize is the default icon size CSS value.
DefaultSize string `json:"default_size"`
// SecurityValidator validates and sanitizes icon content.
SecurityValidator *IconSecurityValidator `json:"security_validator"`
}
DefaultIconRenderer implements IconRenderer with standard HTML output.
func NewDefaultIconRenderer ¶ added in v0.25.0
func NewDefaultIconRenderer(policy IconSecurityPolicy) *DefaultIconRenderer
NewDefaultIconRenderer creates a new DefaultIconRenderer with sensible defaults.
func (*DefaultIconRenderer) Render ¶ added in v0.25.0
func (r *DefaultIconRenderer) Render(ref IconReference, def *IconDefinition, opts IconRenderOptions) string
Render produces HTML for the given icon reference.
type DefaultMediaDeliveryReferenceProjector ¶ added in v0.62.0
type DefaultMediaDeliveryReferenceProjector struct{}
DefaultMediaDeliveryReferenceProjector reads common provenance fields from item metadata.
func (DefaultMediaDeliveryReferenceProjector) ProjectMediaDeliveryReference ¶ added in v0.62.0
func (DefaultMediaDeliveryReferenceProjector) ProjectMediaDeliveryReference(_ context.Context, item MediaItem) (MediaDeliveryReference, error)
type DefaultModuleID ¶ added in v0.126.3
type DefaultModuleID string
DefaultModuleID identifies a module registered automatically by Admin.
const ( DefaultModuleActivity DefaultModuleID = "activity" DefaultModuleFeatureFlags DefaultModuleID = "feature_flags" DefaultModuleMedia DefaultModuleID = "media" DefaultModuleOrganizations DefaultModuleID = "organizations" DefaultModulePreferences DefaultModuleID = "preferences" DefaultModuleProfile DefaultModuleID = "profile" DefaultModuleTenants DefaultModuleID = "tenants" DefaultModuleUsers DefaultModuleID = "users" )
type DefaultPageMapper ¶ added in v0.24.0
type DefaultPageMapper struct{}
DefaultPageMapper provides a baseline mapping of admin read models to form values.
func (DefaultPageMapper) ToFormValues ¶ added in v0.24.0
func (DefaultPageMapper) ToFormValues(record AdminPageRecord) map[string]any
ToFormValues maps an admin record into form values.
type DefaultTranslationQueueAutoCreateHook ¶ added in v0.25.0
type DefaultTranslationQueueAutoCreateHook struct {
Repository TranslationAssignmentRepository `json:"repository"`
Logger Logger `json:"logger"`
}
DefaultTranslationQueueAutoCreateHook implements auto-create using the assignment repository.
func (*DefaultTranslationQueueAutoCreateHook) OnTranslationBlocker ¶ added in v0.25.0
func (h *DefaultTranslationQueueAutoCreateHook) OnTranslationBlocker(ctx context.Context, input TranslationQueueAutoCreateInput) TranslationQueueAutoCreateResult
OnTranslationBlocker creates or reuses queue assignments for missing locales. Errors are logged but not propagated to preserve primary policy response.
type DefaultTranslationQueueService ¶ added in v0.25.0
type DefaultTranslationQueueService struct {
Repository TranslationAssignmentRepository `json:"repository"`
Activity ActivitySink `json:"activity"`
Notifications NotificationService `json:"notifications"`
URLs urlkit.Resolver `json:"urls"`
}
DefaultTranslationQueueService implements queue lifecycle transitions over a repository.
func (*DefaultTranslationQueueService) Approve ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) Approve(ctx context.Context, input TranslationQueueApproveInput) (TranslationAssignment, error)
func (*DefaultTranslationQueueService) Archive ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) Archive(ctx context.Context, input TranslationQueueArchiveInput) (TranslationAssignment, error)
func (*DefaultTranslationQueueService) Assign ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) Assign(ctx context.Context, input TranslationQueueAssignInput) (TranslationAssignment, error)
func (*DefaultTranslationQueueService) BulkArchive ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) BulkArchive(ctx context.Context, input TranslationQueueBulkArchiveInput) ([]TranslationAssignment, error)
func (*DefaultTranslationQueueService) BulkAssign ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) BulkAssign(ctx context.Context, input TranslationQueueBulkAssignInput) ([]TranslationAssignment, error)
func (*DefaultTranslationQueueService) BulkPriority ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) BulkPriority(ctx context.Context, input TranslationQueueBulkPriorityInput) ([]TranslationAssignment, error)
func (*DefaultTranslationQueueService) BulkRelease ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) BulkRelease(ctx context.Context, input TranslationQueueBulkReleaseInput) ([]TranslationAssignment, error)
func (*DefaultTranslationQueueService) Claim ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) Claim(ctx context.Context, input TranslationQueueClaimInput) (TranslationAssignment, error)
func (*DefaultTranslationQueueService) Reject ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) Reject(ctx context.Context, input TranslationQueueRejectInput) (TranslationAssignment, error)
func (*DefaultTranslationQueueService) Release ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) Release(ctx context.Context, input TranslationQueueReleaseInput) (TranslationAssignment, error)
func (*DefaultTranslationQueueService) SubmitReview ¶ added in v0.25.0
func (s *DefaultTranslationQueueService) SubmitReview(ctx context.Context, input TranslationQueueSubmitInput) (TranslationAssignment, error)
type DefaultTranslationSuggestionService ¶ added in v0.110.0
type DefaultTranslationSuggestionService struct {
Repository TranslationAssignmentRepository
ContextLoader TranslationSuggestionContextLoader
Authorizer Authorizer
Permission string
Resource string
Eligibility TranslationSuggestionEligibilityChecker
AssistContext TranslationSuggestionAssistContextExtractor
Provider TranslationSuggestionProvider
}
DefaultTranslationSuggestionService orchestrates server-side checks and a provider-neutral suggestion provider.
func (*DefaultTranslationSuggestionService) ConfigureTranslationSuggestionServiceDependencies ¶ added in v0.110.0
func (s *DefaultTranslationSuggestionService) ConfigureTranslationSuggestionServiceDependencies(deps TranslationSuggestionServiceDependencies)
func (*DefaultTranslationSuggestionService) EvaluateTranslationSuggestionAction ¶ added in v0.110.0
func (s *DefaultTranslationSuggestionService) EvaluateTranslationSuggestionAction(ctx context.Context, input TranslationSuggestionInput, loaded TranslationSuggestionAssignmentContext) (TranslationSuggestionDecision, error)
func (*DefaultTranslationSuggestionService) SuggestTranslation ¶ added in v0.110.0
func (s *DefaultTranslationSuggestionService) SuggestTranslation(ctx context.Context, input TranslationSuggestionInput) (TranslationSuggestionResult, error)
type DeliveryContentService ¶ added in v0.23.0
type DeliveryContentService struct {
// contains filtered or unexported fields
}
DeliveryContentService adapts CMS content for delivery.
func NewDeliveryContentService ¶ added in v0.23.0
func NewDeliveryContentService(container CMSContainer, opts DeliveryOptions) *DeliveryContentService
NewDeliveryContentService constructs a delivery content service.
func (*DeliveryContentService) Index ¶ added in v0.23.0
func (s *DeliveryContentService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]delivery.Content, int, error)
func (*DeliveryContentService) Show ¶ added in v0.23.0
func (s *DeliveryContentService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (delivery.Content, error)
type DeliveryMenuService ¶ added in v0.23.0
type DeliveryMenuService struct {
// contains filtered or unexported fields
}
DeliveryMenuService adapts CMS menus for delivery.
func NewDeliveryMenuService ¶ added in v0.23.0
func NewDeliveryMenuService(container CMSContainer, opts DeliveryOptions) *DeliveryMenuService
NewDeliveryMenuService constructs a delivery menu service.
func (*DeliveryMenuService) Index ¶ added in v0.23.0
func (s *DeliveryMenuService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]delivery.Menu, int, error)
func (*DeliveryMenuService) Show ¶ added in v0.23.0
func (s *DeliveryMenuService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (delivery.Menu, error)
type DeliveryOptions ¶ added in v0.23.0
type DeliveryOptions struct {
DefaultLocale string `json:"default_locale"`
}
DeliveryOptions configures delivery adapters.
type DeliveryPageService ¶ added in v0.23.0
type DeliveryPageService struct {
// contains filtered or unexported fields
}
DeliveryPageService adapts CMS pages for delivery.
func NewDeliveryPageService ¶ added in v0.23.0
func NewDeliveryPageService(container CMSContainer, opts DeliveryOptions) *DeliveryPageService
NewDeliveryPageService constructs a delivery page service.
func (*DeliveryPageService) Index ¶ added in v0.23.0
func (s *DeliveryPageService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]delivery.Page, int, error)
func (*DeliveryPageService) Show ¶ added in v0.23.0
func (s *DeliveryPageService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (delivery.Page, error)
type DeliveryServices ¶ added in v0.23.0
type DeliveryServices struct {
Contents crud.Service[delivery.Content] `json:"contents"`
Pages crud.Service[delivery.Page] `json:"pages"`
Menus crud.Service[delivery.Menu] `json:"menus"`
}
DeliveryServices bundles CRUD-compatible services for GraphQL resolvers.
func NewDeliveryServices ¶ added in v0.23.0
func NewDeliveryServices(container CMSContainer, opts DeliveryOptions) DeliveryServices
NewDeliveryServices builds read-only services backed by CMS adapters.
type DenyAllStrategy ¶ added in v0.16.0
type DenyAllStrategy struct{}
DenyAllStrategy denies all override attempts.
func (DenyAllStrategy) Allows ¶ added in v0.16.0
func (DenyAllStrategy) Allows(_ context.Context, _ DebugREPLRequest) (bool, error)
type Dependencies ¶
type Dependencies struct {
Router AdminRouter `json:"router"`
Logger Logger `json:"logger"`
LoggerProvider LoggerProvider `json:"logger_provider"`
DeploymentPersonaGenerator deploymentidentity.Generator `json:"-"`
CMSContainer CMSContainer `json:"cms_container"`
CMSContainerBuilder CMSContainerBuilder `json:"cms_container_builder"`
Registry *Registry `json:"registry"`
CommandBus *CommandBus `json:"command_bus"`
CommandCatalog gocommand.CatalogProvider `json:"command_catalog"`
CommandOptionProvider gocommand.CommandOptionProvider `json:"command_option_provider"`
RPCServer *cmdrpc.Server `json:"rpc_server"`
RPCCommandPolicyHook RPCCommandPolicyHook `json:"rpc_command_policy_hook"`
JobRegistry *JobRegistry `json:"job_registry"`
URLManager *urlkit.RouteManager `json:"url_manager"`
Authorizer Authorizer `json:"authorizer"`
Authenticator Authenticator `json:"authenticator"`
Translator Translator `json:"translator"`
Workflow WorkflowEngine `json:"workflow"`
WorkflowRuntime WorkflowRuntime `json:"workflow_runtime"`
TranslationPolicy TranslationPolicy `json:"translation_policy"`
TranslationFamilyStore translationservices.FamilyStore `json:"translation_family_store"`
ActivitySink ActivitySink `json:"activity_sink"`
ActivityRepository types.ActivityRepository `json:"activity_repository"`
ActivityAccessPolicy activity.ActivityAccessPolicy `json:"activity_access_policy"`
ActivityFeedQuery ActivityFeedQuerier `json:"activity_feed_query"`
ActivityService ActivityFeedQuerier `json:"activity_service"`
ActivityFilterOptionsProvider ActivityFilterOptionsProvider `json:"activity_filter_options_provider"`
ActivityFilterOptionsPolicy ActivityFilterOptionsPolicy `json:"activity_filter_options_policy"`
ActivityPageEnricher ActivityPageEnricher `json:"activity_page_enricher"`
ActivityReadErrorHandler ActivityReadErrorHandler `json:"activity_read_error_handler"`
ActivityEnricher activity.ActivityEnricher `json:"activity_enricher"`
ActivityEnrichmentErrorHandler activity.EnrichmentErrorHandler `json:"activity_enrichment_error_handler"`
ActivityEnrichmentWriteMode activity.EnrichmentWriteMode `json:"activity_enrichment_write_mode"`
ActivitySessionIDProvider activity.SessionIDProvider `json:"activity_session_id_provider"`
ActivitySessionIDKey string `json:"activity_session_id_key"`
DebugREPLSessionStore DebugREPLSessionStore `json:"debug_repl_session_store"`
DebugUserSessionStore DebugUserSessionStore `json:"debug_user_session_store"`
NotificationService NotificationService `json:"notification_service"`
NotificationRuntime *NotificationRuntimeOptions `json:"notification_runtime"`
ExportRegistry ExportRegistry `json:"export_registry"`
ExportRegistrar ExportHTTPRegistrar `json:"export_registrar"`
ExportMetadata ExportMetadataProvider `json:"export_metadata"`
BulkService BulkService `json:"bulk_service"`
MediaLibrary MediaLibrary `json:"media_library"`
MediaActivityHook MediaActivityHook `json:"media_activity_hook"`
MediaDeliveryRegistry *MediaDeliveryRegistry `json:"media_delivery_registry"`
MediaDeliveryReferenceProjector MediaDeliveryReferenceProjector `json:"media_delivery_reference_projector"`
MediaDeliveryCredentialResolver MediaDeliveryCredentialResolver `json:"media_delivery_credential_resolver"`
PreferencesStore PreferencesStore `json:"preferences_store"`
ProfileStore ProfileStore `json:"profile_store"`
UserRepository UserRepository `json:"user_repository"`
RoleRepository RoleRepository `json:"role_repository"`
TenantRepository TenantRepository `json:"tenant_repository"`
OrganizationRepository OrganizationRepository `json:"organization_repository"`
BulkUserImport *command.BulkUserImportCommand `json:"bulk_user_import"`
SettingsService *SettingsService `json:"settings_service"`
IconService *IconService `json:"icon_service"`
FeatureGate fggate.FeatureGate `json:"feature_gate"`
FeatureCatalog catalog.Catalog `json:"feature_catalog"`
FeatureCatalogResolver catalog.MessageResolver `json:"feature_catalog_resolver"`
}
Dependencies captures host-provided integrations and storage adapters. Optional dependencies fall back to in-memory defaults when omitted.
type DeploymentBuildInfo ¶ added in v0.122.0
type DeploymentBuildInfo struct {
MainVersion string
GoVersion string
VCSRevision string
VCSTime string
VCSModified bool
}
DeploymentBuildInfo is the bounded build metadata consumed by the resolver.
type DeploymentDebugPanel ¶ added in v0.122.0
type DeploymentDebugPanel struct {
// contains filtered or unexported fields
}
DeploymentDebugPanel exposes the allowlisted identity for one Admin instance.
func NewDeploymentDebugPanel ¶ added in v0.122.0
func NewDeploymentDebugPanel(adm *Admin) *DeploymentDebugPanel
func (*DeploymentDebugPanel) Collect ¶ added in v0.122.0
func (p *DeploymentDebugPanel) Collect(context.Context) map[string]any
func (*DeploymentDebugPanel) ID ¶ added in v0.122.0
func (p *DeploymentDebugPanel) ID() string
func (*DeploymentDebugPanel) Icon ¶ added in v0.122.0
func (p *DeploymentDebugPanel) Icon() string
func (*DeploymentDebugPanel) Label ¶ added in v0.122.0
func (p *DeploymentDebugPanel) Label() string
func (*DeploymentDebugPanel) Span ¶ added in v0.122.0
func (p *DeploymentDebugPanel) Span() int
func (*DeploymentDebugPanel) UI ¶ added in v0.122.0
func (p *DeploymentDebugPanel) UI() *debugregistry.PanelUI
type DeploymentIdentity ¶ added in v0.122.0
type DeploymentIdentity struct {
AppID string `json:"app_id,omitempty"`
AppName string `json:"app_name,omitempty"`
AppVersion string `json:"app_version,omitempty"`
Environment string `json:"environment,omitempty"`
EnvironmentColor string `json:"environment_color,omitempty"`
InstanceName string `json:"instance_name"`
InstanceID string `json:"instance_id"`
Hostname string `json:"hostname,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
CommitShort string `json:"commit_short,omitempty"`
GitRef string `json:"git_ref,omitempty"`
BuildTime *time.Time `json:"build_time,omitempty"`
BuildModified bool `json:"build_modified,omitempty"`
BuildSource string `json:"build_source,omitempty"`
InstanceSource string `json:"instance_source,omitempty"`
StartedAt time.Time `json:"started_at"`
GoVersion string `json:"go_version,omitempty"`
Persona *deploymentidentity.Persona `json:"persona,omitempty"`
}
DeploymentIdentity is the immutable deployment identity resolved for one Admin instance.
func ResolveDeploymentIdentity ¶ added in v0.122.0
func ResolveDeploymentIdentity(cfg Config, options ...DeploymentIdentityResolverOption) DeploymentIdentity
ResolveDeploymentIdentity resolves allowlisted metadata using field-level precedence: typed config, compatibility config, APP_* environment, build information, then safe generated/runtime fallbacks.
func (DeploymentIdentity) Snapshot ¶ added in v0.122.0
func (i DeploymentIdentity) Snapshot(now time.Time) DeploymentIdentitySnapshot
Snapshot derives time-varying display fields without mutating the identity.
type DeploymentIdentityConfig ¶ added in v0.122.0
type DeploymentIdentityConfig struct {
AppID string `json:"app_id"`
AppName string `json:"app_name"`
AppVersion string `json:"app_version"`
Environment string `json:"environment"`
EnvironmentColors map[string]string `json:"environment_colors,omitempty"`
FallbackColor string `json:"fallback_color,omitempty"`
InstanceName string `json:"instance_name,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
GitRef string `json:"git_ref,omitempty"`
BuildTime string `json:"build_time,omitempty"`
Persona DeploymentPersonaConfig `json:"persona"`
}
DeploymentIdentityConfig configures application, build, environment, and process identity metadata. Empty fields are resolved independently.
type DeploymentIdentityResolverOption ¶ added in v0.122.0
type DeploymentIdentityResolverOption func(*deploymentIdentityResolver)
DeploymentIdentityResolverOption makes resolver dependencies deterministic for hosts and tests without changing the default runtime behavior.
func WithDeploymentBuildInfo ¶ added in v0.122.0
func WithDeploymentBuildInfo(lookup func() (DeploymentBuildInfo, bool)) DeploymentIdentityResolverOption
func WithDeploymentClock ¶ added in v0.122.0
func WithDeploymentClock(now func() time.Time) DeploymentIdentityResolverOption
func WithDeploymentEnvironmentLookup ¶ added in v0.122.0
func WithDeploymentEnvironmentLookup(lookup func(string) (string, bool)) DeploymentIdentityResolverOption
func WithDeploymentHostnameLookup ¶ added in v0.122.0
func WithDeploymentHostnameLookup(lookup func() (string, error)) DeploymentIdentityResolverOption
func WithDeploymentPersonaGenerator ¶ added in v0.123.1
func WithDeploymentPersonaGenerator(generator deploymentidentity.Generator) DeploymentIdentityResolverOption
WithDeploymentPersonaGenerator supplies an application-defined generator.
func WithDeploymentRandomSource ¶ added in v0.122.0
func WithDeploymentRandomSource(source io.Reader) DeploymentIdentityResolverOption
type DeploymentIdentitySnapshot ¶ added in v0.122.0
type DeploymentIdentitySnapshot struct {
DeploymentIdentity
Uptime string `json:"uptime"`
}
DeploymentIdentitySnapshot is the JSON-safe diagnostic view of an identity.
type DeploymentPersona ¶ added in v0.123.1
type DeploymentPersona = deploymentidentity.Persona
Maintained aliases keep persona contracts available through both admin import paths while the independent package remains usable without core.
func ValidateDeploymentPersona ¶ added in v0.123.1
func ValidateDeploymentPersona(persona DeploymentPersona) (DeploymentPersona, error)
type DeploymentPersonaConfig ¶ added in v0.123.1
type DeploymentPersonaConfig struct {
Enabled bool `json:"enabled,omitempty"`
Seed string `json:"seed,omitempty"`
Namespace *string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
}
DeploymentPersonaConfig opts into a deterministic artifact persona. Namespace nil defaults to AppID; a non-nil empty value explicitly disables namespacing.
type DeploymentPersonaGenerator ¶ added in v0.123.1
type DeploymentPersonaGenerator = deploymentidentity.Generator
Maintained aliases keep persona contracts available through both admin import paths while the independent package remains usable without core.
func NewDefaultDeploymentPersonaGenerator ¶ added in v0.123.1
func NewDefaultDeploymentPersonaGenerator() DeploymentPersonaGenerator
type DeploymentPersonaGeneratorFunc ¶ added in v0.123.1
type DeploymentPersonaGeneratorFunc = deploymentidentity.GeneratorFunc
Maintained aliases keep persona contracts available through both admin import paths while the independent package remains usable without core.
type DeploymentPersonaInput ¶ added in v0.123.1
type DeploymentPersonaInput = deploymentidentity.Input
Maintained aliases keep persona contracts available through both admin import paths while the independent package remains usable without core.
type DeploymentPersonaVisual ¶ added in v0.123.1
type DeploymentPersonaVisual = deploymentidentity.Visual
Maintained aliases keep persona contracts available through both admin import paths while the independent package remains usable without core.
type DevErrorContext ¶ added in v0.24.0
type DevErrorContext struct {
ErrorMessage string `json:"error_message"`
ErrorType string `json:"error_type,omitempty"`
TextCode string `json:"text_code,omitempty"`
Category string `json:"category,omitempty"`
PrimarySource *SourceContext `json:"primary_source,omitempty"`
StackFrames []StackFrameInfo `json:"stack_frames,omitempty"`
RequestInfo *RequestInfo `json:"request_info,omitempty"`
EnvironmentInfo *EnvironmentInfo `json:"environment_info,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
DevErrorContext holds all developer-friendly error context.
type DisabledBulkService ¶
type DisabledBulkService struct{}
DisabledBulkService returns explicit errors when bulk is disabled.
func (DisabledBulkService) Start ¶
func (DisabledBulkService) Start(ctx context.Context, req BulkRequest) (BulkJob, error)
type DisabledMediaLibrary ¶
type DisabledMediaLibrary struct{}
DisabledMediaLibrary returns feature disabled errors.
func (DisabledMediaLibrary) QueryMedia ¶ added in v0.61.0
func (DisabledMediaLibrary) QueryMedia(ctx context.Context, query MediaQuery) (MediaPage, error)
type DisabledNotificationService ¶
type DisabledNotificationService struct{}
DisabledNotificationService returns explicit errors when notifications are disabled.
func (DisabledNotificationService) Add ¶
func (DisabledNotificationService) Add(ctx context.Context, n Notification) (Notification, error)
func (DisabledNotificationService) List ¶
func (DisabledNotificationService) List(ctx context.Context) ([]Notification, error)
type DispatchFactory ¶ added in v0.12.0
type DispatchFactory func(ctx context.Context, payload map[string]any, ids []string, opts command.DispatchOptions) (command.DispatchReceipt, error)
DispatchFactory executes a typed dispatch using the provided payload.
type DispatchOutcome ¶ added in v0.88.0
type DispatchOutcome struct {
Receipt command.DispatchReceipt
Result any
}
DispatchOutcome contains the receipt and optional inline result from a dispatch.
type DoctorAction ¶ added in v0.25.0
type DoctorAction struct {
Label string `json:"label,omitempty"`
CTA string `json:"cta,omitempty"`
Description string `json:"description,omitempty"`
Kind DoctorActionKind `json:"kind,omitempty"`
AllowedStatuses []DoctorSeverity `json:"allowed_statuses,omitempty"`
RequiresConfirmation bool `json:"requires_confirmation,omitempty"`
ConfirmText string `json:"confirm_text,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Run DoctorActionRun `json:"-"`
}
DoctorAction describes the "how to fix" metadata for a check and optional executable action.
func NewManualDoctorAction ¶ added in v0.25.0
func NewManualDoctorAction(description, cta string) *DoctorAction
NewManualDoctorAction returns a manual CTA descriptor for checks that require human intervention.
type DoctorActionExecution ¶ added in v0.25.0
type DoctorActionExecution struct {
CheckID string `json:"check_id"`
Status string `json:"status,omitempty"`
Message string `json:"message,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Snapshot DoctorCheckResult `json:"snapshot"`
}
DoctorActionExecution is returned when a doctor action is invoked.
type DoctorActionKind ¶ added in v0.25.0
type DoctorActionKind string
DoctorActionKind indicates whether a doctor action is automated or manual guidance.
const ( DoctorActionKindManual DoctorActionKind = "manual" DoctorActionKindAuto DoctorActionKind = "auto" )
type DoctorActionRun ¶ added in v0.25.0
type DoctorActionRun func(ctx context.Context, adm *Admin, check DoctorCheckResult, input map[string]any) (DoctorActionExecution, error)
DoctorActionRun executes a doctor action handler.
type DoctorActionState ¶ added in v0.25.0
type DoctorActionState struct {
Label string `json:"label,omitempty"`
CTA string `json:"cta,omitempty"`
Description string `json:"description,omitempty"`
Kind DoctorActionKind `json:"kind,omitempty"`
AllowedStatuses []DoctorSeverity `json:"allowed_statuses,omitempty"`
RequiresConfirmation bool `json:"requires_confirmation,omitempty"`
ConfirmText string `json:"confirm_text,omitempty"`
Applicable bool `json:"applicable"`
Runnable bool `json:"runnable"`
Metadata map[string]any `json:"metadata,omitempty"`
}
DoctorActionState is the frontend-safe action descriptor for an evaluated check result.
type DoctorCheck ¶ added in v0.25.0
type DoctorCheck struct {
ID string `json:"id"`
Label string `json:"label,omitempty"`
Description string `json:"description,omitempty"`
Help string `json:"help,omitempty"`
Action *DoctorAction `json:"action,omitempty"`
Run func(ctx context.Context, adm *Admin) DoctorCheckOutput `json:"run"`
}
DoctorCheck defines a diagnostic check that can run in the debug doctor panel.
type DoctorCheckOutput ¶ added in v0.25.0
type DoctorCheckOutput struct {
Summary string `json:"summary,omitempty"`
Findings []DoctorFinding `json:"findings,omitempty"`
Action *DoctorAction `json:"action,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
DoctorCheckOutput is produced by a single diagnostic check.
type DoctorCheckResult ¶ added in v0.25.0
type DoctorCheckResult struct {
ID string `json:"id"`
Label string `json:"label"`
Description string `json:"description,omitempty"`
Help string `json:"help,omitempty"`
Status DoctorSeverity `json:"status"`
Summary string `json:"summary,omitempty"`
DurationMS int64 `json:"duration_ms"`
Findings []DoctorFinding `json:"findings,omitempty"`
Action *DoctorActionState `json:"action,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
DoctorCheckResult is the rendered output for a check run.
type DoctorDebugPanel ¶ added in v0.25.0
type DoctorDebugPanel struct {
// contains filtered or unexported fields
}
DoctorDebugPanel implements the DebugPanel interface for setup diagnostics.
func NewDoctorDebugPanel ¶ added in v0.25.0
func NewDoctorDebugPanel(admin *Admin) *DoctorDebugPanel
NewDoctorDebugPanel creates a new doctor debug panel.
func (*DoctorDebugPanel) Collect ¶ added in v0.25.0
func (p *DoctorDebugPanel) Collect(ctx context.Context) map[string]any
Collect gathers doctor diagnostics for the current request context.
func (*DoctorDebugPanel) ID ¶ added in v0.25.0
func (p *DoctorDebugPanel) ID() string
ID returns the panel identifier.
func (*DoctorDebugPanel) Icon ¶ added in v0.25.0
func (p *DoctorDebugPanel) Icon() string
Icon returns the panel icon class.
func (*DoctorDebugPanel) Label ¶ added in v0.25.0
func (p *DoctorDebugPanel) Label() string
Label returns the panel display label.
func (*DoctorDebugPanel) Span ¶ added in v0.25.0
func (p *DoctorDebugPanel) Span() int
Span returns the panel grid span.
type DoctorFinding ¶ added in v0.25.0
type DoctorFinding struct {
CheckID string `json:"check_id,omitempty"`
Severity DoctorSeverity `json:"severity"`
Code string `json:"code,omitempty"`
Component string `json:"component,omitempty"`
Message string `json:"message"`
Hint string `json:"hint,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
DoctorFinding captures one actionable diagnostic item.
type DoctorReport ¶ added in v0.25.0
type DoctorReport struct {
GeneratedAt time.Time `json:"generated_at"`
Verdict DoctorSeverity `json:"verdict"`
Summary DoctorSummary `json:"summary"`
Checks []DoctorCheckResult `json:"checks"`
Findings []DoctorFinding `json:"findings,omitempty"`
NextActions []string `json:"next_actions,omitempty"`
}
DoctorReport is the complete diagnostics snapshot for the app setup.
type DoctorSeverity ¶ added in v0.25.0
type DoctorSeverity string
DoctorSeverity describes diagnostic severity levels.
const ( DoctorSeverityOK DoctorSeverity = "ok" DoctorSeverityInfo DoctorSeverity = "info" DoctorSeverityWarn DoctorSeverity = "warn" DoctorSeverityError DoctorSeverity = "error" )
type DoctorSummary ¶ added in v0.25.0
type DoctorSummary struct {
Checks int `json:"checks"`
OK int `json:"ok"`
Info int `json:"info"`
Warn int `json:"warn"`
Error int `json:"error"`
}
DoctorSummary aggregates overall doctor counts.
type DomainErrorCode ¶ added in v0.24.0
type DomainErrorCode struct {
Code string `json:"code"`
Description string `json:"description"`
Category goerrors.Category `json:"category"`
HTTPStatus int `json:"http_status"`
}
DomainErrorCode describes a text code exposed to clients.
func DomainErrorCodeFor ¶ added in v0.24.0
func DomainErrorCodeFor(code string) (DomainErrorCode, bool)
DomainErrorCodeFor returns metadata for a registered domain error code.
func DomainErrorCodes ¶ added in v0.24.0
func DomainErrorCodes() []DomainErrorCode
DomainErrorCodes returns all registered codes sorted by code.
type DynamicPanelFactory ¶ added in v0.23.0
type DynamicPanelFactory struct {
// contains filtered or unexported fields
}
DynamicPanelFactory builds CRUD panels from CMS content types.
func NewDynamicPanelFactory ¶ added in v0.23.0
func NewDynamicPanelFactory(admin *Admin, opts ...DynamicPanelFactoryOption) *DynamicPanelFactory
NewDynamicPanelFactory constructs a factory for dynamic content type panels.
func (*DynamicPanelFactory) CreatePanelFromContentType ¶ added in v0.23.0
func (f *DynamicPanelFactory) CreatePanelFromContentType(ctx context.Context, contentType *CMSContentType) (*Panel, error)
CreatePanelFromContentType generates and registers a panel for a content type.
func (*DynamicPanelFactory) RefreshPanel ¶ added in v0.23.0
func (f *DynamicPanelFactory) RefreshPanel(ctx context.Context, contentType *CMSContentType) error
RefreshPanel updates an existing panel when the content type changes.
func (*DynamicPanelFactory) RemovePanel ¶ added in v0.23.0
func (f *DynamicPanelFactory) RemovePanel(ctx context.Context, slugOrID string) error
RemovePanel removes a panel when a content type is deleted.
type DynamicPanelFactoryOption ¶ added in v0.23.0
type DynamicPanelFactoryOption func(*DynamicPanelFactory)
DynamicPanelFactoryOption customizes the factory.
func WithDynamicPanelHooks ¶ added in v0.23.0
func WithDynamicPanelHooks(hooks DynamicPanelHooks) DynamicPanelFactoryOption
WithDynamicPanelHooks sets lifecycle hooks for the factory.
func WithDynamicPanelMenu ¶ added in v0.23.0
func WithDynamicPanelMenu(basePath, menuCode, menuParent, locale string) DynamicPanelFactoryOption
WithDynamicPanelMenu configures navigation defaults for dynamic panels.
func WithDynamicPanelSchemaConverter ¶ added in v0.23.0
func WithDynamicPanelSchemaConverter(converter *SchemaToFieldsConverter) DynamicPanelFactoryOption
WithDynamicPanelSchemaConverter sets a schema converter.
func WithDynamicPanelSchemaValidator ¶ added in v0.23.0
func WithDynamicPanelSchemaValidator(validator SchemaValidator) DynamicPanelFactoryOption
WithDynamicPanelSchemaValidator sets a schema validator.
type DynamicPanelHooks ¶ added in v0.23.0
type DynamicPanelHooks struct {
BeforeCreate func(ctx context.Context, contentType *CMSContentType) error `json:"before_create"`
AfterCreate func(ctx context.Context, panel *Panel) error `json:"after_create"`
BeforeUpdate func(ctx context.Context, contentType *CMSContentType) error `json:"before_update"`
AfterUpdate func(ctx context.Context, panel *Panel) error `json:"after_update"`
}
DynamicPanelHooks exposes lifecycle callbacks for panel creation.
type EffectiveScope ¶ added in v0.83.0
type EffectiveScope struct {
TenantID string `json:"tenant_id"`
OrgID string `json:"org_id"`
Source string `json:"source,omitempty"`
}
EffectiveScope is the resolved tenant/org scope for a request or background operation.
type EnhancedActionNegotiationConfig ¶ added in v0.86.0
type EnhancedActionNegotiationConfig struct {
RequestHeader string `json:"request_header,omitempty"`
RequestHeaderValue string `json:"request_header_value,omitempty"`
RequestMediaTypes []string `json:"request_media_types,omitempty"`
ResponseMediaType string `json:"response_media_type,omitempty"`
}
func DefaultEnhancedActionNegotiationConfig ¶ added in v0.86.0
func DefaultEnhancedActionNegotiationConfig() EnhancedActionNegotiationConfig
type EnhancedActionRuntimeOptions ¶ added in v0.86.0
type EnhancedActionRuntimeOptions struct {
RequestHeader string `json:"request_header,omitempty"`
RequestHeaderValue string `json:"request_header_value,omitempty"`
Accept string `json:"accept,omitempty"`
}
func EnhancedActionRuntimeOptionsFromConfig ¶ added in v0.86.0
func EnhancedActionRuntimeOptionsFromConfig(cfg EnhancedActionNegotiationConfig) EnhancedActionRuntimeOptions
type EnhancedFragment ¶ added in v0.86.0
type EnhancedFragment struct {
Selector string `json:"selector"`
Mode string `json:"mode"`
HTML string `json:"html"`
}
func RenderFamilyDetailFragments ¶ added in v0.86.0
func RenderFamilyDetailFragments(targets []FamilyDetailFragmentTarget, renderer FamilyDetailFragmentRenderer) ([]EnhancedFragment, error)
RenderFamilyDetailFragments renders server-authored family detail fragments. The first enhanced SSR convention supports only known targets and replace mode.
func RenderFamilyDetailFragmentsFromData ¶ added in v0.86.0
func RenderFamilyDetailFragmentsFromData(data map[string]any) ([]EnhancedFragment, error)
type EnhancedMutationError ¶ added in v0.86.0
type EnhancedMutationResponder ¶ added in v0.86.0
type EnhancedMutationResponder struct {
ErrorPresenter ErrorPresenter
MediaType string
}
func NewEnhancedMutationResponder ¶ added in v0.86.0
func NewEnhancedMutationResponder(presenter ...ErrorPresenter) EnhancedMutationResponder
func (EnhancedMutationResponder) Respond ¶ added in v0.86.0
func (r EnhancedMutationResponder) Respond(c router.Context, req crud.MutationRequest, presentation MutationPresentation, fallback MutationFallback) error
func (EnhancedMutationResponder) RespondError ¶ added in v0.86.0
func (r EnhancedMutationResponder) RespondError(c router.Context, req crud.MutationRequest, err error, fallback MutationFallback) error
func (EnhancedMutationResponder) WithMediaType ¶ added in v0.86.0
func (r EnhancedMutationResponder) WithMediaType(mediaType string) EnhancedMutationResponder
type EnhancedToast ¶ added in v0.86.0
type EnsureMenuParentsOptions ¶
type EnsureMenuParentsOptions struct {
MenuSvc CMSMenuService `json:"menu_svc"`
MenuCode string `json:"menu_code"`
Parents []MenuItem `json:"parents"`
Locale string `json:"locale"`
}
EnsureMenuParentsOptions controls how parent/group menu items are scaffolded.
type EntryNavigationEvaluation ¶ added in v0.111.0
type EntryNavigationEvaluation struct {
}
EntryNavigationEvaluation is the normalized read/write contract for an entry.
func EvaluateEntryNavigation ¶ added in v0.111.0
func EvaluateEntryNavigation(rawOverrides any, policy EntryNavigationPolicy, strict bool) (EntryNavigationEvaluation, error)
EvaluateEntryNavigation normalizes overrides and computes effective menu locations and visibility for a policy. Strict mode rejects invalid locations and disabled policies; non-strict mode drops invalid locations and returns an empty result for disabled policies.
func EvaluateEntryNavigationFromRecord ¶ added in v0.111.0
func EvaluateEntryNavigationFromRecord(record map[string]any, policy EntryNavigationPolicy) (EntryNavigationEvaluation, bool)
EvaluateEntryNavigationFromRecord extracts _navigation from a record and computes the effective entry-navigation contract.
type EntryNavigationOptions ¶ added in v0.111.0
type EntryNavigationOptions struct {
}
EntryNavigationOptions configures reusable entry navigation visibility.
type EntryNavigationPolicy ¶ added in v0.111.0
type EntryNavigationPolicy struct {
}
EntryNavigationPolicy declares the content-type policy used to evaluate entry-level navigation visibility.
func EntryNavigationPolicyFromContentType ¶ added in v0.111.0
func EntryNavigationPolicyFromContentType(contentType CMSContentType) EntryNavigationPolicy
EntryNavigationPolicyFromContentType builds the entry-navigation policy from a CMS content type's capabilities.navigation contract.
func EntryNavigationPolicyFromOptions ¶ added in v0.111.0
func EntryNavigationPolicyFromOptions(contentType CMSContentType, options EntryNavigationOptions) EntryNavigationPolicy
EntryNavigationPolicyFromOptions builds the merged entry-navigation policy for a content type using global options, capabilities.navigation, per-type options, and exclusions in that order.
func ResolveEntryNavigationPolicy ¶ added in v0.111.0
func ResolveEntryNavigationPolicy(ctx context.Context, service CMSContentTypeService, contentTypeKey string) (EntryNavigationPolicy, bool)
ResolveEntryNavigationPolicy resolves a content type by slug or ID and returns its entry-navigation policy.
func ResolveEntryNavigationPolicyWithOptions ¶ added in v0.111.0
func ResolveEntryNavigationPolicyWithOptions(ctx context.Context, service CMSContentTypeService, contentTypeKey string, options EntryNavigationOptions) (EntryNavigationPolicy, bool)
ResolveEntryNavigationPolicyWithOptions resolves and merges entry navigation options for a content type.
type EntryNavigationTypeOptions ¶ added in v0.111.0
type EntryNavigationTypeOptions struct {
}
EntryNavigationTypeOptions narrows or disables entry navigation for a content type.
type EntryNavigationViewModel ¶ added in v0.111.0
type EntryNavigationViewModel struct {
}
EntryNavigationViewModel is the server-authored state used by templates and progressive enhancement code.
func BuildEntryNavigationViewModel ¶ added in v0.111.0
func BuildEntryNavigationViewModel(input EntryNavigationViewModelInput) (EntryNavigationViewModel, error)
BuildEntryNavigationViewModel resolves visibility, editability, and effective navigation state for a content entry.
func (EntryNavigationViewModel) ToMap ¶ added in v0.111.0
func (m EntryNavigationViewModel) ToMap() map[string]any
ToMap returns a template-friendly map using the JSON field names.
type EntryNavigationViewModelInput ¶ added in v0.111.0
type EntryNavigationViewModelInput struct {
}
EntryNavigationViewModelInput contains server state needed to build a view model.
type EnvironmentInfo ¶ added in v0.24.0
type EnvironmentInfo struct {
GoVersion string `json:"go_version,omitempty"`
AppVersion string `json:"app_version,omitempty"`
Environment string `json:"environment,omitempty"`
Debug bool `json:"debug"`
ConfigVars map[string]string `json:"config_vars,omitempty"`
Deployment *DeploymentIdentitySnapshot `json:"deployment,omitempty"`
}
EnvironmentInfo holds runtime environment details.
type ErrorConfig ¶ added in v0.24.0
type ErrorConfig struct {
// DevMode enables developer-friendly error responses.
DevMode bool `json:"dev_mode"`
// IncludeStackTrace controls stack trace inclusion when DevMode is false.
IncludeStackTrace bool `json:"include_stack_trace"`
// ExposeInternalMessages allows internal error messages to reach clients.
ExposeInternalMessages bool `json:"expose_internal_messages"`
// InternalMessage is the default message for internal errors when not exposed.
InternalMessage string `json:"internal_message"`
// SourceContextLines controls how many lines of source code to show around errors.
// Default is 7 lines before and after.
SourceContextLines int `json:"source_context_lines"`
// MaxStackFrames limits the number of stack frames to display.
// Default is 20 frames.
MaxStackFrames int `json:"max_stack_frames"`
// ShowRequestHeaders includes HTTP headers in dev error pages.
ShowRequestHeaders bool `json:"show_request_headers"`
// ShowRequestBody includes request body in dev error pages.
ShowRequestBody bool `json:"show_request_body"`
// ShowEnvironment includes environment info in dev error pages.
ShowEnvironment bool `json:"show_environment"`
// AppVersion is displayed in the error page environment section.
AppVersion string `json:"app_version"`
// AppRoots ranks host application source paths ahead of framework paths in dev error pages.
AppRoots []string `json:"app_roots,omitempty"`
}
ErrorConfig controls how errors are presented to clients.
type ErrorPresenter ¶ added in v0.24.0
type ErrorPresenter struct {
Config ErrorConfig `json:"config"`
Mappers []goerrors.ErrorMapper `json:"mappers"`
// contains filtered or unexported fields
}
func DefaultErrorPresenter ¶ added in v0.24.0
func DefaultErrorPresenter() ErrorPresenter
DefaultErrorPresenter returns the presenter used by writeError.
func NewErrorPresenter ¶ added in v0.24.0
func NewErrorPresenter(cfg ErrorConfig, mappers ...goerrors.ErrorMapper) ErrorPresenter
NewErrorPresenter constructs an error presenter with default mappers.
func (ErrorPresenter) BuildDevErrorContext ¶ added in v0.24.0
func (p ErrorPresenter) BuildDevErrorContext(err error, reqInfo *RequestInfo) *DevErrorContext
BuildDevErrorContext creates an enriched error context for developer error pages.
func (ErrorPresenter) DeploymentIdentity ¶ added in v0.122.0
func (p ErrorPresenter) DeploymentIdentity() DeploymentIdentity
DeploymentIdentity returns the identity attached to this presenter.
func (ErrorPresenter) ErrorResponse ¶ added in v0.116.0
func (p ErrorPresenter) ErrorResponse(mapped *goerrors.Error) ErrorResponse
ErrorResponse converts a presenter-normalized error into go-admin's API contract. Diagnostic source locations and stacks remain opt-in.
func (ErrorPresenter) IncludeStackTrace ¶ added in v0.24.0
func (p ErrorPresenter) IncludeStackTrace() bool
IncludeStackTrace returns whether stack traces should be included in responses.
func (ErrorPresenter) Present ¶ added in v0.24.0
func (p ErrorPresenter) Present(err error) (*goerrors.Error, int)
Present maps an error to a go-errors error and status code.
func (ErrorPresenter) PresentWithContext ¶ added in v0.24.0
PresentWithContext maps an error and enriches it with request metadata.
func (ErrorPresenter) WithDeploymentIdentity ¶ added in v0.122.0
func (p ErrorPresenter) WithDeploymentIdentity(identity DeploymentIdentity) ErrorPresenter
WithDeploymentIdentity returns a presenter carrying the already-resolved process identity. It does not perform metadata discovery.
type ErrorResponse ¶ added in v0.116.0
type ErrorResponse struct {
Error *PresentedError `json:"error"`
}
ErrorResponse is the go-admin API error envelope. ErrorPresenter mappers own the client-safe message and metadata contract exposed by this response.
type ExportColumn ¶
ExportColumn describes a column available for export.
type ExportConfig ¶
type ExportConfig struct {
Definition string `json:"definition"`
Variant string `json:"variant,omitempty"`
Endpoint string `json:"endpoint"`
}
ExportConfig captures export metadata for UI consumers.
type ExportDefinition ¶
type ExportDefinition struct {
Name string `json:"name"`
Label string `json:"label,omitempty"`
Variants []string `json:"variants,omitempty"`
}
ExportDefinition is the minimal shape surfaced by the export registry.
type ExportHTTPRegistrar ¶
type ExportHTTPRegistrar interface {
RegisterExportRoutes(router AdminRouter, opts ExportRouteOptions) error
}
ExportHTTPRegistrar registers export HTTP endpoints on a router.
type ExportMetadata ¶
type ExportMetadata struct {
Formats []string `json:"formats,omitempty"`
Columns []ExportColumn `json:"columns,omitempty"`
}
ExportMetadata captures UI-facing export metadata.
type ExportMetadataProvider ¶
type ExportMetadataProvider interface {
ExportMetadata(ctx context.Context, definition, variant string) (ExportMetadata, error)
}
ExportMetadataProvider fetches formats/columns for a definition and variant.
type ExportRegistry ¶
type ExportRegistry interface {
ListDefinitions(ctx context.Context) ([]ExportDefinition, error)
GetDefinition(ctx context.Context, name string) (ExportDefinition, error)
}
ExportRegistry lists or fetches export definitions.
type ExportRouteOptions ¶
type ExportRouteOptions struct {
BasePath string `json:"base_path"`
Wrap ExportRouteWrapper `json:"wrap"`
}
ExportRouteOptions configures export route registration.
type ExportRouteWrapper ¶
type ExportRouteWrapper func(router.HandlerFunc) router.HandlerFunc
ExportRouteWrapper wraps export handlers with auth or middleware.
type ExternalAssetConfig ¶ added in v0.126.1
type ExternalAssetConfig struct {
// IconoirCSS supplies the Iconoir icon stylesheet used by menu and control
// glyphs that no theme asset role covers.
IconoirCSS string `json:"iconoir_css,omitempty"`
// DataTablesCSS supplies the simple-datatables stylesheet.
DataTablesCSS string `json:"datatables_css,omitempty"`
// EChartsJS supplies the ECharts runtime used by dashboard charts.
EChartsJS string `json:"echarts_js,omitempty"`
}
ExternalAssetConfig points the admin document at specific copies of the third-party assets it renders with. Empty fields select the packaged default.
func (ExternalAssetConfig) Resolve ¶ added in v0.126.1
func (c ExternalAssetConfig) Resolve() ExternalAssetConfig
Resolve returns normalized explicit overrides. Empty fields intentionally remain empty so templates can resolve the packaged defaults against the request's base-path-aware asset_base_path.
func (ExternalAssetConfig) Validate ¶ added in v0.126.2
func (c ExternalAssetConfig) Validate() error
Validate rejects asset overrides that browsers could interpret as executable or scheme-relative URLs. Deployments may use an http(s) URL or a path relative to the current origin.
type FSMLifecycleActivitySinkAdapter ¶ added in v0.26.0
type FSMLifecycleActivitySinkAdapter struct {
// contains filtered or unexported fields
}
FSMLifecycleActivitySinkAdapter bridges go-command FSM lifecycle envelopes into admin activity entries.
func NewFSMLifecycleActivitySinkAdapter ¶ added in v0.26.0
func NewFSMLifecycleActivitySinkAdapter(sink ActivitySink) *FSMLifecycleActivitySinkAdapter
NewFSMLifecycleActivitySinkAdapter creates an adapter that forwards FSM lifecycle activity to an ActivitySink.
func (*FSMLifecycleActivitySinkAdapter) LogLifecycleActivity ¶ added in v0.26.0
func (a *FSMLifecycleActivitySinkAdapter) LogLifecycleActivity(ctx context.Context, envelope flow.LifecycleActivityEnvelope) error
LogLifecycleActivity maps a lifecycle envelope into an admin activity entry.
type FSMWorkflowEngine ¶ added in v0.26.0
type FSMWorkflowEngine struct {
// contains filtered or unexported fields
}
FSMWorkflowEngine is the canonical go-admin workflow adapter backed by go-command/flow.
func NewFSMWorkflowEngine ¶ added in v0.26.0
func NewFSMWorkflowEngine(opts ...FSMWorkflowEngineOption) *FSMWorkflowEngine
NewFSMWorkflowEngine creates a workflow engine backed by go-command/flow state machines.
func (*FSMWorkflowEngine) ApplyEvent ¶ added in v0.26.0
func (e *FSMWorkflowEngine) ApplyEvent(ctx context.Context, input WorkflowApplyEventRequest) (*WorkflowApplyEventResponse, error)
ApplyEvent applies an event using canonical FSM envelopes.
func (*FSMWorkflowEngine) AttachActivitySink ¶ added in v0.26.0
func (e *FSMWorkflowEngine) AttachActivitySink(sink ActivitySink) error
AttachActivitySink wires lifecycle activity projection and refreshes existing machines.
func (*FSMWorkflowEngine) HasWorkflow ¶ added in v0.26.0
func (e *FSMWorkflowEngine) HasWorkflow(entityType string) bool
HasWorkflow reports whether a workflow definition exists for an entity type.
func (*FSMWorkflowEngine) RegisterAction ¶ added in v0.26.0
func (e *FSMWorkflowEngine) RegisterAction(name string, action WorkflowActionFunc) error
RegisterAction registers a workflow action handler.
func (*FSMWorkflowEngine) RegisterDynamicTarget ¶ added in v0.26.0
func (e *FSMWorkflowEngine) RegisterDynamicTarget(ref string, resolver WorkflowDynamicTargetResolver) error
RegisterDynamicTarget registers a named dynamic target resolver.
func (*FSMWorkflowEngine) RegisterGuard ¶ added in v0.26.0
func (e *FSMWorkflowEngine) RegisterGuard(ref string, guard WorkflowGuardFunc) error
RegisterGuard registers a named guard resolver.
func (*FSMWorkflowEngine) RegisterWorkflow ¶ added in v0.26.0
func (e *FSMWorkflowEngine) RegisterWorkflow(entityType string, definition WorkflowDefinition) error
RegisterWorkflow installs or replaces a workflow definition for an entity type.
func (*FSMWorkflowEngine) Snapshot ¶ added in v0.26.0
func (e *FSMWorkflowEngine) Snapshot(ctx context.Context, input WorkflowSnapshotRequest) (*WorkflowSnapshot, error)
Snapshot returns current state plus transition availability/rejections.
func (*FSMWorkflowEngine) UnregisterWorkflow ¶ added in v0.27.0
func (e *FSMWorkflowEngine) UnregisterWorkflow(entityType string) error
UnregisterWorkflow removes a registered machine definition and state machine.
func (*FSMWorkflowEngine) WorkflowDefinition ¶ added in v0.26.0
func (e *FSMWorkflowEngine) WorkflowDefinition(entityType string) (WorkflowDefinition, bool)
WorkflowDefinition returns the currently registered workflow definition.
type FSMWorkflowEngineOption ¶ added in v0.26.0
type FSMWorkflowEngineOption func(*FSMWorkflowEngine)
FSMWorkflowEngineOption customizes FSMWorkflowEngine behavior.
func WithFSMWorkflowActivitySink ¶ added in v0.26.0
func WithFSMWorkflowActivitySink(sink ActivitySink) FSMWorkflowEngineOption
WithFSMWorkflowActivitySink projects lifecycle events into admin activity sink.
func WithFSMWorkflowExecutionPolicy ¶ added in v0.26.0
func WithFSMWorkflowExecutionPolicy(policy flow.ExecutionPolicy) FSMWorkflowEngineOption
WithFSMWorkflowExecutionPolicy sets execution policy used by compiled machines.
func WithFSMWorkflowHookFailureMode ¶ added in v0.26.0
func WithFSMWorkflowHookFailureMode(mode flow.HookFailureMode) FSMWorkflowEngineOption
WithFSMWorkflowHookFailureMode sets lifecycle hook failure mode.
func WithFSMWorkflowIdempotencyStore ¶ added in v0.26.0
func WithFSMWorkflowIdempotencyStore(store flow.IdempotencyStore[WorkflowMessage]) FSMWorkflowEngineOption
WithFSMWorkflowIdempotencyStore sets an explicit idempotency store.
func WithFSMWorkflowLifecycleHooks ¶ added in v0.26.0
func WithFSMWorkflowLifecycleHooks(hooks ...flow.TransitionLifecycleHook[WorkflowMessage]) FSMWorkflowEngineOption
WithFSMWorkflowLifecycleHooks appends lifecycle hooks.
func WithFSMWorkflowLogger ¶ added in v0.26.0
func WithFSMWorkflowLogger(logger flow.Logger) FSMWorkflowEngineOption
WithFSMWorkflowLogger sets a flow logger used by state machines.
func WithFSMWorkflowStateStore ¶ added in v0.26.0
func WithFSMWorkflowStateStore(store flow.StateStore) FSMWorkflowEngineOption
WithFSMWorkflowStateStore sets an explicit state store.
type FamilyDetailFragmentRenderer ¶ added in v0.86.0
type FamilyDetailFragmentRenderer func(FamilyDetailFragmentTarget) (string, error)
type FamilyDetailFragmentTarget ¶ added in v0.86.0
type FamilyDetailFragmentTarget string
const ( FamilyDetailFragmentLocaleCoverage FamilyDetailFragmentTarget = "locale_coverage" FamilyDetailFragmentAssignments FamilyDetailFragmentTarget = "assignments" FamilyDetailFragmentPublishGate FamilyDetailFragmentTarget = "publish_gate" FamilyDetailFragmentActivity FamilyDetailFragmentTarget = "activity" )
func FamilyDetailFragmentTargets ¶ added in v0.86.0
func FamilyDetailFragmentTargets() []FamilyDetailFragmentTarget
type FeatureDependencyError ¶
type FeatureDependencyError struct {
Feature string `json:"feature"`
Missing []string `json:"missing"`
}
FeatureDependencyError captures missing dependencies for an enabled feature.
func (FeatureDependencyError) Error ¶
func (e FeatureDependencyError) Error() string
func (FeatureDependencyError) Unwrap ¶
func (e FeatureDependencyError) Unwrap() error
type FeatureDisabledError ¶
FeatureDisabledError includes the specific feature name and optional reason.
func (FeatureDisabledError) Error ¶
func (e FeatureDisabledError) Error() string
func (FeatureDisabledError) Unwrap ¶
func (e FeatureDisabledError) Unwrap() error
type FeatureFlagsModule ¶ added in v0.21.0
type FeatureFlagsModule struct {
// contains filtered or unexported fields
}
FeatureFlagsModule registers the feature flags UI navigation entry.
func NewFeatureFlagsModule ¶ added in v0.21.0
func NewFeatureFlagsModule() *FeatureFlagsModule
NewFeatureFlagsModule constructs the default feature flags module.
func (*FeatureFlagsModule) Manifest ¶ added in v0.21.0
func (m *FeatureFlagsModule) Manifest() ModuleManifest
func (*FeatureFlagsModule) MenuItems ¶ added in v0.21.0
func (m *FeatureFlagsModule) MenuItems(locale string) []MenuItem
func (*FeatureFlagsModule) Register ¶ added in v0.21.0
func (m *FeatureFlagsModule) Register(ctx ModuleContext) error
func (*FeatureFlagsModule) RouteContract ¶ added in v0.27.0
func (m *FeatureFlagsModule) RouteContract() routing.ModuleContract
func (*FeatureFlagsModule) WithBasePath ¶ added in v0.24.0
func (m *FeatureFlagsModule) WithBasePath(basePath string) *FeatureFlagsModule
WithBasePath sets the base path used for menu item targets (e.g., /admin).
func (*FeatureFlagsModule) WithMenuParent ¶ added in v0.21.0
func (m *FeatureFlagsModule) WithMenuParent(parent string) *FeatureFlagsModule
WithMenuParent nests the feature flags navigation under a parent menu item ID.
type FeatureKey ¶
type FeatureKey string
FeatureKey enumerates supported feature flag keys.
const ( FeatureDashboard FeatureKey = "dashboard" FeatureActivity FeatureKey = "activity" FeaturePreview FeatureKey = "preview" FeatureSearch FeatureKey = "search" FeatureExport FeatureKey = "export" FeatureCMS FeatureKey = "cms" FeatureJobs FeatureKey = "jobs" FeatureCommands FeatureKey = "commands" FeatureSettings FeatureKey = "settings" FeatureNotifications FeatureKey = "notifications" FeatureMedia FeatureKey = "media" FeatureBulk FeatureKey = "bulk" FeaturePreferences FeatureKey = "preferences" FeatureProfile FeatureKey = "profile" FeatureUsers FeatureKey = "users" FeatureTenants FeatureKey = "tenants" FeatureOrganizations FeatureKey = "organizations" FeatureTranslationExchange FeatureKey = "translations.exchange" FeatureTranslationQueue FeatureKey = "translations.queue" FeatureTranslationQAStyle FeatureKey = "translations.qa.style" FeatureTranslationQATerms FeatureKey = "translations.qa.terminology" )
type Field ¶
type Field struct {
Name string `json:"name"`
Label string `json:"label"`
LabelKey string `json:"label_key,omitempty"`
Type string `json:"type"`
Required bool `json:"required"`
ReadOnly bool `json:"read_only"`
Hidden bool `json:"hidden"`
Options []Option `json:"options,omitempty"`
Validation string `json:"validation,omitempty"`
}
Field describes a panel field.
type FieldTypeCategory ¶ added in v0.24.0
type FieldTypeCategory struct {
ID string `json:"id"`
Label string `json:"label"`
Icon string `json:"icon,omitempty"`
Order int `json:"order"`
Collapsed bool `json:"collapsed,omitempty"`
}
FieldTypeCategory describes a palette group.
type FieldTypeCategoryGroup ¶ added in v0.24.0
type FieldTypeCategoryGroup struct {
Category FieldTypeCategory `json:"category"`
FieldTypes []FieldTypeDefinition `json:"field_types"`
}
FieldTypeCategoryGroup bundles field types by category.
func BlockFieldTypeGroups ¶ added in v0.24.0
func BlockFieldTypeGroups() []FieldTypeCategoryGroup
BlockFieldTypeGroups exposes the default grouped palette for the Block IDE.
type FieldTypeDefinition ¶ added in v0.24.0
type FieldTypeDefinition struct {
Type string `json:"type"`
Label string `json:"label"`
Description string `json:"description,omitempty"`
Category string `json:"category"`
Icon string `json:"icon,omitempty"`
Defaults map[string]any `json:"defaults,omitempty"`
Order int `json:"order"`
}
FieldTypeDefinition describes a single field option in the Block Library palette.
type FieldTypeRegistry ¶ added in v0.24.0
type FieldTypeRegistry struct {
// contains filtered or unexported fields
}
FieldTypeRegistry stores field type metadata for the Block Library palette.
func DefaultBlockFieldTypeRegistry ¶ added in v0.24.0
func DefaultBlockFieldTypeRegistry() *FieldTypeRegistry
DefaultBlockFieldTypeRegistry returns the default block field type registry.
func NewFieldTypeRegistry ¶ added in v0.24.0
func NewFieldTypeRegistry() *FieldTypeRegistry
NewFieldTypeRegistry constructs an empty registry.
func (*FieldTypeRegistry) Categories ¶ added in v0.24.0
func (r *FieldTypeRegistry) Categories() []FieldTypeCategory
Categories returns registered categories ordered by position then ID.
func (*FieldTypeRegistry) FieldTypes ¶ added in v0.24.0
func (r *FieldTypeRegistry) FieldTypes() []FieldTypeDefinition
FieldTypes returns registered field types ordered by category then position.
func (*FieldTypeRegistry) Groups ¶ added in v0.24.0
func (r *FieldTypeRegistry) Groups() []FieldTypeCategoryGroup
Groups returns field types grouped by category in order.
func (*FieldTypeRegistry) Register ¶ added in v0.24.0
func (r *FieldTypeRegistry) Register(def FieldTypeDefinition)
Register adds or replaces a field type definition.
func (*FieldTypeRegistry) RegisterCategory ¶ added in v0.24.0
func (r *FieldTypeRegistry) RegisterCategory(category FieldTypeCategory)
RegisterCategory adds or replaces a category definition.
type FieldsLogger ¶ added in v0.25.0
type FieldsLogger = glog.FieldsLogger
FieldsLogger is an optional structured logging extension.
type Filter ¶
type Filter struct {
Name string `json:"name"`
Label string `json:"label,omitempty"`
LabelKey string `json:"label_key,omitempty"`
Type string `json:"type"`
Operators []string `json:"operators,omitempty"`
DefaultOperator string `json:"default_operator,omitempty"`
Options []Option `json:"options,omitempty"`
}
Filter defines a filter input.
type FilterOnlyRequestValidator ¶ added in v0.117.0
type FilterOnlyRequestValidator interface {
ValidateFilterOnlyRequest(ctx context.Context, req SearchRequest) error
}
FilterOnlyRequestValidator is an optional capability for providers that can prove a blank-query request retains at least one effective bounded constraint.
type FormgenSchemaValidator ¶ added in v0.23.0
type FormgenSchemaValidator struct {
// contains filtered or unexported fields
}
func NewFormgenSchemaValidator ¶ added in v0.23.0
func NewFormgenSchemaValidator(basePath string) (*FormgenSchemaValidator, error)
NewFormgenSchemaValidator builds a formgen-backed schema validator/previewer.
func NewFormgenSchemaValidatorWithAPIBase ¶ added in v0.24.0
func NewFormgenSchemaValidatorWithAPIBase(basePath, apiBase string) (*FormgenSchemaValidator, error)
NewFormgenSchemaValidatorWithAPIBase builds a formgen-backed schema validator/previewer with an explicit API base.
func (*FormgenSchemaValidator) Preview ¶ added in v0.23.0
func (v *FormgenSchemaValidator) Preview(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) ([]byte, error)
Preview renders a form preview from a schema.
func (*FormgenSchemaValidator) RenderForm ¶ added in v0.24.0
func (v *FormgenSchemaValidator) RenderForm(ctx context.Context, schema map[string]any, opts SchemaValidationOptions, renderOpts formgenrender.RenderOptions) (string, error)
RenderForm renders HTML for a schema using formgen with custom render options.
func (*FormgenSchemaValidator) Validate ¶ added in v0.23.0
func (v *FormgenSchemaValidator) Validate(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) error
Validate verifies that a schema can be normalized by go-formgen.
type GoAuthAuthenticator ¶
type GoAuthAuthenticator struct {
// contains filtered or unexported fields
}
GoAuthAuthenticator adapts a go-auth RouteAuthenticator to the Authenticator contract.
func NewGoAuthAuthenticator ¶
func NewGoAuthAuthenticator(routeAuth *auth.RouteAuthenticator, cfg auth.Config, opts ...GoAuthAuthenticatorOption) *GoAuthAuthenticator
NewGoAuthAuthenticator builds an Authenticator that executes the protected go-auth middleware.
func NewProtectedSurfaceAuthenticator ¶ added in v0.58.0
func NewProtectedSurfaceAuthenticator(routeAuth *auth.RouteAuthenticator, cfg auth.Config, scope ProtectedSurfaceScope, opts ...GoAuthAuthenticatorOption) *GoAuthAuthenticator
NewProtectedSurfaceAuthenticator builds an authenticator for a named protected surface.
func (*GoAuthAuthenticator) AuthenticateRequest ¶ added in v0.48.0
func (a *GoAuthAuthenticator) AuthenticateRequest(ctx router.Context) error
AuthenticateRequest enforces authentication without browser redirects. This is suitable for websocket upgrades and other non-HTML transports.
func (*GoAuthAuthenticator) EnforceBrowserCSRF ¶ added in v0.32.0
func (a *GoAuthAuthenticator) EnforceBrowserCSRF(c router.Context) error
func (*GoAuthAuthenticator) UsesBrowserSession ¶ added in v0.32.0
func (a *GoAuthAuthenticator) UsesBrowserSession(c router.Context) bool
func (*GoAuthAuthenticator) Wrap ¶
func (a *GoAuthAuthenticator) Wrap(ctx router.Context) error
Wrap runs the underlying go-auth middleware to enforce authentication.
func (*GoAuthAuthenticator) WrapHandler ¶
func (a *GoAuthAuthenticator) WrapHandler(handler router.HandlerFunc) router.HandlerFunc
WrapHandler runs the go-auth middleware around the provided handler.
type GoAuthAuthenticatorOption ¶
type GoAuthAuthenticatorOption func(*GoAuthAuthenticator)
GoAuthAuthenticatorOption configures the go-auth authenticator adapter.
func WithAuthErrorHandler ¶
func WithAuthErrorHandler(handler func(router.Context, error) error) GoAuthAuthenticatorOption
WithAuthErrorHandler overrides the error handler used by the wrapped go-auth middleware.
func WithBrowserProtectionConfig ¶ added in v0.131.6
func WithBrowserProtectionConfig(config auth.BrowserProtectionConfig) GoAuthAuthenticatorOption
WithBrowserProtectionConfig overrides the browser CSRF/origin protection contract while retaining controlled go-admin defaults for omitted handlers.
func WithOptionalAuth ¶
func WithOptionalAuth(optional bool) GoAuthAuthenticatorOption
WithOptionalAuth allows requests without a valid token to proceed (client-side guards).
func WithProtectedSurfaceRoots ¶ added in v0.58.0
func WithProtectedSurfaceRoots(browserRoots, apiRoots []string) GoAuthAuthenticatorOption
WithProtectedSurfaceRoots overrides the browser and API roots used to choose protected-surface browser vs API auth behavior.
type GoAuthAuthorizer ¶
type GoAuthAuthorizer struct {
// contains filtered or unexported fields
}
GoAuthAuthorizer adapts auth claims/resource roles to the admin Authorizer contract.
func NewGoAuthAuthorizer ¶
func NewGoAuthAuthorizer(cfg GoAuthAuthorizerConfig) *GoAuthAuthorizer
NewGoAuthAuthorizer builds an Authorizer backed by go-auth claims.
func (*GoAuthAuthorizer) Can ¶
Can evaluates permission strings (admin.<resource>.<action>) against go-auth claims. It normalizes the action (e.g., "view" → "read") and checks if the user's resource role grants that capability using the AuthClaims interface methods.
func (*GoAuthAuthorizer) CanAll ¶ added in v0.25.0
CanAll returns true when all permissions are allowed.
func (*GoAuthAuthorizer) CanAny ¶ added in v0.25.0
CanAny returns true when at least one permission is allowed.
func (*GoAuthAuthorizer) PermissionResolverMetrics ¶ added in v0.25.0
func (a *GoAuthAuthorizer) PermissionResolverMetrics() PermissionResolverMetrics
PermissionResolverMetrics exposes resolver/caching runtime counters.
func (*GoAuthAuthorizer) ResolvedPermissions ¶ added in v0.25.0
func (a *GoAuthAuthorizer) ResolvedPermissions(ctx context.Context) []string
ResolvedPermissions returns the deduplicated permission set resolved for the request context.
type GoAuthAuthorizerConfig ¶
type GoAuthAuthorizerConfig struct {
DefaultResource string `json:"default_resource"`
AdminResourceAliases []string `json:"admin_resource_aliases,omitempty"`
Debug bool `json:"debug"`
Logger Logger `json:"logger"`
StrictResolver bool `json:"strict_resolver"`
ResolvePermissions PermissionResolverFunc `json:"resolve_permissions"`
}
GoAuthAuthorizerConfig configures resource resolution.
type GoCMSContainerAdapter ¶
type GoCMSContainerAdapter struct {
// contains filtered or unexported fields
}
GoCMSContainerAdapter maps go-cms containers/modules into the admin CMSContainer contract.
func NewGoCMSContainerAdapter ¶
func NewGoCMSContainerAdapter(container any) *GoCMSContainerAdapter
NewGoCMSContainerAdapter inspects a go-cms module or container and wraps available services.
func (*GoCMSContainerAdapter) ActiveLocales ¶ added in v0.27.0
func (c *GoCMSContainerAdapter) ActiveLocales(ctx context.Context) ([]string, error)
func (*GoCMSContainerAdapter) ContentService ¶
func (c *GoCMSContainerAdapter) ContentService() CMSContentService
func (*GoCMSContainerAdapter) ContentTypeService ¶ added in v0.23.0
func (c *GoCMSContainerAdapter) ContentTypeService() CMSContentTypeService
func (*GoCMSContainerAdapter) MenuService ¶
func (c *GoCMSContainerAdapter) MenuService() CMSMenuService
func (*GoCMSContainerAdapter) WidgetService ¶
func (c *GoCMSContainerAdapter) WidgetService() CMSWidgetService
type GoCMSContentAdapter ¶ added in v0.23.0
type GoCMSContentAdapter struct {
// contains filtered or unexported fields
}
GoCMSContentAdapter maps go-cms content/block services into CMSContentService. It uses the typed public go-cms contracts.
func (*GoCMSContentAdapter) BlockDefinitionVersions ¶ added in v0.24.0
func (a *GoCMSContentAdapter) BlockDefinitionVersions(ctx context.Context, id string) ([]CMSBlockDefinitionVersion, error)
BlockDefinitionVersions returns the schema version history for a block definition.
func (*GoCMSContentAdapter) BlockDefinitions ¶ added in v0.23.0
func (a *GoCMSContentAdapter) BlockDefinitions(ctx context.Context) ([]CMSBlockDefinition, error)
func (*GoCMSContentAdapter) BlocksForContent ¶ added in v0.23.0
func (*GoCMSContentAdapter) Content ¶ added in v0.23.0
func (a *GoCMSContentAdapter) Content(ctx context.Context, id, locale string) (*CMSContent, error)
func (*GoCMSContentAdapter) Contents ¶ added in v0.23.0
func (a *GoCMSContentAdapter) Contents(ctx context.Context, locale string) ([]CMSContent, error)
func (*GoCMSContentAdapter) ContentsWithOptions ¶ added in v0.24.0
func (a *GoCMSContentAdapter) ContentsWithOptions(ctx context.Context, locale string, opts ...CMSContentListOption) ([]CMSContent, error)
func (*GoCMSContentAdapter) CreateBlockDefinition ¶ added in v0.23.0
func (a *GoCMSContentAdapter) CreateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
func (*GoCMSContentAdapter) CreateContent ¶ added in v0.23.0
func (a *GoCMSContentAdapter) CreateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
func (*GoCMSContentAdapter) CreatePage ¶ added in v0.23.0
func (*GoCMSContentAdapter) CreateTranslation ¶ added in v0.25.0
func (a *GoCMSContentAdapter) CreateTranslation(ctx context.Context, input TranslationCreateInput) (*CMSContent, error)
CreateTranslation uses the typed go-cms admin write service. Older dynamic ContentTranslations/CreateTranslation shapes are intentionally unsupported so GoCMS wiring fails clearly instead of falling back to reflective shims.
func (*GoCMSContentAdapter) DeleteBlock ¶ added in v0.23.0
func (a *GoCMSContentAdapter) DeleteBlock(ctx context.Context, id string) error
func (*GoCMSContentAdapter) DeleteBlockDefinition ¶ added in v0.23.0
func (a *GoCMSContentAdapter) DeleteBlockDefinition(ctx context.Context, id string) error
func (*GoCMSContentAdapter) DeleteContent ¶ added in v0.23.0
func (a *GoCMSContentAdapter) DeleteContent(ctx context.Context, id string) error
func (*GoCMSContentAdapter) DeletePage ¶ added in v0.23.0
func (a *GoCMSContentAdapter) DeletePage(ctx context.Context, id string) error
func (*GoCMSContentAdapter) LegacyBlocksForContent ¶ added in v0.23.0
func (*GoCMSContentAdapter) ListContentTypeFamilies ¶ added in v0.103.0
func (a *GoCMSContentAdapter) ListContentTypeFamilies(ctx context.Context, contentType CMSContentType, opts ListOptions) ([]map[string]any, int, error)
func (*GoCMSContentAdapter) ListContentTypeRecords ¶ added in v0.103.0
func (a *GoCMSContentAdapter) ListContentTypeRecords(ctx context.Context, contentType CMSContentType, opts ListOptions) ([]map[string]any, int, error)
func (*GoCMSContentAdapter) PagesWithOptions ¶ added in v0.43.0
func (a *GoCMSContentAdapter) PagesWithOptions(ctx context.Context, locale string, opts ...CMSContentListOption) ([]CMSPage, error)
func (*GoCMSContentAdapter) SupportsContentListOption ¶ added in v0.113.10
func (a *GoCMSContentAdapter) SupportsContentListOption(option CMSContentListOption) bool
SupportsContentListOption lets hosts negotiate optional bounded list capabilities without sending unknown tokens to older adapters.
func (*GoCMSContentAdapter) UpdateBlockDefinition ¶ added in v0.23.0
func (a *GoCMSContentAdapter) UpdateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
func (*GoCMSContentAdapter) UpdateContent ¶ added in v0.23.0
func (a *GoCMSContentAdapter) UpdateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
func (*GoCMSContentAdapter) UpdatePage ¶ added in v0.23.0
type GoCMSContentTypeAdapter ¶ added in v0.23.0
type GoCMSContentTypeAdapter struct {
// contains filtered or unexported fields
}
GoCMSContentTypeAdapter maps go-cms content type service into CMSContentTypeService.
func (*GoCMSContentTypeAdapter) ContentType ¶ added in v0.23.0
func (a *GoCMSContentTypeAdapter) ContentType(ctx context.Context, id string) (*CMSContentType, error)
func (*GoCMSContentTypeAdapter) ContentTypeBySlug ¶ added in v0.23.0
func (a *GoCMSContentTypeAdapter) ContentTypeBySlug(ctx context.Context, slug string) (*CMSContentType, error)
func (*GoCMSContentTypeAdapter) ContentTypes ¶ added in v0.23.0
func (a *GoCMSContentTypeAdapter) ContentTypes(ctx context.Context) ([]CMSContentType, error)
func (*GoCMSContentTypeAdapter) CreateContentType ¶ added in v0.23.0
func (a *GoCMSContentTypeAdapter) CreateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
func (*GoCMSContentTypeAdapter) DeleteContentType ¶ added in v0.23.0
func (a *GoCMSContentTypeAdapter) DeleteContentType(ctx context.Context, id string) error
func (*GoCMSContentTypeAdapter) UpdateContentType ¶ added in v0.23.0
func (a *GoCMSContentTypeAdapter) UpdateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
type GoCMSMenuAdapter ¶
type GoCMSMenuAdapter struct {
// contains filtered or unexported fields
}
GoCMSMenuAdapter maps the go-cms menu service into the Admin CMSMenuService contract.
It enforces a string-first identity: - menu identity: menu code (sanitized to satisfy go-cms menu code validation) - item identity: dot-paths (menuCode + "." + segments)
UUIDs remain a go-cms persistence detail and are never supplied by go-admin.
func NewGoCMSMenuAdapter ¶
func NewGoCMSMenuAdapter(service cms.MenuService) *GoCMSMenuAdapter
NewGoCMSMenuAdapter wraps a go-cms MenuService.
func NewGoCMSMenuAdapterFromAny ¶
func NewGoCMSMenuAdapterFromAny(service any) *GoCMSMenuAdapter
NewGoCMSMenuAdapterFromAny wraps a go-cms MenuService exposed as any (used by adapter hooks).
func (*GoCMSMenuAdapter) AddMenuItem ¶
AddMenuItem upserts an item using go-cms path-based APIs.
func (*GoCMSMenuAdapter) CreateMenu ¶
CreateMenu ensures a menu exists.
func (*GoCMSMenuAdapter) DeleteMenuItem ¶
func (a *GoCMSMenuAdapter) DeleteMenuItem(ctx context.Context, menuCode, id string) error
DeleteMenuItem removes an item via go-cms path-based APIs.
func (*GoCMSMenuAdapter) GoCMSMenuService ¶
func (a *GoCMSMenuAdapter) GoCMSMenuService() cms.MenuService
GoCMSMenuService exposes the underlying go-cms menu service (used by quickstart seeding).
func (*GoCMSMenuAdapter) MenuByCodeWithOptions ¶ added in v0.26.0
func (a *GoCMSMenuAdapter) MenuByCodeWithOptions(ctx context.Context, code, locale string, opts SiteMenuReadOptions) (*Menu, error)
MenuByCodeWithOptions resolves a localized navigation tree by code using draft/preview/profile options when supported by the underlying go-cms service.
func (*GoCMSMenuAdapter) MenuByLocation ¶ added in v0.22.0
func (a *GoCMSMenuAdapter) MenuByLocation(ctx context.Context, location, locale string) (*Menu, error)
MenuByLocation resolves a localized navigation tree using menu locations.
func (*GoCMSMenuAdapter) MenuByLocationWithOptions ¶ added in v0.26.0
func (a *GoCMSMenuAdapter) MenuByLocationWithOptions(ctx context.Context, location, locale string, opts SiteMenuReadOptions) (*Menu, error)
MenuByLocationWithOptions resolves a localized navigation tree by location using draft/preview/profile options when supported by the underlying go-cms service.
func (*GoCMSMenuAdapter) MenuExists ¶ added in v0.122.0
MenuExists reports whether go-cms has a persistent menu record for code.
func (*GoCMSMenuAdapter) NavigationCoordinationReport ¶ added in v0.111.0
func (a *GoCMSMenuAdapter) NavigationCoordinationReport() NavigationCoordinationReport
func (*GoCMSMenuAdapter) NavigationPersistenceReport ¶ added in v0.111.0
func (a *GoCMSMenuAdapter) NavigationPersistenceReport() NavigationPersistenceReport
func (*GoCMSMenuAdapter) RawMenuItems ¶ added in v0.85.0
RawMenuItems returns persisted go-cms menu rows without localized navigation filtering. It is intentionally separate from Menu, which remains the renderable navigation API.
func (*GoCMSMenuAdapter) RawMenuItemsWithOptions ¶ added in v0.111.0
func (a *GoCMSMenuAdapter) RawMenuItemsWithOptions(ctx context.Context, opts NavigationRawInventoryOptions) ([]MenuItem, error)
func (*GoCMSMenuAdapter) ReorderMenu ¶
func (a *GoCMSMenuAdapter) ReorderMenu(ctx context.Context, menuCode string, orderedIDs []string) error
ReorderMenu updates item positions while preserving their parents.
orderedIDs are treated as item paths (preferred) or relative item IDs.
func (*GoCMSMenuAdapter) ResetMenuContext ¶
func (a *GoCMSMenuAdapter) ResetMenuContext(ctx context.Context, code string) error
ResetMenuContext resets the menu contents. It is used by quickstart navigation tooling to allow rebuilds during development.
func (*GoCMSMenuAdapter) String ¶
func (a *GoCMSMenuAdapter) String() string
func (*GoCMSMenuAdapter) UpdateMenuItem ¶
func (a *GoCMSMenuAdapter) UpdateMenuItem(ctx context.Context, menuCode string, item MenuItem) error
UpdateMenuItem updates an item by path and refreshes its translation for the provided locale.
type GoCMSTranslationPolicy ¶ added in v0.24.0
type GoCMSTranslationPolicy struct {
Pages cmsinterfaces.PageService `json:"pages"`
Content cmsinterfaces.ContentService `json:"content"`
Resolver TranslationRequirementsResolver `json:"resolver"`
}
GoCMSTranslationPolicy enforces translation requirements using go-cms checks.
func (GoCMSTranslationPolicy) Requirements ¶ added in v0.25.0
func (p GoCMSTranslationPolicy) Requirements(ctx context.Context, input TranslationPolicyInput) (TranslationRequirements, bool, error)
Requirements resolves transition requirements when the policy exposes a resolver.
func (GoCMSTranslationPolicy) Validate ¶ added in v0.24.0
func (p GoCMSTranslationPolicy) Validate(ctx context.Context, input TranslationPolicyInput) error
Validate enforces the translation requirements resolved for the transition.
type GoCMSWidgetAdapter ¶
type GoCMSWidgetAdapter struct {
// contains filtered or unexported fields
}
GoCMSWidgetAdapter maps go-cms widgets.Service into CMSWidgetService.
func NewGoCMSWidgetAdapter ¶
func NewGoCMSWidgetAdapter(service any) *GoCMSWidgetAdapter
NewGoCMSWidgetAdapter wraps a go-cms widgets.Service (or compatible typed service).
func (*GoCMSWidgetAdapter) Areas ¶
func (a *GoCMSWidgetAdapter) Areas() []WidgetAreaDefinition
func (*GoCMSWidgetAdapter) Definitions ¶
func (a *GoCMSWidgetAdapter) Definitions() []WidgetDefinition
func (*GoCMSWidgetAdapter) DeleteDefinition ¶
func (a *GoCMSWidgetAdapter) DeleteDefinition(ctx context.Context, code string) error
func (*GoCMSWidgetAdapter) DeleteInstance ¶
func (a *GoCMSWidgetAdapter) DeleteInstance(ctx context.Context, id string) error
func (*GoCMSWidgetAdapter) HasInstanceForDefinition ¶ added in v0.24.0
func (a *GoCMSWidgetAdapter) HasInstanceForDefinition(ctx context.Context, definitionCode string, filter WidgetInstanceFilter) (bool, error)
HasInstanceForDefinition reports whether at least one instance exists for the given definition code.
func (*GoCMSWidgetAdapter) ListInstances ¶
func (a *GoCMSWidgetAdapter) ListInstances(ctx context.Context, filter WidgetInstanceFilter) ([]WidgetInstance, error)
func (*GoCMSWidgetAdapter) RegisterAreaDefinition ¶
func (a *GoCMSWidgetAdapter) RegisterAreaDefinition(ctx context.Context, def WidgetAreaDefinition) error
func (*GoCMSWidgetAdapter) RegisterDefinition ¶
func (a *GoCMSWidgetAdapter) RegisterDefinition(ctx context.Context, def WidgetDefinition) error
func (*GoCMSWidgetAdapter) SaveInstance ¶
func (a *GoCMSWidgetAdapter) SaveInstance(ctx context.Context, instance WidgetInstance) (*WidgetInstance, error)
func (*GoCMSWidgetAdapter) SyncDefinition ¶ added in v0.52.0
func (a *GoCMSWidgetAdapter) SyncDefinition(ctx context.Context, def WidgetDefinition) (*WidgetDefinitionSyncResult, error)
type GoOptionsSettingsAdapter ¶
type GoOptionsSettingsAdapter struct {
// contains filtered or unexported fields
}
GoOptionsSettingsAdapter persists settings using go-options layering semantics. It mirrors the in-memory SettingsService storage but annotates scopes with snapshot metadata so provenance is visible in schemas and traces.
func NewGoOptionsSettingsAdapter ¶
func NewGoOptionsSettingsAdapter() *GoOptionsSettingsAdapter
NewGoOptionsSettingsAdapter constructs an adapter with default schema options.
func (*GoOptionsSettingsAdapter) Apply ¶
func (a *GoOptionsSettingsAdapter) Apply(ctx context.Context, bundle SettingsBundle) error
Apply validates and stores values for the requested scope.
func (*GoOptionsSettingsAdapter) Definitions ¶
func (a *GoOptionsSettingsAdapter) Definitions() []SettingDefinition
Definitions returns the sorted definitions known to the adapter.
func (*GoOptionsSettingsAdapter) RegisterDefinition ¶
func (a *GoOptionsSettingsAdapter) RegisterDefinition(def SettingDefinition)
RegisterDefinition stores a setting definition on the adapter.
func (*GoOptionsSettingsAdapter) Resolve ¶
func (a *GoOptionsSettingsAdapter) Resolve(key, userID string) ResolvedSetting
Resolve returns a single resolved setting with provenance.
func (*GoOptionsSettingsAdapter) ResolveAll ¶
func (a *GoOptionsSettingsAdapter) ResolveAll(userID string) map[string]ResolvedSetting
ResolveAll returns resolved values for every definition.
func (*GoOptionsSettingsAdapter) Schema ¶
func (a *GoOptionsSettingsAdapter) Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
Schema emits the go-options schema document including scope descriptors.
func (*GoOptionsSettingsAdapter) WithSchemaOptions ¶
func (a *GoOptionsSettingsAdapter) WithSchemaOptions(options ...opts.Option)
WithSchemaOptions appends schema generation options.
type GoSearchBundle ¶ added in v0.52.0
type GoSearchBundle struct {
SiteProvider *GoSearchSiteProvider
GlobalAdapter *GoSearchGlobalAdapter
Operations *GoSearchOperations
}
func NewGoSearchBundle ¶ added in v0.52.0
func NewGoSearchBundle(cfg GoSearchBundleConfig) *GoSearchBundle
func (*GoSearchBundle) AttachAdminSearch ¶ added in v0.52.0
func (b *GoSearchBundle) AttachAdminSearch(engine *SearchEngine, key string, setPrimary bool)
type GoSearchBundleConfig ¶ added in v0.52.0
type GoSearchGlobalAdapter ¶ added in v0.27.0
type GoSearchGlobalAdapter struct {
// contains filtered or unexported fields
}
func NewGoSearchGlobalAdapter ¶ added in v0.27.0
func NewGoSearchGlobalAdapter(cfg GoSearchGlobalAdapterConfig) *GoSearchGlobalAdapter
func (*GoSearchGlobalAdapter) Permission ¶ added in v0.27.0
func (a *GoSearchGlobalAdapter) Permission() string
func (*GoSearchGlobalAdapter) Search ¶ added in v0.27.0
func (a *GoSearchGlobalAdapter) Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
type GoSearchGlobalAdapterConfig ¶ added in v0.27.0
type GoSearchOperations ¶ added in v0.27.0
type GoSearchOperations struct {
Health goHealthQuerier
Stats goStatsQuerier
EnsureIndex goEnsureCommander
Reindex goReindexCommander
Indexes []string
}
func (*GoSearchOperations) Ensure ¶ added in v0.27.0
func (o *GoSearchOperations) Ensure(ctx context.Context, def searchtypes.IndexDefinition) error
func (*GoSearchOperations) HealthStatus ¶ added in v0.27.0
func (o *GoSearchOperations) HealthStatus(ctx context.Context) (searchtypes.HealthStatus, error)
func (*GoSearchOperations) ReindexAll ¶ added in v0.27.0
func (*GoSearchOperations) StatsSnapshot ¶ added in v0.27.0
func (o *GoSearchOperations) StatsSnapshot(ctx context.Context) (searchtypes.StatsResult, error)
type GoSearchSiteProvider ¶ added in v0.27.0
type GoSearchSiteProvider struct {
// contains filtered or unexported fields
}
func NewGoSearchSiteProvider ¶ added in v0.27.0
func NewGoSearchSiteProvider(cfg GoSearchSiteProviderConfig) *GoSearchSiteProvider
func (*GoSearchSiteProvider) Search ¶ added in v0.27.0
func (p *GoSearchSiteProvider) Search(ctx context.Context, req SearchRequest) (SearchResultPage, error)
func (*GoSearchSiteProvider) Suggest ¶ added in v0.27.0
func (p *GoSearchSiteProvider) Suggest(ctx context.Context, req SuggestRequest) (SuggestResult, error)
type GoSearchSiteProviderConfig ¶ added in v0.27.0
type GoSearchSiteProviderConfig struct {
Search goSearchQuerier
Suggest goSuggestQuerier
Indexes []string
}
type GoUsersProfileStore ¶
type GoUsersProfileStore struct {
// contains filtered or unexported fields
}
GoUsersProfileStore adapts a go-users ProfileRepository to the admin profile store contract.
func NewGoUsersProfileStore ¶
func NewGoUsersProfileStore(repo users.ProfileRepository, scopeResolver func(context.Context) users.ScopeFilter) *GoUsersProfileStore
NewGoUsersProfileStore builds an adapter for go-users profile repositories.
func (*GoUsersProfileStore) Get ¶
func (s *GoUsersProfileStore) Get(ctx context.Context, userID string) (UserProfile, error)
Get returns a user profile via the go-users repository.
func (*GoUsersProfileStore) Save ¶
func (s *GoUsersProfileStore) Save(ctx context.Context, profile UserProfile) (UserProfile, error)
Save upserts a user profile via the go-users repository.
type GoUsersRoleRepository ¶
type GoUsersRoleRepository struct {
// contains filtered or unexported fields
}
GoUsersRoleRepository adapts a go-users RoleRegistry to the admin contract.
func NewGoUsersRoleRepository ¶
func NewGoUsersRoleRepository(registry users.RoleRegistry, scopeResolver func(context.Context) users.ScopeFilter) *GoUsersRoleRepository
NewGoUsersRoleRepository constructs a role adapter.
func (*GoUsersRoleRepository) Assign ¶
func (r *GoUsersRoleRepository) Assign(ctx context.Context, userID, roleID string) error
Assign a role to a user.
func (*GoUsersRoleRepository) Create ¶
func (r *GoUsersRoleRepository) Create(ctx context.Context, role RoleRecord) (RoleRecord, error)
Create inserts a role.
func (*GoUsersRoleRepository) Delete ¶
func (r *GoUsersRoleRepository) Delete(ctx context.Context, id string) error
Delete removes a role via go-users registry.
func (*GoUsersRoleRepository) Get ¶
func (r *GoUsersRoleRepository) Get(ctx context.Context, id string) (RoleRecord, error)
Get role by ID.
func (*GoUsersRoleRepository) List ¶
func (r *GoUsersRoleRepository) List(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
List roles via go-users.
func (*GoUsersRoleRepository) RolesForUser ¶
func (r *GoUsersRoleRepository) RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
RolesForUser lists assignments.
func (*GoUsersRoleRepository) Unassign ¶
func (r *GoUsersRoleRepository) Unassign(ctx context.Context, userID, roleID string) error
Unassign removes a role assignment.
func (*GoUsersRoleRepository) Update ¶
func (r *GoUsersRoleRepository) Update(ctx context.Context, role RoleRecord) (RoleRecord, error)
Update modifies a role.
type GoUsersUserRepository ¶
type GoUsersUserRepository struct {
// contains filtered or unexported fields
}
GoUsersUserRepository adapts go-users auth/inventory repositories to the admin contract.
func NewGoUsersUserRepository ¶
func NewGoUsersUserRepository(auth users.AuthRepository, inventory users.UserInventoryRepository, scopeResolver func(context.Context) users.ScopeFilter) *GoUsersUserRepository
NewGoUsersUserRepository builds a repository using go-users collaborators.
func (*GoUsersUserRepository) Create ¶
func (r *GoUsersUserRepository) Create(ctx context.Context, user UserRecord) (UserRecord, error)
Create inserts a new user via go-users.
func (*GoUsersUserRepository) Delete ¶
func (r *GoUsersUserRepository) Delete(ctx context.Context, id string) error
Delete marks a user as disabled (go-users does not hard delete via AuthRepository).
func (*GoUsersUserRepository) Get ¶
func (r *GoUsersUserRepository) Get(ctx context.Context, id string) (UserRecord, error)
Get fetches a user by ID.
func (*GoUsersUserRepository) List ¶
func (r *GoUsersUserRepository) List(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
List delegates to the go-users inventory repository.
func (*GoUsersUserRepository) Search ¶
func (r *GoUsersUserRepository) Search(ctx context.Context, query string, limit int) ([]UserRecord, error)
Search proxies to List with a keyword.
func (*GoUsersUserRepository) Update ¶
func (r *GoUsersUserRepository) Update(ctx context.Context, user UserRecord) (UserRecord, error)
Update modifies a user via go-users.
type GuardrailedSchemaValidator ¶ added in v0.23.0
type GuardrailedSchemaValidator struct {
// contains filtered or unexported fields
}
GuardrailedSchemaValidator wraps a SchemaValidator with guardrail checks
func NewGuardrailedSchemaValidator ¶ added in v0.23.0
func NewGuardrailedSchemaValidator(inner SchemaValidator, guardrails *SchemaGuardrails) *GuardrailedSchemaValidator
NewGuardrailedSchemaValidator creates a validator with guardrail checks
func (*GuardrailedSchemaValidator) Guardrails ¶ added in v0.23.0
func (v *GuardrailedSchemaValidator) Guardrails() *SchemaGuardrails
Guardrails returns the underlying guardrails instance
func (*GuardrailedSchemaValidator) Preview ¶ added in v0.23.0
func (v *GuardrailedSchemaValidator) Preview(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) ([]byte, error)
Preview renders a form preview after guardrail validation
func (*GuardrailedSchemaValidator) Validate ¶ added in v0.23.0
func (v *GuardrailedSchemaValidator) Validate(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) error
Validate applies guardrails then delegates to the inner validator
type HandlerAuthenticator ¶
type HandlerAuthenticator interface {
WrapHandler(handler router.HandlerFunc) router.HandlerFunc
}
HandlerAuthenticator can wrap handlers directly to preserve middleware semantics.
type IconCategory ¶ added in v0.25.0
type IconCategory struct {
// ID is the unique identifier for this category.
ID string `json:"id"`
// Label is the human-readable display name.
Label string `json:"label"`
// LabelKey is the i18n translation key for the label.
LabelKey string `json:"label_key,omitempty"`
// Count is the number of icons in this category (populated at runtime).
Count int `json:"count,omitempty"`
}
IconCategory groups related icons within a library.
type IconContributor ¶ added in v0.25.0
type IconContributor interface {
// IconLibraries returns icon libraries this module provides.
// Libraries are registered during module loading and available for
// icon resolution and rendering.
IconLibraries() []IconLibrary
// IconDefinitions returns standalone icon definitions.
// Icons without an explicit library are added to the "custom" library.
IconDefinitions() []IconDefinition
}
IconContributor allows modules to contribute icon libraries and definitions. Modules implementing this interface can register custom icon sets that will be available for icon pickers and rendering throughout the admin panel.
type IconContributorAdapter ¶ added in v0.25.0
type IconContributorAdapter struct {
// contains filtered or unexported fields
}
IconContributorAdapter provides a simple way to create an IconContributor from functions or static data.
func NewIconContributorAdapter ¶ added in v0.25.0
func NewIconContributorAdapter(libraries []IconLibrary, icons []IconDefinition) *IconContributorAdapter
NewIconContributorAdapter creates a new adapter with the given libraries and icons.
func (*IconContributorAdapter) IconDefinitions ¶ added in v0.25.0
func (a *IconContributorAdapter) IconDefinitions() []IconDefinition
IconDefinitions implements IconContributor.
func (*IconContributorAdapter) IconLibraries ¶ added in v0.25.0
func (a *IconContributorAdapter) IconLibraries() []IconLibrary
IconLibraries implements IconContributor.
func (*IconContributorAdapter) WithIcon ¶ added in v0.25.0
func (a *IconContributorAdapter) WithIcon(icon IconDefinition) *IconContributorAdapter
WithIcon adds an icon to the adapter.
func (*IconContributorAdapter) WithLibrary ¶ added in v0.25.0
func (a *IconContributorAdapter) WithLibrary(lib IconLibrary) *IconContributorAdapter
WithLibrary adds a library to the adapter.
type IconContributorCallbacks ¶ added in v0.25.0
type IconContributorCallbacks struct {
// OnLibrary is called for each library contributed by a module.
OnLibrary func(lib IconLibrary) error `json:"on_library"`
// OnIcon is called for each standalone icon contributed by a module.
OnIcon func(icon IconDefinition) error `json:"on_icon"`
}
IconContributorCallbacks holds callbacks for processing icon contributions.
type IconDefinition ¶ added in v0.25.0
type IconDefinition struct {
// ID is the unique identifier for this icon (e.g., "iconoir:settings").
ID string `json:"id"`
// Name is the short key used in menus/panels (e.g., "settings").
Name string `json:"name"`
// Label is the human-readable display name.
Label string `json:"label,omitempty"`
// LabelKey is the i18n translation key for the label.
LabelKey string `json:"label_key,omitempty"`
// Type categorizes the icon source.
Type IconType `json:"type"`
// Library identifies the icon library (e.g., "iconoir", "lucide", "custom").
Library string `json:"library,omitempty"`
// Content holds the icon data: emoji char, SVG markup, or URL.
Content string `json:"content,omitempty"`
// Keywords for search/filtering.
Keywords []string `json:"keywords,omitempty"`
// Category groups related icons.
Category string `json:"category,omitempty"`
// Variants maps variant names to alternate content (e.g., "dark" -> SVG with fill:#fff).
Variants map[string]string `json:"variants,omitempty"`
// Trusted indicates whether this icon definition comes from a trusted source.
Trusted bool `json:"trusted,omitempty"`
// Metadata for additional icon properties.
Metadata map[string]any `json:"metadata,omitempty"`
}
IconDefinition represents a single icon with metadata.
type IconLibrary ¶ added in v0.25.0
type IconLibrary struct {
// ID is the unique library identifier (e.g., "iconoir", "lucide", "app-icons").
ID string `json:"id"`
// Name is the display name.
Name string `json:"name"`
// Description explains the library.
Description string `json:"description,omitempty"`
// Version tracks library version for cache invalidation.
Version string `json:"version,omitempty"`
// CDN is the optional CSS/JS CDN URL for library icons.
CDN string `json:"cdn,omitempty"`
// CSSClass is the class prefix pattern (e.g., "iconoir-{name}").
CSSClass string `json:"css_class,omitempty"`
// RenderMode specifies how to render icons from this library.
RenderMode IconRenderMode `json:"render_mode,omitempty"`
// Priority determines sort order in picker (lower = first).
Priority int `json:"priority,omitempty"`
// Icons contains all icons in this library.
Icons []IconDefinition `json:"icons,omitempty"`
// Categories groups icons within the library.
Categories []IconCategory `json:"categories,omitempty"`
// Trusted indicates whether icons from this library are trusted.
Trusted bool `json:"trusted,omitempty"`
}
IconLibrary represents a collection of icons from a single source.
func BuiltinEmojiLibrary ¶ added in v0.25.0
func BuiltinEmojiLibrary() IconLibrary
BuiltinEmojiLibrary returns the emoji "library" configuration. Emojis are detected automatically; this library provides metadata.
func BuiltinIconoirLibrary ¶ added in v0.25.0
func BuiltinIconoirLibrary() IconLibrary
BuiltinIconoirLibrary returns the default Iconoir library configuration with a curated set of sidebar/navigation icons.
func BuiltinLucideLibrary ¶ added in v0.25.0
func BuiltinLucideLibrary() IconLibrary
BuiltinLucideLibrary returns the Lucide icon library configuration.
type IconReference ¶ added in v0.25.0
type IconReference struct {
// Raw is the original input string.
Raw string `json:"raw"`
// Type is the resolved icon type.
Type IconType `json:"type"`
// Library is the resolved library ID for library icons.
Library string `json:"library,omitempty"`
// Value is the resolved icon value (name, emoji, SVG content, or URL).
Value string `json:"value"`
// Qualified indicates whether the input used explicit prefix syntax.
Qualified bool `json:"qualified,omitempty"`
// LegacyMapped indicates whether svgFieldTypeKeys mapping was applied.
LegacyMapped bool `json:"legacy_mapped,omitempty"`
}
IconReference is a parsed icon string with resolved type and library.
func ParseIconReference ¶ added in v0.25.0
func ParseIconReference(value string) IconReference
ParseIconReference parses an icon string into a structured reference.
Parsing precedence (strict order):
- Empty string -> empty reference
- emoji:<value> -> emoji
- svg:<svg...> -> svg
- url:<value> -> url
- Raw <svg...> -> svg (legacy convenience)
- Raw http://, https://, or data: -> url
- Qualified <library>:<name> -> library
- Legacy iconoir-<name> -> library iconoir, name stripped
- Legacy svgFieldTypeKeys mapping -> mapped Iconoir name with LegacyMapped=true
- Bare name -> default library (iconoir)
func (IconReference) IsEmpty ¶ added in v0.25.0
func (r IconReference) IsEmpty() bool
IsEmpty returns true if the reference represents an empty icon.
type IconRenderMode ¶ added in v0.25.0
type IconRenderMode string
IconRenderMode specifies how an icon should be rendered to HTML.
const ( // IconRenderModeUnknown indicates the render mode is not specified. IconRenderModeUnknown IconRenderMode = "" // IconRenderModeCSS renders as <i class="prefix-{name}">. IconRenderModeCSS IconRenderMode = "css-class" // IconRenderModeSVG renders as inline <svg>...</svg>. IconRenderModeSVG IconRenderMode = "inline-svg" // IconRenderModeImg renders as <img src="...">. IconRenderModeImg IconRenderMode = "img-url" // IconRenderModeSpan renders as <span>content</span>. IconRenderModeSpan IconRenderMode = "span" )
type IconRenderOptions ¶ added in v0.25.0
type IconRenderOptions struct {
// Variant selects a specific icon variant (e.g., "dark", "light").
Variant string `json:"variant"`
// TrustedInput indicates the icon value comes from a trusted source.
TrustedInput bool `json:"trusted_input"`
// AllowCustomUntrusted permits custom SVG/URL for untrusted input.
AllowCustomUntrusted bool `json:"allow_custom_untrusted"`
// Size is the CSS size value (e.g., "20px", "1.5rem").
Size string `json:"size"`
// Classes are additional CSS classes to apply.
Classes []string `json:"classes"`
// Style is additional inline CSS.
Style string `json:"style"`
// AriaLabel sets the aria-label for accessibility.
AriaLabel string `json:"aria_label"`
// AriaHidden hides the icon from screen readers.
AriaHidden bool `json:"aria_hidden"`
}
IconRenderOptions configures icon rendering behavior.
func RenderOptionsForAPI ¶ added in v0.25.0
func RenderOptionsForAPI(trusted bool) IconRenderOptions
RenderOptionsForAPI returns render options for API-requested icon rendering.
func RenderOptionsForModule ¶ added in v0.25.0
func RenderOptionsForModule() IconRenderOptions
RenderOptionsForModule returns render options for module-contributed icons.
func RenderOptionsForTemplate ¶ added in v0.25.0
func RenderOptionsForTemplate() IconRenderOptions
RenderOptions returns the render options for a specific context.
type IconRenderer ¶ added in v0.25.0
type IconRenderer interface {
// Render produces HTML for the given icon reference.
Render(ref IconReference, def *IconDefinition, opts IconRenderOptions) string
}
IconRenderer produces HTML output for icons.
type IconSecurityPolicy ¶ added in v0.25.0
type IconSecurityPolicy struct {
// AllowUntrustedCustom permits custom SVG/URL for untrusted input.
// Default: false
AllowUntrustedCustom bool `json:"allow_untrusted_custom"`
// AllowDataURI permits data: URIs.
// For trusted input, default is true. For untrusted, follows AllowUntrustedCustom.
AllowDataURI bool `json:"allow_data_uri"`
// AllowedExternalSchemes lists permitted URL schemes.
// Default: ["https"]
AllowedExternalSchemes []string `json:"allowed_external_schemes"`
// AllowedDataMIMEs lists permitted MIME types for data URIs.
// Default: ["image/svg+xml", "image/png", "image/jpeg", "image/webp", "image/gif"]
AllowedDataMIMEs []string `json:"allowed_data_mim_es"`
// MaxSVGBytes is the maximum allowed size for SVG content.
// Default: 65536 (64KB)
MaxSVGBytes int `json:"max_svg_bytes"`
// MaxDataURIBytes is the maximum allowed size for data URI payloads.
// Default: 131072 (128KB)
MaxDataURIBytes int `json:"max_data_uri_bytes"`
// AllowedExternalHosts is an optional allowlist of external hosts.
// Empty means any host with allowed scheme is permitted.
AllowedExternalHosts []string `json:"allowed_external_hosts"`
}
IconSecurityPolicy configures security restrictions for icon rendering.
func DefaultIconSecurityPolicy ¶ added in v0.25.0
func DefaultIconSecurityPolicy() IconSecurityPolicy
DefaultIconSecurityPolicy returns the default security policy.
type IconSecurityResult ¶ added in v0.25.0
type IconSecurityResult struct {
// Allowed indicates whether the icon can be rendered.
Allowed bool `json:"allowed"`
// Reason explains why the icon was blocked (empty if allowed).
Reason string `json:"reason"`
// SanitizedContent contains sanitized SVG content (if applicable).
SanitizedContent string `json:"sanitized_content"`
// ValidatedURL contains the validated URL (if applicable).
ValidatedURL string `json:"validated_url"`
}
IconSecurityResult represents the result of security validation.
type IconSecurityValidator ¶ added in v0.25.0
type IconSecurityValidator struct {
// contains filtered or unexported fields
}
IconSecurityValidator validates and sanitizes icon content.
func NewIconSecurityValidator ¶ added in v0.25.0
func NewIconSecurityValidator(policy IconSecurityPolicy) *IconSecurityValidator
NewIconSecurityValidator creates a new validator with the given policy.
func (*IconSecurityValidator) ValidateIcon ¶ added in v0.25.0
func (v *IconSecurityValidator) ValidateIcon(ref IconReference, opts IconRenderOptions) IconSecurityResult
ValidateIcon validates an icon reference based on trust level.
type IconService ¶ added in v0.25.0
type IconService struct {
// contains filtered or unexported fields
}
IconService manages icon libraries and provides icon resolution and rendering.
func NewIconService ¶ added in v0.25.0
func NewIconService(opts ...IconServiceOption) *IconService
NewIconService creates a new IconService with optional configuration.
func (*IconService) Categories ¶ added in v0.25.0
func (s *IconService) Categories(libraryID string) []IconCategory
Categories returns the categories for a library with icon counts.
func (*IconService) Defaults ¶ added in v0.25.0
func (s *IconService) Defaults() IconServiceDefaults
Defaults returns the current default settings.
func (*IconService) Libraries ¶ added in v0.25.0
func (s *IconService) Libraries() []IconLibrary
Libraries returns all registered libraries sorted by priority then ID.
func (*IconService) Library ¶ added in v0.25.0
func (s *IconService) Library(id string) (IconLibrary, bool)
Library returns a library by ID.
func (*IconService) LibraryIcons ¶ added in v0.25.0
func (s *IconService) LibraryIcons(libraryID, category string) []IconDefinition
LibraryIcons returns icons from a specific library, optionally filtered by category.
func (*IconService) RegisterIcon ¶ added in v0.25.0
func (s *IconService) RegisterIcon(icon IconDefinition) error
RegisterIcon adds a single icon definition, using the "custom" library if no library is specified.
func (*IconService) RegisterLibrary ¶ added in v0.25.0
func (s *IconService) RegisterLibrary(lib IconLibrary) error
RegisterLibrary adds an icon library to the service.
func (*IconService) Render ¶ added in v0.25.0
func (s *IconService) Render(ref IconReference, opts IconRenderOptions) string
Render produces HTML for the given icon reference.
func (*IconService) RenderFromString ¶ added in v0.25.0
func (s *IconService) RenderFromString(rawRef string, trusted bool, variant string) string
RenderFromString parses and renders an icon string with explicit trust and variant. This method satisfies the quickstart.TemplateIconRenderer interface for template integration.
func (*IconService) RenderString ¶ added in v0.25.0
func (s *IconService) RenderString(value string, opts IconRenderOptions) string
RenderString parses and renders an icon string.
func (*IconService) Renderer ¶ added in v0.25.0
func (s *IconService) Renderer() *DefaultIconRenderer
Renderer returns the icon renderer.
func (*IconService) Resolve ¶ added in v0.25.0
func (s *IconService) Resolve(ref IconReference) (*IconDefinition, error)
Resolve returns the icon definition for a reference.
func (*IconService) ResolveString ¶ added in v0.25.0
func (s *IconService) ResolveString(value string) (*IconDefinition, error)
ResolveString parses and resolves an icon string.
func (*IconService) Search ¶ added in v0.25.0
func (s *IconService) Search(ctx context.Context, query string, limit int, libraryIDs ...string) []IconDefinition
Search finds icons matching a query across all or specified libraries.
func (*IconService) SecurityPolicy ¶ added in v0.25.0
func (s *IconService) SecurityPolicy() IconSecurityPolicy
SecurityPolicy returns the current security policy.
func (*IconService) UnregisterLibrary ¶ added in v0.25.0
func (s *IconService) UnregisterLibrary(id string) error
UnregisterLibrary removes a library and its icons from the service.
type IconServiceDefaults ¶ added in v0.25.0
type IconServiceDefaults struct {
// DefaultLibrary is used when no library prefix is specified.
DefaultLibrary string `json:"default_library"`
// FallbackIcon is rendered when an icon cannot be resolved.
FallbackIcon string `json:"fallback_icon"`
// DefaultVariant is the default theme variant.
DefaultVariant string `json:"default_variant"`
}
IconServiceDefaults configures fallback behavior for icon resolution.
type IconServiceOption ¶ added in v0.25.0
type IconServiceOption func(*IconService)
IconServiceOption configures the icon service.
func WithDefaultLibrary ¶ added in v0.25.0
func WithDefaultLibrary(library string) IconServiceOption
WithDefaultLibrary sets the default library for bare icon names.
func WithDefaultVariant ¶ added in v0.25.0
func WithDefaultVariant(variant string) IconServiceOption
WithDefaultVariant sets the default theme variant.
func WithFallbackIcon ¶ added in v0.25.0
func WithFallbackIcon(icon string) IconServiceOption
WithFallbackIcon sets the fallback icon for unresolved references.
func WithIconSecurityPolicy ¶ added in v0.25.0
func WithIconSecurityPolicy(policy IconSecurityPolicy) IconServiceOption
WithIconSecurityPolicy sets the security policy.
func WithIconServiceLogger ¶ added in v0.25.0
func WithIconServiceLogger(logger Logger) IconServiceOption
WithIconServiceLogger sets the logger for the icon service.
type IconType ¶ added in v0.25.0
type IconType string
IconType categorizes the source/format of an icon.
const ( // IconTypeUnknown indicates the icon type could not be determined. IconTypeUnknown IconType = "" // IconTypeEmoji represents a Unicode emoji character. IconTypeEmoji IconType = "emoji" // IconTypeLibrary represents a named icon from an icon library. IconTypeLibrary IconType = "library" // IconTypeSVG represents inline SVG markup. IconTypeSVG IconType = "svg" // IconTypeURL represents an external URL or data URI. IconTypeURL IconType = "url" )
type InMemoryBulkService ¶
type InMemoryBulkService struct {
// contains filtered or unexported fields
}
InMemoryBulkService stores jobs in memory and marks them completed immediately.
func NewInMemoryBulkService ¶
func NewInMemoryBulkService() *InMemoryBulkService
NewInMemoryBulkService constructs a bulk service with a sample job.
func (*InMemoryBulkService) List ¶
func (s *InMemoryBulkService) List(ctx context.Context) []BulkJob
List returns recorded jobs newest first.
func (*InMemoryBulkService) Start ¶
func (s *InMemoryBulkService) Start(ctx context.Context, req BulkRequest) (BulkJob, error)
Start records a bulk job and immediately completes it for demo purposes.
type InMemoryContentService ¶
type InMemoryContentService struct {
// contains filtered or unexported fields
}
InMemoryContentService stores CMS pages/content/blocks in memory for tests/demos.
func NewInMemoryContentService ¶
func NewInMemoryContentService() *InMemoryContentService
NewInMemoryContentService constructs a content service.
func (*InMemoryContentService) BlockDefinitionVersions ¶ added in v0.24.0
func (s *InMemoryContentService) BlockDefinitionVersions(ctx context.Context, id string) ([]CMSBlockDefinitionVersion, error)
BlockDefinitionVersions returns the schema versions for a definition.
func (*InMemoryContentService) BlockDefinitions ¶
func (s *InMemoryContentService) BlockDefinitions(ctx context.Context) ([]CMSBlockDefinition, error)
BlockDefinitions returns registered block definitions.
func (*InMemoryContentService) BlocksForContent ¶
func (s *InMemoryContentService) BlocksForContent(_ context.Context, contentID, locale string) ([]CMSBlock, error)
BlocksForContent returns blocks attached to a content/page.
func (*InMemoryContentService) Content ¶
func (s *InMemoryContentService) Content(_ context.Context, id, locale string) (*CMSContent, error)
Content returns a content entry by id and locale.
func (*InMemoryContentService) ContentType ¶ added in v0.23.0
func (s *InMemoryContentService) ContentType(ctx context.Context, id string) (*CMSContentType, error)
ContentType returns a content type by id.
func (*InMemoryContentService) ContentTypeBySlug ¶ added in v0.23.0
func (s *InMemoryContentService) ContentTypeBySlug(ctx context.Context, slug string) (*CMSContentType, error)
ContentTypeBySlug returns a content type by slug.
func (*InMemoryContentService) ContentTypes ¶ added in v0.23.0
func (s *InMemoryContentService) ContentTypes(ctx context.Context) ([]CMSContentType, error)
ContentTypes returns all content type definitions.
func (*InMemoryContentService) Contents ¶
func (s *InMemoryContentService) Contents(_ context.Context, locale string) ([]CMSContent, error)
Contents returns structured content filtered by locale.
func (*InMemoryContentService) CreateBlockDefinition ¶
func (s *InMemoryContentService) CreateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
CreateBlockDefinition adds a block definition.
func (*InMemoryContentService) CreateContent ¶
func (s *InMemoryContentService) CreateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
CreateContent inserts a content entry.
func (*InMemoryContentService) CreateContentType ¶ added in v0.23.0
func (s *InMemoryContentService) CreateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
CreateContentType inserts a content type definition.
func (*InMemoryContentService) CreatePage ¶
CreatePage inserts a page.
func (*InMemoryContentService) CreateTranslation ¶ added in v0.46.0
func (s *InMemoryContentService) CreateTranslation(ctx context.Context, input TranslationCreateInput) (*CMSContent, error)
CreateTranslation clones an existing content entry into a target locale.
func (*InMemoryContentService) DeleteBlock ¶
func (s *InMemoryContentService) DeleteBlock(ctx context.Context, id string) error
DeleteBlock removes a block.
func (*InMemoryContentService) DeleteBlockDefinition ¶
func (s *InMemoryContentService) DeleteBlockDefinition(ctx context.Context, id string) error
DeleteBlockDefinition removes a block definition.
func (*InMemoryContentService) DeleteContent ¶
func (s *InMemoryContentService) DeleteContent(ctx context.Context, id string) error
DeleteContent removes a content entry.
func (*InMemoryContentService) DeleteContentType ¶ added in v0.23.0
func (s *InMemoryContentService) DeleteContentType(ctx context.Context, id string) error
DeleteContentType removes a content type definition.
func (*InMemoryContentService) DeletePage ¶
func (s *InMemoryContentService) DeletePage(ctx context.Context, id string) error
DeletePage removes a page.
func (*InMemoryContentService) LegacyBlocksForContent ¶ added in v0.23.0
func (s *InMemoryContentService) LegacyBlocksForContent(_ context.Context, contentID, locale string) ([]CMSBlock, error)
LegacyBlocksForContent returns legacy block instances without embedded fallback.
func (*InMemoryContentService) Pages ¶
Pages returns all pages for a locale (or all when locale empty).
func (*InMemoryContentService) UpdateBlockDefinition ¶
func (s *InMemoryContentService) UpdateBlockDefinition(ctx context.Context, def CMSBlockDefinition) (*CMSBlockDefinition, error)
UpdateBlockDefinition updates an existing block definition.
func (*InMemoryContentService) UpdateContent ¶
func (s *InMemoryContentService) UpdateContent(ctx context.Context, content CMSContent) (*CMSContent, error)
UpdateContent updates an existing content entry.
func (*InMemoryContentService) UpdateContentType ¶ added in v0.23.0
func (s *InMemoryContentService) UpdateContentType(ctx context.Context, contentType CMSContentType) (*CMSContentType, error)
UpdateContentType updates an existing content type definition.
func (*InMemoryContentService) UpdatePage ¶
UpdatePage updates an existing page.
func (*InMemoryContentService) WithActivitySink ¶
func (s *InMemoryContentService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission for CMS content changes.
type InMemoryDashboardPreferences ¶
type InMemoryDashboardPreferences = dashinternal.InMemoryDashboardPreferences
InMemoryDashboardPreferences stores layouts in memory.
func NewInMemoryDashboardPreferences ¶
func NewInMemoryDashboardPreferences() *InMemoryDashboardPreferences
NewInMemoryDashboardPreferences constructs a preference store.
type InMemoryDebugREPLSessionStore ¶ added in v0.16.0
type InMemoryDebugREPLSessionStore struct {
// contains filtered or unexported fields
}
InMemoryDebugREPLSessionStore keeps sessions in memory.
func NewInMemoryDebugREPLSessionStore ¶ added in v0.16.0
func NewInMemoryDebugREPLSessionStore() *InMemoryDebugREPLSessionStore
NewInMemoryDebugREPLSessionStore constructs a memory-backed store.
func (*InMemoryDebugREPLSessionStore) Create ¶ added in v0.16.0
func (s *InMemoryDebugREPLSessionStore) Create(_ context.Context, session DebugREPLSession) error
func (*InMemoryDebugREPLSessionStore) Get ¶ added in v0.16.0
func (s *InMemoryDebugREPLSessionStore) Get(_ context.Context, id string) (DebugREPLSession, bool, error)
func (*InMemoryDebugREPLSessionStore) ListActive ¶ added in v0.16.0
func (s *InMemoryDebugREPLSessionStore) ListActive(_ context.Context) ([]DebugREPLSession, error)
type InMemoryDebugUserSessionStore ¶ added in v0.24.0
type InMemoryDebugUserSessionStore struct {
// contains filtered or unexported fields
}
InMemoryDebugUserSessionStore keeps sessions in memory.
func NewInMemoryDebugUserSessionStore ¶ added in v0.24.0
func NewInMemoryDebugUserSessionStore() *InMemoryDebugUserSessionStore
NewInMemoryDebugUserSessionStore constructs a memory-backed store.
func (*InMemoryDebugUserSessionStore) Expire ¶ added in v0.24.0
func (s *InMemoryDebugUserSessionStore) Expire(_ context.Context, olderThan time.Duration) (int, error)
Expire removes sessions whose last activity is older than the threshold.
func (*InMemoryDebugUserSessionStore) Get ¶ added in v0.24.0
func (s *InMemoryDebugUserSessionStore) Get(_ context.Context, sessionID string) (DebugUserSession, bool, error)
Get returns a session by session ID.
func (*InMemoryDebugUserSessionStore) ListActive ¶ added in v0.24.0
func (s *InMemoryDebugUserSessionStore) ListActive(_ context.Context) ([]DebugUserSession, error)
ListActive returns active session snapshots.
func (*InMemoryDebugUserSessionStore) Upsert ¶ added in v0.24.0
func (s *InMemoryDebugUserSessionStore) Upsert(_ context.Context, session DebugUserSession) error
Upsert inserts or updates a session entry, deduping by user_id + session_id.
type InMemoryMediaLibrary ¶
type InMemoryMediaLibrary struct {
// contains filtered or unexported fields
}
InMemoryMediaLibrary stores media items in memory.
func NewInMemoryMediaLibrary ¶
func NewInMemoryMediaLibrary(baseURL string) *InMemoryMediaLibrary
NewInMemoryMediaLibrary seeds a few sample assets.
func (*InMemoryMediaLibrary) QueryMedia ¶ added in v0.61.0
func (m *InMemoryMediaLibrary) QueryMedia(ctx context.Context, query MediaQuery) (MediaPage, error)
QueryMedia returns items matching query filters.
func (*InMemoryMediaLibrary) ResolveMedia ¶ added in v0.61.0
func (m *InMemoryMediaLibrary) ResolveMedia(ctx context.Context, ref MediaReference) (MediaItem, error)
ResolveMedia resolves an item from picker reference values.
type InMemoryMenuService ¶
type InMemoryMenuService struct {
// contains filtered or unexported fields
}
InMemoryMenuService stores menus in memory.
func NewInMemoryMenuService ¶
func NewInMemoryMenuService() *InMemoryMenuService
NewInMemoryMenuService constructs a memory-backed menu service.
func (*InMemoryMenuService) AddMenuItem ¶
func (s *InMemoryMenuService) AddMenuItem(ctx context.Context, menuCode string, item MenuItem) error
AddMenuItem appends an item to a menu identified by code.
func (*InMemoryMenuService) CreateMenu ¶
CreateMenu makes a menu entry if it does not exist.
func (*InMemoryMenuService) DeleteMenuItem ¶
func (s *InMemoryMenuService) DeleteMenuItem(ctx context.Context, menuCode, id string) error
DeleteMenuItem deletes an item and its children.
func (*InMemoryMenuService) Menu ¶
Menu returns a menu for a given locale. Items with locale match or empty locale are returned.
func (*InMemoryMenuService) MenuByCodeWithOptions ¶ added in v0.26.0
func (s *InMemoryMenuService) MenuByCodeWithOptions(ctx context.Context, code, locale string, _ SiteMenuReadOptions) (*Menu, error)
MenuByCodeWithOptions supports site menu reads with explicit query options.
func (*InMemoryMenuService) MenuByLocation ¶ added in v0.22.0
func (s *InMemoryMenuService) MenuByLocation(ctx context.Context, location, locale string) (*Menu, error)
MenuByLocation returns a menu resolved by location.
func (*InMemoryMenuService) MenuByLocationWithOptions ¶ added in v0.26.0
func (s *InMemoryMenuService) MenuByLocationWithOptions(ctx context.Context, location, locale string, _ SiteMenuReadOptions) (*Menu, error)
MenuByLocationWithOptions supports site menu reads with explicit query options.
func (*InMemoryMenuService) MenuExists ¶ added in v0.122.0
MenuExists reports whether a menu has been explicitly created.
func (*InMemoryMenuService) NavigationCoordinationReport ¶ added in v0.111.0
func (s *InMemoryMenuService) NavigationCoordinationReport() NavigationCoordinationReport
func (*InMemoryMenuService) NavigationPersistenceReport ¶ added in v0.111.0
func (s *InMemoryMenuService) NavigationPersistenceReport() NavigationPersistenceReport
func (*InMemoryMenuService) RawMenuItems ¶ added in v0.90.0
RawMenuItems returns persisted in-memory rows without locale or render filtering.
func (*InMemoryMenuService) RawMenuItemsWithOptions ¶ added in v0.111.0
func (s *InMemoryMenuService) RawMenuItemsWithOptions(ctx context.Context, opts NavigationRawInventoryOptions) ([]MenuItem, error)
func (*InMemoryMenuService) ReorderMenu ¶
func (s *InMemoryMenuService) ReorderMenu(ctx context.Context, menuCode string, orderedIDs []string) error
ReorderMenu applies a positional ordering to menu items.
func (*InMemoryMenuService) ResetMenu ¶
func (s *InMemoryMenuService) ResetMenu(code string)
ResetMenu removes all items for the given menu code (debug/reset helper).
func (*InMemoryMenuService) ResetMenuContext ¶
func (s *InMemoryMenuService) ResetMenuContext(ctx context.Context, code string) error
ResetMenuContext implements the MenuResetterWithContext interface used by quickstart helpers.
func (*InMemoryMenuService) UpdateMenuItem ¶
func (s *InMemoryMenuService) UpdateMenuItem(ctx context.Context, menuCode string, item MenuItem) error
UpdateMenuItem updates an existing menu item.
func (*InMemoryMenuService) WithActivitySink ¶
func (s *InMemoryMenuService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission for menu operations.
func (*InMemoryMenuService) WithNavigationConvergence ¶ added in v0.111.0
func (s *InMemoryMenuService) WithNavigationConvergence(ctx context.Context, _ NavigationConvergenceScope, fn func(context.Context) error) error
type InMemoryNotificationService ¶
type InMemoryNotificationService struct {
// contains filtered or unexported fields
}
InMemoryNotificationService stores notifications in memory.
func NewInMemoryNotificationService ¶
func NewInMemoryNotificationService() *InMemoryNotificationService
NewInMemoryNotificationService builds an inbox service.
func (*InMemoryNotificationService) Add ¶
func (s *InMemoryNotificationService) Add(ctx context.Context, n Notification) (Notification, error)
Add stores a notification.
func (*InMemoryNotificationService) List ¶
func (s *InMemoryNotificationService) List(ctx context.Context) ([]Notification, error)
List returns all notifications newest first.
func (*InMemoryNotificationService) WithActivitySink ¶
func (s *InMemoryNotificationService) WithActivitySink(sink ActivitySink)
WithActivitySink wires an activity sink for notification events.
type InMemoryOrganizationStore ¶
type InMemoryOrganizationStore struct {
// contains filtered or unexported fields
}
InMemoryOrganizationStore keeps organizations and memberships in memory.
func NewInMemoryOrganizationStore ¶
func NewInMemoryOrganizationStore() *InMemoryOrganizationStore
NewInMemoryOrganizationStore builds an empty org store.
func (*InMemoryOrganizationStore) Create ¶
func (s *InMemoryOrganizationStore) Create(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
Create inserts an organization.
func (*InMemoryOrganizationStore) Delete ¶
func (s *InMemoryOrganizationStore) Delete(ctx context.Context, id string) error
Delete removes an organization.
func (*InMemoryOrganizationStore) Get ¶
func (s *InMemoryOrganizationStore) Get(ctx context.Context, id string) (OrganizationRecord, error)
Get returns an organization by ID.
func (*InMemoryOrganizationStore) List ¶
func (s *InMemoryOrganizationStore) List(ctx context.Context, opts ListOptions) ([]OrganizationRecord, int, error)
List returns organizations with search and status filtering.
func (*InMemoryOrganizationStore) Search ¶
func (s *InMemoryOrganizationStore) Search(ctx context.Context, query string, limit int) ([]OrganizationRecord, error)
Search performs a simple keyword search.
func (*InMemoryOrganizationStore) Update ¶
func (s *InMemoryOrganizationStore) Update(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
Update modifies an organization.
type InMemoryPreferencesStore ¶
type InMemoryPreferencesStore struct {
// contains filtered or unexported fields
}
InMemoryPreferencesStore keeps preferences per-scope in memory.
func NewInMemoryPreferencesStore ¶
func NewInMemoryPreferencesStore() *InMemoryPreferencesStore
NewInMemoryPreferencesStore builds an empty in-memory preference store.
func (*InMemoryPreferencesStore) Delete ¶ added in v0.11.0
func (s *InMemoryPreferencesStore) Delete(ctx context.Context, input PreferencesDeleteInput) error
Delete removes stored preferences for a scoped level.
func (*InMemoryPreferencesStore) Resolve ¶ added in v0.11.0
func (s *InMemoryPreferencesStore) Resolve(ctx context.Context, input PreferencesResolveInput) (PreferenceSnapshot, error)
Resolve returns stored preferences across scopes.
func (*InMemoryPreferencesStore) Upsert ¶ added in v0.11.0
func (s *InMemoryPreferencesStore) Upsert(ctx context.Context, input PreferencesUpsertInput) (PreferenceSnapshot, error)
Upsert stores preferences for a scoped level.
type InMemoryProfileStore ¶
type InMemoryProfileStore struct {
// contains filtered or unexported fields
}
InMemoryProfileStore stores profiles keyed by user ID.
func NewInMemoryProfileStore ¶
func NewInMemoryProfileStore() *InMemoryProfileStore
NewInMemoryProfileStore constructs an empty profile store.
func (*InMemoryProfileStore) Get ¶
func (s *InMemoryProfileStore) Get(ctx context.Context, userID string) (UserProfile, error)
Get returns the stored profile for a user.
func (*InMemoryProfileStore) Save ¶
func (s *InMemoryProfileStore) Save(ctx context.Context, profile UserProfile) (UserProfile, error)
Save upserts the stored profile for a user.
type InMemoryTenantStore ¶
type InMemoryTenantStore struct {
// contains filtered or unexported fields
}
InMemoryTenantStore keeps tenants and memberships in memory.
func NewInMemoryTenantStore ¶
func NewInMemoryTenantStore() *InMemoryTenantStore
NewInMemoryTenantStore builds an empty tenant store.
func (*InMemoryTenantStore) Create ¶
func (s *InMemoryTenantStore) Create(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
Create inserts a tenant.
func (*InMemoryTenantStore) Delete ¶
func (s *InMemoryTenantStore) Delete(ctx context.Context, id string) error
Delete removes a tenant.
func (*InMemoryTenantStore) Get ¶
func (s *InMemoryTenantStore) Get(ctx context.Context, id string) (TenantRecord, error)
Get returns a tenant by ID.
func (*InMemoryTenantStore) List ¶
func (s *InMemoryTenantStore) List(ctx context.Context, opts ListOptions) ([]TenantRecord, int, error)
List returns tenants with search and status filtering.
func (*InMemoryTenantStore) Search ¶
func (s *InMemoryTenantStore) Search(ctx context.Context, query string, limit int) ([]TenantRecord, error)
Search performs a simple keyword search.
func (*InMemoryTenantStore) Update ¶
func (s *InMemoryTenantStore) Update(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
Update modifies a tenant.
type InMemoryTranslationAssignmentRepository ¶ added in v0.25.0
type InMemoryTranslationAssignmentRepository struct {
// contains filtered or unexported fields
}
InMemoryTranslationAssignmentRepository provides active-key uniqueness and optimistic locking constraints.
func NewInMemoryTranslationAssignmentRepository ¶ added in v0.25.0
func NewInMemoryTranslationAssignmentRepository() *InMemoryTranslationAssignmentRepository
NewInMemoryTranslationAssignmentRepository builds an empty in-memory queue store.
func (*InMemoryTranslationAssignmentRepository) AssignmentReviewerAggregateSummary ¶ added in v0.114.1
func (r *InMemoryTranslationAssignmentRepository) AssignmentReviewerAggregateSummary(_ context.Context, input TranslationAssignmentReviewerAggregateInput) (TranslationAssignmentReviewerAggregateSummary, error)
AssignmentReviewerAggregateSummary returns the reviewer counts that can be derived from assignment state alone. QA-blocked counts require the queue's family/editor runtime, so the repository reports that key as unavailable.
func (*InMemoryTranslationAssignmentRepository) Create ¶ added in v0.25.0
func (r *InMemoryTranslationAssignmentRepository) Create(_ context.Context, assignment TranslationAssignment) (TranslationAssignment, error)
Create inserts a new assignment and enforces one active assignment per canonical key.
func (*InMemoryTranslationAssignmentRepository) CreateOrReuseActive ¶ added in v0.25.0
func (r *InMemoryTranslationAssignmentRepository) CreateOrReuseActive(_ context.Context, assignment TranslationAssignment) (TranslationAssignment, bool, error)
CreateOrReuseActive inserts a new assignment or reuses/refreshed an existing active one.
func (*InMemoryTranslationAssignmentRepository) DistinctAssignmentEntityTypes ¶ added in v0.100.0
func (r *InMemoryTranslationAssignmentRepository) DistinctAssignmentEntityTypes(_ context.Context) ([]string, error)
func (*InMemoryTranslationAssignmentRepository) DistinctAssignmentLocales ¶ added in v0.100.0
func (*InMemoryTranslationAssignmentRepository) DistinctAssignmentTranslationGroups ¶ added in v0.100.0
func (r *InMemoryTranslationAssignmentRepository) DistinctAssignmentTranslationGroups(_ context.Context, filters map[string]any) ([]TranslationAssignmentGroupOption, error)
func (*InMemoryTranslationAssignmentRepository) Get ¶ added in v0.25.0
func (r *InMemoryTranslationAssignmentRepository) Get(_ context.Context, id string) (TranslationAssignment, error)
Get retrieves an assignment by id.
func (*InMemoryTranslationAssignmentRepository) List ¶ added in v0.25.0
func (r *InMemoryTranslationAssignmentRepository) List(_ context.Context, opts ListOptions) ([]TranslationAssignment, int, error)
List returns queue assignments filtered by list options.
func (*InMemoryTranslationAssignmentRepository) ListAssignmentFamilyGroups ¶ added in v0.82.1
func (r *InMemoryTranslationAssignmentRepository) ListAssignmentFamilyGroups(ctx context.Context, input TranslationAssignmentFamilyGroupQueryInput) (TranslationAssignmentFamilyGroupQueryResult, error)
func (*InMemoryTranslationAssignmentRepository) ListAssignmentFamilyOptions ¶ added in v0.113.5
func (r *InMemoryTranslationAssignmentRepository) ListAssignmentFamilyOptions(_ context.Context, input TranslationAssignmentFamilyOptionQueryInput) (TranslationAssignmentFamilyOptionQueryResult, error)
func (*InMemoryTranslationAssignmentRepository) ListAssignmentPage ¶ added in v0.114.1
func (r *InMemoryTranslationAssignmentRepository) ListAssignmentPage(ctx context.Context, input TranslationAssignmentPageQueryInput) (TranslationAssignmentPageQueryResult, error)
ListAssignmentPage evaluates the canonical queue query contract in memory. Keeping this repository on the optimized interface prevents development and test environments from falling back to an unbounded broad read.
func (*InMemoryTranslationAssignmentRepository) ListAssignmentSnapshot ¶ added in v0.82.1
func (r *InMemoryTranslationAssignmentRepository) ListAssignmentSnapshot(ctx context.Context, input TranslationAssignmentSnapshotQueryInput) (TranslationAssignmentSnapshotQueryResult, error)
func (*InMemoryTranslationAssignmentRepository) ListFamilyAssignments ¶ added in v0.82.1
func (r *InMemoryTranslationAssignmentRepository) ListFamilyAssignments(ctx context.Context, input TranslationAssignmentFamilyAssignmentsQueryInput) (TranslationAssignmentFamilyAssignmentsQueryResult, error)
func (*InMemoryTranslationAssignmentRepository) Update ¶ added in v0.25.0
func (r *InMemoryTranslationAssignmentRepository) Update(_ context.Context, assignment TranslationAssignment, expectedVersion int64) (TranslationAssignment, error)
Update updates an assignment when the expected version matches the current stored version.
type InMemoryUserStore ¶
type InMemoryUserStore struct {
// contains filtered or unexported fields
}
InMemoryUserStore provides an in-memory implementation for users and roles.
func NewInMemoryUserStore ¶
func NewInMemoryUserStore() *InMemoryUserStore
NewInMemoryUserStore constructs an empty in-memory store.
func (*InMemoryUserStore) Assign ¶
func (s *InMemoryUserStore) Assign(ctx context.Context, userID, roleID string) error
Assign adds a role assignment for a user.
func (*InMemoryUserStore) Create ¶
func (s *InMemoryUserStore) Create(ctx context.Context, role RoleRecord) (RoleRecord, error)
Create inserts a role (implements RoleRepository.Create).
func (*InMemoryUserStore) CreateUser ¶
func (s *InMemoryUserStore) CreateUser(ctx context.Context, user UserRecord) (UserRecord, error)
CreateUser inserts a new user (implements UserRepository.Create).
func (*InMemoryUserStore) Delete ¶
func (s *InMemoryUserStore) Delete(ctx context.Context, id string) error
Delete removes a role if not system-protected (implements RoleRepository.Delete).
func (*InMemoryUserStore) DeleteUser ¶
func (s *InMemoryUserStore) DeleteUser(ctx context.Context, id string) error
DeleteUser removes a user (implements UserRepository.Delete).
func (*InMemoryUserStore) Get ¶
func (s *InMemoryUserStore) Get(ctx context.Context, id string) (RoleRecord, error)
Get returns a role by ID (implements RoleRepository.Get).
func (*InMemoryUserStore) GetUser ¶
func (s *InMemoryUserStore) GetUser(ctx context.Context, id string) (UserRecord, error)
GetUser returns a user by ID (implements UserRepository.Get).
func (*InMemoryUserStore) List ¶
func (s *InMemoryUserStore) List(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
List roles (implements RoleRepository.List).
func (*InMemoryUserStore) ListUsers ¶
func (s *InMemoryUserStore) ListUsers(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
ListUsers returns paginated users with simple search/filter support (implements UserRepository.List).
func (*InMemoryUserStore) RolesForUser ¶
func (s *InMemoryUserStore) RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
RolesForUser lists assigned roles.
func (*InMemoryUserStore) Search ¶
func (s *InMemoryUserStore) Search(ctx context.Context, query string, limit int) ([]UserRecord, error)
Search performs a simple keyword search across users.
func (*InMemoryUserStore) Unassign ¶
func (s *InMemoryUserStore) Unassign(ctx context.Context, userID, roleID string) error
Unassign removes a role assignment.
func (*InMemoryUserStore) Update ¶
func (s *InMemoryUserStore) Update(ctx context.Context, role RoleRecord) (RoleRecord, error)
Update updates an existing role (implements RoleRepository.Update).
func (*InMemoryUserStore) UpdateUser ¶
func (s *InMemoryUserStore) UpdateUser(ctx context.Context, user UserRecord) (UserRecord, error)
UpdateUser modifies an existing user (implements UserRepository.Update).
type InMemoryWidgetService ¶
type InMemoryWidgetService struct {
// contains filtered or unexported fields
}
InMemoryWidgetService stores widget areas/definitions/instances in memory.
func NewInMemoryWidgetService ¶
func NewInMemoryWidgetService() *InMemoryWidgetService
NewInMemoryWidgetService constructs a memory-backed widget service.
func (*InMemoryWidgetService) Areas ¶
func (s *InMemoryWidgetService) Areas() []WidgetAreaDefinition
Areas returns all registered areas.
func (*InMemoryWidgetService) Definitions ¶
func (s *InMemoryWidgetService) Definitions() []WidgetDefinition
Definitions returns all registered widget definitions.
func (*InMemoryWidgetService) DeleteDefinition ¶
func (s *InMemoryWidgetService) DeleteDefinition(ctx context.Context, code string) error
DeleteDefinition removes a widget definition.
func (*InMemoryWidgetService) DeleteInstance ¶
func (s *InMemoryWidgetService) DeleteInstance(ctx context.Context, id string) error
DeleteInstance removes a widget instance.
func (*InMemoryWidgetService) HasInstanceForDefinition ¶ added in v0.24.0
func (s *InMemoryWidgetService) HasInstanceForDefinition(_ context.Context, definitionCode string, filter WidgetInstanceFilter) (bool, error)
HasInstanceForDefinition reports whether a widget instance exists for a definition.
func (*InMemoryWidgetService) ListInstances ¶
func (s *InMemoryWidgetService) ListInstances(_ context.Context, filter WidgetInstanceFilter) ([]WidgetInstance, error)
ListInstances returns widget instances filtered by area/page/locale.
func (*InMemoryWidgetService) RegisterAreaDefinition ¶
func (s *InMemoryWidgetService) RegisterAreaDefinition(ctx context.Context, def WidgetAreaDefinition) error
RegisterAreaDefinition saves/overwrites a widget area.
func (*InMemoryWidgetService) RegisterDefinition ¶
func (s *InMemoryWidgetService) RegisterDefinition(ctx context.Context, def WidgetDefinition) error
RegisterDefinition saves/overwrites a widget definition.
func (*InMemoryWidgetService) SaveInstance ¶
func (s *InMemoryWidgetService) SaveInstance(ctx context.Context, instance WidgetInstance) (*WidgetInstance, error)
SaveInstance stores or updates a widget instance.
func (*InMemoryWidgetService) SyncDefinition ¶ added in v0.52.0
func (s *InMemoryWidgetService) SyncDefinition(ctx context.Context, def WidgetDefinition) (*WidgetDefinitionSyncResult, error)
SyncDefinition creates, updates, or no-ops a widget definition based on content fingerprint equality.
func (*InMemoryWidgetService) WithActivitySink ¶
func (s *InMemoryWidgetService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission for widget events.
type InMemoryWorkflowBindingRepository ¶ added in v0.25.0
type InMemoryWorkflowBindingRepository struct {
// contains filtered or unexported fields
}
InMemoryWorkflowBindingRepository stores scope bindings with active uniqueness.
func NewInMemoryWorkflowBindingRepository ¶ added in v0.25.0
func NewInMemoryWorkflowBindingRepository() *InMemoryWorkflowBindingRepository
NewInMemoryWorkflowBindingRepository constructs an empty binding store.
func (*InMemoryWorkflowBindingRepository) Create ¶ added in v0.25.0
func (r *InMemoryWorkflowBindingRepository) Create(_ context.Context, binding WorkflowBinding) (WorkflowBinding, error)
func (*InMemoryWorkflowBindingRepository) Delete ¶ added in v0.25.0
func (r *InMemoryWorkflowBindingRepository) Delete(_ context.Context, id string) error
func (*InMemoryWorkflowBindingRepository) Get ¶ added in v0.25.0
func (r *InMemoryWorkflowBindingRepository) Get(_ context.Context, id string) (WorkflowBinding, error)
func (*InMemoryWorkflowBindingRepository) List ¶ added in v0.25.0
func (r *InMemoryWorkflowBindingRepository) List(_ context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
func (*InMemoryWorkflowBindingRepository) ListByScope ¶ added in v0.25.0
func (r *InMemoryWorkflowBindingRepository) ListByScope(_ context.Context, scopeType WorkflowBindingScopeType, scopeRef string, status WorkflowBindingStatus) ([]WorkflowBinding, error)
func (*InMemoryWorkflowBindingRepository) Update ¶ added in v0.25.0
func (r *InMemoryWorkflowBindingRepository) Update(_ context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
type InMemoryWorkflowDefinitionRepository ¶ added in v0.25.0
type InMemoryWorkflowDefinitionRepository struct {
// contains filtered or unexported fields
}
InMemoryWorkflowDefinitionRepository stores workflows with revision snapshots.
func NewInMemoryWorkflowDefinitionRepository ¶ added in v0.25.0
func NewInMemoryWorkflowDefinitionRepository() *InMemoryWorkflowDefinitionRepository
NewInMemoryWorkflowDefinitionRepository constructs an empty workflow definition store.
func (*InMemoryWorkflowDefinitionRepository) Create ¶ added in v0.25.0
func (r *InMemoryWorkflowDefinitionRepository) Create(_ context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
func (*InMemoryWorkflowDefinitionRepository) Get ¶ added in v0.25.0
func (r *InMemoryWorkflowDefinitionRepository) Get(_ context.Context, id string) (PersistedWorkflow, error)
func (*InMemoryWorkflowDefinitionRepository) GetVersion ¶ added in v0.25.0
func (r *InMemoryWorkflowDefinitionRepository) GetVersion(_ context.Context, id string, version int) (PersistedWorkflow, error)
func (*InMemoryWorkflowDefinitionRepository) List ¶ added in v0.25.0
func (r *InMemoryWorkflowDefinitionRepository) List(_ context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
func (*InMemoryWorkflowDefinitionRepository) Update ¶ added in v0.25.0
func (r *InMemoryWorkflowDefinitionRepository) Update(_ context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
type InvalidDependenciesError ¶
type InvalidDependenciesError struct {
Issues []error `json:"issues"`
}
func (InvalidDependenciesError) Error ¶
func (e InvalidDependenciesError) Error() string
func (InvalidDependenciesError) Unwrap ¶
func (e InvalidDependenciesError) Unwrap() error
type InvalidFeatureConfigError ¶
type InvalidFeatureConfigError struct {
Issues []FeatureDependencyError `json:"issues"`
}
InvalidFeatureConfigError aggregates dependency validation failures.
func (InvalidFeatureConfigError) Error ¶
func (e InvalidFeatureConfigError) Error() string
func (InvalidFeatureConfigError) Unwrap ¶
func (e InvalidFeatureConfigError) Unwrap() error
type JSErrorEntry ¶ added in v0.24.0
type JSErrorEntry struct {
ID string `json:"id"`
Timestamp time.Time `json:"timestamp"`
Type string `json:"type"`
Message string `json:"message"`
Source string `json:"source,omitempty"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
Stack string `json:"stack,omitempty"`
URL string `json:"url,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
Extra map[string]any `json:"extra,omitempty"`
}
JSErrorEntry captures a frontend JavaScript error reported by the browser.
type Job ¶
type Job struct {
Name string `json:"name"`
Schedule string `json:"schedule,omitempty"`
LastRun time.Time `json:"last_run"`
NextRun time.Time `json:"next_run"`
Status string `json:"status,omitempty"`
LastError string `json:"last_error,omitempty"`
}
Job represents a scheduled or triggerable job.
type JobErrorEvent ¶ added in v0.127.1
type JobErrorEvent struct {
Job string
Schedule string
Stage JobErrorStage
Attempt int
MaxAttempts int
Error error
}
JobErrorEvent carries the original typed scheduler error with stable job identity. Durable Job state remains a separate safe string projection.
type JobErrorObserver ¶ added in v0.127.1
type JobErrorObserver func(context.Context, JobErrorEvent)
JobErrorObserver receives typed retry and terminal scheduler failures.
type JobErrorStage ¶ added in v0.127.1
type JobErrorStage string
JobErrorStage distinguishes bounded retry observations from the single terminal scheduler failure.
const ( JobErrorStageRetry JobErrorStage = "retry" JobErrorStageTerminal JobErrorStage = "terminal" )
type JobRegistry ¶
type JobRegistry struct {
// contains filtered or unexported fields
}
JobRegistry keeps track of jobs registered via commands with cron metadata.
func NewJobRegistry ¶
func NewJobRegistry() *JobRegistry
NewJobRegistry captures cron-enabled go-command registrations.
func (*JobRegistry) Enable ¶
func (j *JobRegistry) Enable(enabled bool)
Enable toggles whether jobs are available.
func (*JobRegistry) Sync ¶
func (j *JobRegistry) Sync(ctx context.Context) error
Sync registers cron-capable commands with the go-job dispatcher and scheduler.
func (*JobRegistry) Trigger ¶
func (j *JobRegistry) Trigger(ctx AdminContext, name string) error
Trigger dispatches a job by name through the go-job dispatcher.
func (*JobRegistry) WithActivitySink ¶
func (j *JobRegistry) WithActivitySink(sink ActivitySink)
WithActivitySink records job triggers to the shared activity sink.
func (*JobRegistry) WithErrorObserver ¶ added in v0.127.1
func (j *JobRegistry) WithErrorObserver(observer JobErrorObserver)
WithErrorObserver installs a typed scheduler error observer. Passing nil disables only the external callback; safe job state remains active.
func (*JobRegistry) WithGoJob ¶
func (j *JobRegistry) WithGoJob(registry gojob.Registry, scheduler goJobScheduler)
WithGoJob allows callers to inject a go-job registry and scheduler.
type LegacyChartSampleWidgetPayload ¶ added in v0.25.0
type LegacyChartSampleWidgetPayload struct {
Title string `json:"title"`
Type string `json:"type"`
Data []ChartPointWidgetPayload `json:"data"`
}
type ListOptions ¶
type ListOptions struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
SortBy string `json:"sort_by"`
SortDesc bool `json:"sort_desc"`
Filters map[string]any `json:"filters"`
Predicates []ListPredicate `json:"predicates"`
Fields []string `json:"fields"`
Search string `json:"search"`
}
ListOptions holds pagination and filtering input.
type ListPredicate ¶ added in v0.24.0
type ListPredicate struct {
Field string `json:"field"`
Operator string `json:"operator"`
Values []string `json:"values,omitempty"`
}
ListPredicate defines an operator-aware list filter predicate.
func NormalizeListPredicates ¶ added in v0.24.0
func NormalizeListPredicates(opts ListOptions) []ListPredicate
NormalizeListPredicates returns operator-aware predicates for list filtering. It prefers explicit opts.Predicates and falls back to legacy opts.Filters.
type LocalCommandRunTransport ¶ added in v0.121.3
type LocalCommandRunTransport struct {
// contains filtered or unexported fields
}
LocalCommandRunTransport is a concurrency-safe ephemeral fanout hub.
func NewLocalCommandRunTransport ¶ added in v0.121.3
func NewLocalCommandRunTransport(config LocalCommandRunTransportConfig) *LocalCommandRunTransport
NewLocalCommandRunTransport constructs the zero-service transport.
func (*LocalCommandRunTransport) Capabilities ¶ added in v0.121.3
func (t *LocalCommandRunTransport) Capabilities() CommandRunTransportCapabilities
func (*LocalCommandRunTransport) Close ¶ added in v0.121.3
func (t *LocalCommandRunTransport) Close(ctx context.Context) error
Close stops local subscriptions. It is idempotent and owns no external driver.
func (*LocalCommandRunTransport) PublishCommandRun ¶ added in v0.121.3
func (t *LocalCommandRunTransport) PublishCommandRun(ctx context.Context, update CommandRunUpdate) error
func (*LocalCommandRunTransport) SubscribeCommandRuns ¶ added in v0.121.3
func (t *LocalCommandRunTransport) SubscribeCommandRuns( ctx context.Context, selector CommandRunSelector, handler CommandRunHandler, ) (CommandRunSubscription, error)
type LocalCommandRunTransportConfig ¶ added in v0.121.3
type LocalCommandRunTransportConfig struct {
BufferSize int
ErrorBuffer int
PublishTimeout time.Duration
ContractLimits CommandRunContractLimits
}
LocalCommandRunTransportConfig controls bounded in-process delivery.
type LocalePathMigrationApplyResult ¶ added in v0.36.0
type LocalePathMigrationApplyResult struct {
Updated []LocalePathMigrationRewrite `json:"updated"`
Skipped []LocalePathMigrationRewrite `json:"skipped,omitempty"`
}
func ApplyLocalePathMigration ¶ added in v0.36.0
func ApplyLocalePathMigration(ctx context.Context, svc CMSContentService, report LocalePathMigrationReport) (LocalePathMigrationApplyResult, error)
type LocalePathMigrationFamilyPlan ¶ added in v0.36.0
type LocalePathMigrationFamilyPlan struct {
ResourceKind string `json:"resource_kind"`
ContentType string `json:"content_type,omitempty"`
IdentityKey string `json:"identity_key"`
FamilyID string `json:"family_id,omitempty"`
RouteKeyReadiness LocalePathRouteKeyReadiness `json:"route_key_readiness"`
ProposedRouteKey string `json:"proposed_route_key,omitempty"`
Records []LocalePathMigrationRecordPlan `json:"records"`
Rewrites []LocalePathMigrationRewrite `json:"rewrites,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
type LocalePathMigrationOptions ¶ added in v0.36.0
type LocalePathMigrationRecordPlan ¶ added in v0.36.0
type LocalePathMigrationRecordPlan struct {
ID string `json:"id"`
Locale string `json:"locale"`
Path string `json:"path,omitempty"`
RouteKey string `json:"route_key,omitempty"`
Classification LocalePathRecordClassification `json:"classification"`
ProposedPath string `json:"proposed_path,omitempty"`
DerivedRouteKey string `json:"derived_route_key,omitempty"`
}
type LocalePathMigrationReport ¶ added in v0.36.0
type LocalePathMigrationReport struct {
Options LocalePathMigrationOptions `json:"options"`
Summary LocalePathMigrationSummary `json:"summary"`
Families []LocalePathMigrationFamilyPlan `json:"families"`
}
func AuditLocalePathMigration ¶ added in v0.36.0
func AuditLocalePathMigration(ctx context.Context, svc CMSContentService, opts LocalePathMigrationOptions) (LocalePathMigrationReport, error)
type LocalePathMigrationRewrite ¶ added in v0.36.0
type LocalePathMigrationRewrite struct {
ResourceKind string `json:"resource_kind"`
ContentType string `json:"content_type,omitempty"`
ID string `json:"id"`
Locale string `json:"locale"`
PathFrom string `json:"path_from,omitempty"`
PathTo string `json:"path_to,omitempty"`
RouteKeyFrom string `json:"route_key_from,omitempty"`
RouteKeyTo string `json:"route_key_to,omitempty"`
Reasons []string `json:"reasons,omitempty"`
}
type LocalePathMigrationSummary ¶ added in v0.36.0
type LocalePathMigrationSummary struct {
TotalFamilies int `json:"total_families"`
LegacyPrefixedRecords int `json:"legacy_prefixed_records"`
TranslatedLocalizedPaths int `json:"translated_localized_paths"`
AmbiguousRecords int `json:"ambiguous_records"`
MissingRouteKeyFamilies int `json:"missing_route_key_families"`
AmbiguousRouteKeyFamilies int `json:"ambiguous_route_key_families"`
ProposedRewrites int `json:"proposed_rewrites"`
}
type LocalePathRecordClassification ¶ added in v0.36.0
type LocalePathRecordClassification string
const ( LocalePathRecordCanonicalUnprefixed LocalePathRecordClassification = "canonical_unprefixed" LocalePathRecordLegacyPrefixed LocalePathRecordClassification = "legacy_prefixed" LocalePathRecordTranslatedLocalized LocalePathRecordClassification = "translated_localized" LocalePathRecordAmbiguousLocaleLike LocalePathRecordClassification = "ambiguous_locale_like" LocalePathRecordMissing LocalePathRecordClassification = "missing" )
type LocalePathRouteKeyReadiness ¶ added in v0.36.0
type LocalePathRouteKeyReadiness string
const ( LocalePathRouteKeyPresentConsistent LocalePathRouteKeyReadiness = "present_consistent" LocalePathRouteKeyMissingDerivable LocalePathRouteKeyReadiness = "missing_derivable" LocalePathRouteKeyAmbiguous LocalePathRouteKeyReadiness = "ambiguous" )
type LogCaller ¶ added in v0.119.0
type LogCaller struct {
Function string `json:"function,omitempty"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
}
LogCaller identifies the application frame associated with a log record.
type LogEntry ¶ added in v0.14.0
type LogEntry struct {
ID string `json:"id,omitempty"`
Timestamp time.Time `json:"timestamp"`
SessionID string `json:"session_id,omitempty"`
UserID string `json:"user_id,omitempty"`
Level string `json:"level"`
Message string `json:"message"`
Logger string `json:"logger,omitempty"`
Caller *LogCaller `json:"caller,omitempty"`
TraceID string `json:"trace_id,omitempty"`
SpanID string `json:"span_id,omitempty"`
RequestID string `json:"request_id,omitempty"`
Fields map[string]any `json:"fields,omitempty"`
Source string `json:"source,omitempty"`
}
LogEntry captures server log messages.
type LoggerProvider ¶ added in v0.25.0
type LoggerProvider = glog.LoggerProvider
LoggerProvider resolves named loggers.
type LoginLogoPlacement ¶ added in v0.128.5
type LoginLogoPlacement string
LoginLogoPlacement controls whether the login identity mark renders above the card or inside it. The empty value preserves the legacy outside-card composition.
const ( LoginLogoPlacementOutsideCard LoginLogoPlacement = "outside-card" LoginLogoPlacementInsideCard LoginLogoPlacement = "inside-card" )
func NormalizeLoginLogoPlacement ¶ added in v0.128.5
func NormalizeLoginLogoPlacement(value LoginLogoPlacement) LoginLogoPlacement
NormalizeLoginLogoPlacement returns a supported login logo placement while preserving the legacy outside-card composition for empty/unknown input.
type ManagementContentService ¶ added in v0.23.0
type ManagementContentService struct {
// contains filtered or unexported fields
}
ManagementContentService adapts CMS content for management APIs.
func NewManagementContentService ¶ added in v0.23.0
func NewManagementContentService(container CMSContainer, opts DeliveryOptions) *ManagementContentService
func (*ManagementContentService) Create ¶ added in v0.23.0
func (s *ManagementContentService) Create(ctx crud.Context, record admingraphql.Content) (admingraphql.Content, error)
func (ManagementContentService) CreateBatch ¶ added in v0.23.0
func (*ManagementContentService) Delete ¶ added in v0.23.0
func (s *ManagementContentService) Delete(ctx crud.Context, record admingraphql.Content) error
func (ManagementContentService) DeleteBatch ¶ added in v0.23.0
func (*ManagementContentService) Index ¶ added in v0.23.0
func (s *ManagementContentService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]admingraphql.Content, int, error)
func (*ManagementContentService) Show ¶ added in v0.23.0
func (s *ManagementContentService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (admingraphql.Content, error)
func (*ManagementContentService) Update ¶ added in v0.23.0
func (s *ManagementContentService) Update(ctx crud.Context, record admingraphql.Content) (admingraphql.Content, error)
func (ManagementContentService) UpdateBatch ¶ added in v0.23.0
type ManagementContentTypeService ¶ added in v0.23.0
type ManagementContentTypeService struct {
// contains filtered or unexported fields
}
ManagementContentTypeService adapts CMS content types for management APIs.
func NewManagementContentTypeService ¶ added in v0.23.0
func NewManagementContentTypeService(container CMSContainer) *ManagementContentTypeService
func (*ManagementContentTypeService) Create ¶ added in v0.23.0
func (s *ManagementContentTypeService) Create(ctx crud.Context, record admingraphql.ContentType) (admingraphql.ContentType, error)
func (ManagementContentTypeService) CreateBatch ¶ added in v0.23.0
func (*ManagementContentTypeService) Delete ¶ added in v0.23.0
func (s *ManagementContentTypeService) Delete(ctx crud.Context, record admingraphql.ContentType) error
func (ManagementContentTypeService) DeleteBatch ¶ added in v0.23.0
func (*ManagementContentTypeService) Index ¶ added in v0.23.0
func (s *ManagementContentTypeService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]admingraphql.ContentType, int, error)
func (*ManagementContentTypeService) Show ¶ added in v0.23.0
func (s *ManagementContentTypeService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (admingraphql.ContentType, error)
func (*ManagementContentTypeService) Update ¶ added in v0.23.0
func (s *ManagementContentTypeService) Update(ctx crud.Context, record admingraphql.ContentType) (admingraphql.ContentType, error)
func (ManagementContentTypeService) UpdateBatch ¶ added in v0.23.0
type ManagementPageService ¶ added in v0.23.0
type ManagementPageService struct {
// contains filtered or unexported fields
}
ManagementPageService adapts CMS pages for management APIs.
func NewManagementPageService ¶ added in v0.23.0
func NewManagementPageService(container CMSContainer, opts DeliveryOptions) *ManagementPageService
func (*ManagementPageService) Create ¶ added in v0.23.0
func (s *ManagementPageService) Create(ctx crud.Context, record admingraphql.Page) (admingraphql.Page, error)
func (ManagementPageService) CreateBatch ¶ added in v0.23.0
func (*ManagementPageService) Delete ¶ added in v0.23.0
func (s *ManagementPageService) Delete(ctx crud.Context, record admingraphql.Page) error
func (ManagementPageService) DeleteBatch ¶ added in v0.23.0
func (*ManagementPageService) Index ¶ added in v0.23.0
func (s *ManagementPageService) Index(ctx crud.Context, _ []repository.SelectCriteria) ([]admingraphql.Page, int, error)
func (*ManagementPageService) Show ¶ added in v0.23.0
func (s *ManagementPageService) Show(ctx crud.Context, id string, _ []repository.SelectCriteria) (admingraphql.Page, error)
func (*ManagementPageService) Update ¶ added in v0.23.0
func (s *ManagementPageService) Update(ctx crud.Context, record admingraphql.Page) (admingraphql.Page, error)
func (ManagementPageService) UpdateBatch ¶ added in v0.23.0
type ManagementServices ¶ added in v0.23.0
type ManagementServices struct {
Contents crud.Service[admingraphql.Content] `json:"contents"`
Pages crud.Service[admingraphql.Page] `json:"pages"`
ContentTypes crud.Service[admingraphql.ContentType] `json:"content_types"`
}
ManagementServices bundles CRUD-compatible services for management GraphQL.
func NewManagementServices ¶ added in v0.23.0
func NewManagementServices(container CMSContainer, opts DeliveryOptions) ManagementServices
NewManagementServices builds management services backed by CMS adapters.
type MediaActivityDecision ¶ added in v0.51.0
type MediaActivityDecision struct {
SuppressDefault bool `json:"suppress_default,omitempty"`
Primary *ActivityEntry `json:"primary,omitempty"`
Additional []ActivityEntry `json:"additional,omitempty"`
}
MediaActivityDecision allows hosts to override, suppress, or append activity entries without taking over the core mutation path.
type MediaActivityHook ¶ added in v0.51.0
type MediaActivityHook func(context.Context, MediaMutationEvent) (MediaActivityDecision, error)
MediaActivityHook optionally customizes default media mutation activity.
type MediaCapabilities ¶ added in v0.51.0
type MediaCapabilities struct {
Operations MediaOperationCapabilities `json:"operations"`
Upload MediaUploadCapabilities `json:"upload"`
Picker MediaPickerCapabilities `json:"picker"`
}
MediaCapabilities aggregates request-scoped media capabilities.
type MediaCapabilityOverrideProvider ¶ added in v0.51.0
type MediaCapabilityOverrideProvider interface {
MediaCapabilityOverrides(ctx context.Context) (MediaCapabilityOverrides, error)
}
MediaCapabilityOverrideProvider exposes partial request-scoped capability overrides layered on top of the built-in supported capability set.
type MediaCapabilityOverrides ¶ added in v0.51.0
type MediaCapabilityOverrides struct {
Operations MediaOperationCapabilityOverrides `json:"operations"`
Upload MediaUploadCapabilityOverrides `json:"upload"`
Picker MediaPickerCapabilityOverrides `json:"picker"`
}
MediaCapabilityOverrides carries partial capability overrides. Use this when callers only need to tune a subset of the capability payload.
type MediaCapabilityProvider ¶ added in v0.51.0
type MediaCapabilityProvider interface {
MediaCapabilities(ctx context.Context) (MediaCapabilities, error)
}
MediaCapabilityProvider exposes request-scoped media capability information. Implementations should return the full capability payload for the current request, not a partial patch.
type MediaConfig ¶
type MediaConfig struct {
LibraryPath string `json:"library_path"`
ItemPath string `json:"item_path,omitempty"`
ResolvePath string `json:"resolve_path,omitempty"`
UploadPath string `json:"upload_path,omitempty"`
PresignPath string `json:"presign_path,omitempty"`
ConfirmPath string `json:"confirm_path,omitempty"`
CapabilitiesPath string `json:"capabilities_path,omitempty"`
AssetURLTemplate string `json:"asset_url_template,omitempty"`
StreamURLTemplate string `json:"stream_url_template,omitempty"`
PosterURLTemplate string `json:"poster_url_template,omitempty"`
DownloadURLTemplate string `json:"download_url_template,omitempty"`
DefaultValueMode MediaValueMode `json:"default_value_mode,omitempty"`
}
MediaConfig surfaces media library configuration for form widgets.
type MediaConfirmRequest ¶ added in v0.51.0
type MediaConfirmRequest struct {
UploadID string `json:"upload_id,omitempty"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
FileName string `json:"file_name,omitempty"`
ContentType string `json:"content_type,omitempty"`
Size int64 `json:"size,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MediaConfirmRequest finalizes an upload after direct or presigned transfer.
type MediaConfirmer ¶ added in v0.51.0
type MediaConfirmer interface {
ConfirmMedia(ctx context.Context, req MediaConfirmRequest) (MediaItem, error)
}
MediaConfirmer finalizes a previously uploaded media asset.
type MediaDeleter ¶ added in v0.51.0
MediaDeleter removes a media item.
type MediaDeliveryAdapter ¶ added in v0.62.0
type MediaDeliveryAdapter interface {
ResolveMediaDelivery(context.Context, MediaDeliveryRequest) (MediaDeliveryResponse, error)
}
MediaDeliveryAdapter resolves provider-specific delivery behavior.
type MediaDeliveryCacheConfig ¶ added in v0.62.0
type MediaDeliveryCacheConfig struct {
Control string `json:"control,omitempty"`
MaxAge time.Duration `json:"max_age,omitempty"`
}
MediaDeliveryCacheConfig carries default cache response policy for delivery handlers.
type MediaDeliveryCapability ¶ added in v0.62.0
type MediaDeliveryCapability string
MediaDeliveryCapability describes delivery behavior available for an item/provider.
const ( MediaDeliveryCapabilityStream MediaDeliveryCapability = "stream" MediaDeliveryCapabilityDownload MediaDeliveryCapability = "download" MediaDeliveryCapabilityPoster MediaDeliveryCapability = "poster" MediaDeliveryCapabilityRedirect MediaDeliveryCapability = "redirect" MediaDeliveryCapabilityProxy MediaDeliveryCapability = "proxy" MediaDeliveryCapabilityImport MediaDeliveryCapability = "import" MediaDeliveryCapabilityRange MediaDeliveryCapability = "range" MediaDeliveryCapabilityAuthRequired MediaDeliveryCapability = "auth_required" )
func NormalizeMediaDeliveryCapabilities ¶ added in v0.62.0
func NormalizeMediaDeliveryCapabilities(values ...MediaDeliveryCapability) []MediaDeliveryCapability
type MediaDeliveryConfig ¶ added in v0.62.0
type MediaDeliveryConfig struct {
AdminEnabled *bool `json:"admin_enabled,omitempty"`
Public MediaPublicDeliveryConfig `json:"public"`
Cache MediaDeliveryCacheConfig `json:"cache"`
Redirect MediaDeliveryRedirectConfig `json:"redirect"`
Proxy MediaDeliveryProxyLimitConfig `json:"proxy"`
}
MediaDeliveryConfig controls browser-consumable media delivery routes.
type MediaDeliveryCredential ¶ added in v0.62.0
type MediaDeliveryCredential struct {
AccessToken string `json:"access_token,omitempty"`
TokenType string `json:"token_type,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
MediaDeliveryCredential carries host-resolved provider credentials.
type MediaDeliveryCredentialRequest ¶ added in v0.62.0
type MediaDeliveryCredentialRequest struct {
Provider string `json:"provider,omitempty"`
MediaID string `json:"media_id,omitempty"`
Intent MediaDeliveryIntent `json:"intent,omitempty"`
Reference MediaDeliveryReference `json:"reference"`
Scopes []string `json:"scopes,omitempty"`
}
MediaDeliveryCredentialRequest asks a host credential resolver for provider access.
type MediaDeliveryCredentialResolver ¶ added in v0.62.0
type MediaDeliveryCredentialResolver interface {
ResolveMediaDeliveryCredential(context.Context, MediaDeliveryCredentialRequest) (MediaDeliveryCredential, error)
}
MediaDeliveryCredentialResolver keeps OAuth/token ownership outside the media module.
type MediaDeliveryCredentialResolverFunc ¶ added in v0.62.0
type MediaDeliveryCredentialResolverFunc func(context.Context, MediaDeliveryCredentialRequest) (MediaDeliveryCredential, error)
MediaDeliveryCredentialResolverFunc adapts a function to MediaDeliveryCredentialResolver.
func (MediaDeliveryCredentialResolverFunc) ResolveMediaDeliveryCredential ¶ added in v0.62.0
func (f MediaDeliveryCredentialResolverFunc) ResolveMediaDeliveryCredential(ctx context.Context, req MediaDeliveryCredentialRequest) (MediaDeliveryCredential, error)
type MediaDeliveryImported ¶ added in v0.62.0
type MediaDeliveryImported struct {
Reader io.ReadSeeker `json:"-"`
ContentType string `json:"content_type,omitempty"`
ContentLength int64 `json:"content_length,omitempty"`
FileName string `json:"file_name,omitempty"`
ModTime time.Time `json:"mod_time"`
Headers http.Header `json:"-"`
}
MediaDeliveryImported describes app-owned imported/local delivery.
func NewLocalMediaDeliveryImported ¶ added in v0.62.0
func NewLocalMediaDeliveryImported(path string, roots []string, contentType string) (*MediaDeliveryImported, error)
type MediaDeliveryInfo ¶ added in v0.62.0
type MediaDeliveryInfo struct {
State MediaDeliveryState `json:"state,omitempty"`
Reason string `json:"reason,omitempty"`
Capabilities []MediaDeliveryCapability `json:"capabilities,omitempty"`
}
MediaDeliveryInfo is safe delivery metadata for normal media payloads.
type MediaDeliveryIntent ¶ added in v0.62.0
type MediaDeliveryIntent string
MediaDeliveryIntent identifies the browser delivery purpose.
const ( MediaDeliveryIntentAsset MediaDeliveryIntent = "asset" MediaDeliveryIntentStream MediaDeliveryIntent = "stream" MediaDeliveryIntentPoster MediaDeliveryIntent = "poster" MediaDeliveryIntentDownload MediaDeliveryIntent = "download" )
func ParseMediaDeliveryIntent ¶ added in v0.62.0
func ParseMediaDeliveryIntent(raw string) (MediaDeliveryIntent, bool)
type MediaDeliveryMode ¶ added in v0.62.0
type MediaDeliveryMode string
MediaDeliveryMode describes how a delivery adapter satisfied a request.
const ( MediaDeliveryModeRedirect MediaDeliveryMode = "redirect" MediaDeliveryModeProxy MediaDeliveryMode = "proxy" MediaDeliveryModeImported MediaDeliveryMode = "imported" )
type MediaDeliveryProxy ¶ added in v0.62.0
type MediaDeliveryProxy struct {
Reader io.ReadCloser `json:"-"`
ContentType string `json:"content_type,omitempty"`
ContentLength int64 `json:"content_length,omitempty"`
FileName string `json:"file_name,omitempty"`
ModTime time.Time `json:"mod_time"`
Range bool `json:"range,omitempty"`
Headers http.Header `json:"-"`
}
MediaDeliveryProxy describes stream/proxy-mode delivery.
type MediaDeliveryProxyLimitConfig ¶ added in v0.62.0
type MediaDeliveryProxyLimitConfig struct {
Timeout time.Duration `json:"timeout,omitempty"`
MaxBytes int64 `json:"max_bytes,omitempty"`
BufferBytes int `json:"buffer_bytes,omitempty"`
AllowedHosts []string `json:"allowed_hosts,omitempty"`
}
MediaDeliveryProxyLimitConfig carries proxy-mode limits.
type MediaDeliveryRange ¶ added in v0.62.0
MediaDeliveryRange describes a satisfiable single byte range.
func ParseMediaDeliveryRange ¶ added in v0.62.0
func ParseMediaDeliveryRange(header string, size int64) (MediaDeliveryRange, bool, error)
type MediaDeliveryRedirect ¶ added in v0.62.0
type MediaDeliveryRedirect struct {
URL string `json:"url"`
Status int `json:"status,omitempty"`
Headers http.Header `json:"-"`
Cache string `json:"cache,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
MediaDeliveryRedirect describes redirect-mode delivery.
type MediaDeliveryRedirectConfig ¶ added in v0.62.0
type MediaDeliveryRedirectConfig struct {
Enabled *bool `json:"enabled,omitempty"`
AllowedHosts []string `json:"allowed_hosts,omitempty"`
PreferTemporary bool `json:"prefer_temporary,omitempty"`
}
MediaDeliveryRedirectConfig carries redirect-mode policy.
type MediaDeliveryReference ¶ added in v0.62.0
type MediaDeliveryReference struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Provider string `json:"provider,omitempty"`
SourceURL string `json:"source_url,omitempty"`
ExternalID string `json:"external_id,omitempty"`
StorageKey string `json:"storage_key,omitempty"`
PosterKey string `json:"poster_key,omitempty"`
MIMEType string `json:"mime_type,omitempty"`
Size int64 `json:"size,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MediaDeliveryReference is internal provider/provenance data used by adapters.
type MediaDeliveryReferenceProjector ¶ added in v0.62.0
type MediaDeliveryReferenceProjector interface {
ProjectMediaDeliveryReference(context.Context, MediaItem) (MediaDeliveryReference, error)
}
MediaDeliveryReferenceProjector converts media items into internal delivery references.
type MediaDeliveryReferenceProjectorFunc ¶ added in v0.62.0
type MediaDeliveryReferenceProjectorFunc func(context.Context, MediaItem) (MediaDeliveryReference, error)
MediaDeliveryReferenceProjectorFunc adapts a function to MediaDeliveryReferenceProjector.
func (MediaDeliveryReferenceProjectorFunc) ProjectMediaDeliveryReference ¶ added in v0.62.0
func (f MediaDeliveryReferenceProjectorFunc) ProjectMediaDeliveryReference(ctx context.Context, item MediaItem) (MediaDeliveryReference, error)
type MediaDeliveryRegistry ¶ added in v0.62.0
type MediaDeliveryRegistry struct {
// contains filtered or unexported fields
}
MediaDeliveryRegistry stores provider-specific delivery adapters.
func NewMediaDeliveryRegistry ¶ added in v0.62.0
func NewMediaDeliveryRegistry() *MediaDeliveryRegistry
NewMediaDeliveryRegistry constructs an empty delivery adapter registry.
func (*MediaDeliveryRegistry) Adapter ¶ added in v0.62.0
func (r *MediaDeliveryRegistry) Adapter(provider string) (MediaDeliveryAdapter, bool)
func (*MediaDeliveryRegistry) Register ¶ added in v0.62.0
func (r *MediaDeliveryRegistry) Register(provider string, adapter MediaDeliveryAdapter) error
func (*MediaDeliveryRegistry) Resolve ¶ added in v0.62.0
func (r *MediaDeliveryRegistry) Resolve(ctx context.Context, req MediaDeliveryRequest) (MediaDeliveryResponse, error)
type MediaDeliveryRequest ¶ added in v0.62.0
type MediaDeliveryRequest struct {
Item MediaItem `json:"item"`
Reference MediaDeliveryReference `json:"reference"`
Intent MediaDeliveryIntent `json:"intent"`
Request *http.Request `json:"-"`
CredentialResolver MediaDeliveryCredentialResolver `json:"-"`
}
MediaDeliveryRequest is passed to delivery adapters.
func (MediaDeliveryRequest) ResolveCredential ¶ added in v0.62.0
func (req MediaDeliveryRequest) ResolveCredential(ctx context.Context, scopes ...string) (MediaDeliveryCredential, error)
ResolveCredential asks the host-owned resolver for provider credentials.
type MediaDeliveryResponse ¶ added in v0.62.0
type MediaDeliveryResponse struct {
Mode MediaDeliveryMode `json:"mode"`
Redirect *MediaDeliveryRedirect `json:"redirect,omitempty"`
Proxy *MediaDeliveryProxy `json:"proxy,omitempty"`
Imported *MediaDeliveryImported `json:"imported,omitempty"`
}
MediaDeliveryResponse is returned by delivery adapters.
type MediaDeliveryState ¶ added in v0.62.0
type MediaDeliveryState string
MediaDeliveryState describes delivery readiness without exposing provider details.
const ( MediaDeliveryStateReady MediaDeliveryState = "ready" MediaDeliveryStateProcessing MediaDeliveryState = "processing" MediaDeliveryStateExternalSourceOnly MediaDeliveryState = "external_source_only" MediaDeliveryStateNeedsImport MediaDeliveryState = "needs_import" MediaDeliveryStateNotPlayable MediaDeliveryState = "not_playable" MediaDeliveryStateFailed MediaDeliveryState = "failed" )
func NormalizeMediaDeliveryState ¶ added in v0.62.0
func NormalizeMediaDeliveryState(raw string) MediaDeliveryState
type MediaDeliveryURLBuildOptions ¶ added in v0.62.0
type MediaDeliveryURLs ¶ added in v0.62.0
type MediaDeliveryURLs struct {
AssetURL string `json:"asset_url,omitempty"`
StreamURL string `json:"stream_url,omitempty"`
PosterURL string `json:"poster_url,omitempty"`
DownloadURL string `json:"download_url,omitempty"`
PublicAssetURL string `json:"public_asset_url,omitempty"`
PublicStreamURL string `json:"public_stream_url,omitempty"`
PublicPosterURL string `json:"public_poster_url,omitempty"`
PublicDownloadURL string `json:"public_download_url,omitempty"`
}
MediaDeliveryURLs carries app-owned delivery URLs for a media item.
func BuildMediaDeliveryURLs ¶ added in v0.62.0
func BuildMediaDeliveryURLs(urls urlkit.Resolver, adminGroup, publicGroup, id string, includePublic bool) MediaDeliveryURLs
func BuildMediaDeliveryURLsWithOptions ¶ added in v0.62.0
func BuildMediaDeliveryURLsWithOptions(urls urlkit.Resolver, adminGroup, publicGroup, id string, opts MediaDeliveryURLBuildOptions) MediaDeliveryURLs
type MediaDeliveryUnavailable ¶ added in v0.62.0
type MediaDeliveryUnavailable struct {
}
MediaDeliveryUnavailable describes a typed unavailable delivery outcome.
type MediaDeliveryUnavailableError ¶ added in v0.62.0
type MediaDeliveryUnavailableError struct {
}
MediaDeliveryUnavailableError is returned for typed unavailable outcomes.
func (MediaDeliveryUnavailableError) Error ¶ added in v0.62.0
func (e MediaDeliveryUnavailableError) Error() string
type MediaGetter ¶ added in v0.51.0
MediaGetter resolves a media item by ID.
type MediaItem ¶
type MediaItem struct {
ID string `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
AssetURL string `json:"asset_url,omitempty"`
StreamURL string `json:"stream_url,omitempty"`
PosterURL string `json:"poster_url,omitempty"`
DownloadURL string `json:"download_url,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
Type string `json:"type,omitempty"`
MIMEType string `json:"mime_type,omitempty"`
Size int64 `json:"size,omitempty"`
Status string `json:"status,omitempty"`
WorkflowStatus string `json:"workflow_status,omitempty"`
WorkflowError string `json:"workflow_error,omitempty"`
Delivery MediaDeliveryInfo `json:"delivery"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
MediaItem describes a stored asset.
func (MediaItem) MarshalJSON ¶ added in v0.62.0
type MediaLibrary ¶
type MediaLibrary interface {
MediaQueryProvider
}
MediaLibrary exposes the required query-aware media listing surface.
type MediaLocalFileDeliveryAdapter ¶ added in v0.62.0
type MediaLocalFileDeliveryAdapter struct {
Roots []string `json:"roots,omitempty"`
}
MediaLocalFileDeliveryAdapter serves files from configured local roots.
func (MediaLocalFileDeliveryAdapter) ResolveMediaDelivery ¶ added in v0.62.0
func (a MediaLocalFileDeliveryAdapter) ResolveMediaDelivery(_ context.Context, req MediaDeliveryRequest) (MediaDeliveryResponse, error)
type MediaModule ¶ added in v0.51.0
type MediaModule struct {
// contains filtered or unexported fields
}
MediaModule exposes the media library as a module-owned admin page.
func NewMediaModule ¶ added in v0.51.0
func NewMediaModule() *MediaModule
NewMediaModule constructs the default media module.
func (*MediaModule) Manifest ¶ added in v0.51.0
func (m *MediaModule) Manifest() ModuleManifest
Manifest describes the module metadata.
func (*MediaModule) MenuItems ¶ added in v0.51.0
func (m *MediaModule) MenuItems(locale string) []MenuItem
MenuItems contributes navigation for the media module.
func (*MediaModule) Register ¶ added in v0.51.0
func (m *MediaModule) Register(ctx ModuleContext) error
Register wires the module-owned gallery and list pages.
func (*MediaModule) RouteContract ¶ added in v0.51.0
func (m *MediaModule) RouteContract() routing.ModuleContract
RouteContract declares the UI and admin API routes owned by the media module.
func (*MediaModule) ValidateStartup ¶ added in v0.62.0
func (m *MediaModule) ValidateStartup(ctx context.Context) error
ValidateStartup rejects public delivery requests that cannot be authorized.
func (*MediaModule) WithDeliveryConfig ¶ added in v0.62.0
func (m *MediaModule) WithDeliveryConfig(cfg MediaDeliveryConfig) *MediaModule
WithDeliveryConfig configures route exposure before module route planning.
func (*MediaModule) WithMenuParent ¶ added in v0.51.0
func (m *MediaModule) WithMenuParent(parent string) *MediaModule
WithMenuParent nests the media navigation under a parent menu item ID.
func (*MediaModule) WithMenuPosition ¶ added in v0.51.0
func (m *MediaModule) WithMenuPosition(position int) *MediaModule
WithMenuPosition sets the media navigation sort position.
type MediaMutationEvent ¶ added in v0.51.0
type MediaMutationEvent struct {
Operation MediaMutationOperation `json:"operation"`
MediaID string `json:"media_id,omitempty"`
Reference MediaReference `json:"reference"`
Before *MediaItem `json:"before,omitempty"`
After *MediaItem `json:"after,omitempty"`
Request map[string]any `json:"request,omitempty"`
DefaultEntry *ActivityEntry `json:"default_entry,omitempty"`
}
MediaMutationEvent describes a media mutation before activity projection.
type MediaMutationOperation ¶ added in v0.51.0
type MediaMutationOperation string
MediaMutationOperation describes the mutation being applied to media.
const ( MediaMutationCreate MediaMutationOperation = "create" MediaMutationUpload MediaMutationOperation = "upload" MediaMutationConfirm MediaMutationOperation = "confirm" MediaMutationUpdate MediaMutationOperation = "update" MediaMutationDelete MediaMutationOperation = "delete" )
type MediaOperationCapabilities ¶ added in v0.51.0
type MediaOperationCapabilities struct {
List bool `json:"list"`
Get bool `json:"get"`
Resolve bool `json:"resolve"`
Upload bool `json:"upload"`
Presign bool `json:"presign"`
Confirm bool `json:"confirm"`
Update bool `json:"update"`
Delete bool `json:"delete"`
}
MediaOperationCapabilities describes which high-level operations are available for the current request.
type MediaOperationCapabilityOverrides ¶ added in v0.51.0
type MediaOperationCapabilityOverrides struct {
List *bool `json:"list,omitempty"`
Get *bool `json:"get,omitempty"`
Resolve *bool `json:"resolve,omitempty"`
Upload *bool `json:"upload,omitempty"`
Presign *bool `json:"presign,omitempty"`
Confirm *bool `json:"confirm,omitempty"`
Update *bool `json:"update,omitempty"`
Delete *bool `json:"delete,omitempty"`
}
MediaOperationCapabilityOverrides applies partial request-scoped operation overrides without requiring callers to populate a full capability payload.
type MediaPage ¶ added in v0.51.0
type MediaPage struct {
Items []MediaItem `json:"items"`
Total int `json:"total"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
}
MediaPage represents a paginated media result set.
type MediaPickerCapabilities ¶ added in v0.51.0
type MediaPickerCapabilities struct {
ValueModes []MediaValueMode `json:"value_modes,omitempty"`
DefaultValueMode MediaValueMode `json:"default_value_mode,omitempty"`
}
MediaPickerCapabilities describes picker value-mode behavior.
type MediaPickerCapabilityOverrides ¶ added in v0.51.0
type MediaPickerCapabilityOverrides struct {
ValueModes *[]MediaValueMode `json:"value_modes,omitempty"`
DefaultValueMode *MediaValueMode `json:"default_value_mode,omitempty"`
}
MediaPickerCapabilityOverrides applies partial request-scoped picker overrides without requiring callers to republish unchanged fields.
type MediaPresignRequest ¶ added in v0.51.0
type MediaPresignRequest struct {
Name string `json:"name,omitempty"`
FileName string `json:"file_name,omitempty"`
ContentType string `json:"content_type,omitempty"`
Size int64 `json:"size,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MediaPresignRequest captures the metadata needed to prepare an upload.
type MediaPresignResponse ¶ added in v0.51.0
type MediaPresignResponse struct {
UploadURL string `json:"upload_url,omitempty"`
Method string `json:"method,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Fields map[string]string `json:"fields,omitempty"`
UploadID string `json:"upload_id,omitempty"`
}
MediaPresignResponse returns the upload target and any required request data.
type MediaPresigner ¶ added in v0.51.0
type MediaPresigner interface {
PresignMedia(ctx context.Context, req MediaPresignRequest) (MediaPresignResponse, error)
}
MediaPresigner prepares an upload target for client-side transfer.
type MediaPublicDeliveryAuthorization ¶ added in v0.62.0
type MediaPublicDeliveryAuthorization struct {
MediaID string `json:"media_id,omitempty"`
Intent string `json:"intent,omitempty"`
Request *http.Request `json:"-"`
}
MediaPublicDeliveryAuthorization carries public-route authorization context.
type MediaPublicDeliveryAuthorizer ¶ added in v0.62.0
type MediaPublicDeliveryAuthorizer func(context.Context, MediaPublicDeliveryAuthorization) error
MediaPublicDeliveryAuthorizer authorizes an unauthenticated public media delivery request.
type MediaPublicDeliveryConfig ¶ added in v0.62.0
type MediaPublicDeliveryConfig struct {
Enabled bool `json:"enabled,omitempty"`
Authorizer MediaPublicDeliveryAuthorizer `json:"-"`
TokenVerifier MediaPublicDeliveryTokenVerifier `json:"-"`
AllowAdapterPolicy bool `json:"allow_adapter_policy,omitempty"`
}
MediaPublicDeliveryConfig controls opt-in public delivery route exposure.
type MediaPublicDeliveryTokenVerifier ¶ added in v0.62.0
type MediaPublicDeliveryTokenVerifier func(context.Context, string, MediaPublicDeliveryAuthorization) error
MediaPublicDeliveryTokenVerifier validates signed public delivery tokens.
type MediaQuery ¶ added in v0.51.0
type MediaQuery struct {
Search string `json:"search,omitempty"`
Type string `json:"type,omitempty"`
MIMEFamily string `json:"mime_family,omitempty"`
Status string `json:"status,omitempty"`
WorkflowStatus string `json:"workflow_status,omitempty"`
Sort string `json:"sort,omitempty"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
}
MediaQuery carries list filtering and pagination hints.
type MediaQueryProvider ¶ added in v0.51.0
type MediaQueryProvider interface {
QueryMedia(ctx context.Context, query MediaQuery) (MediaPage, error)
}
MediaQueryProvider exposes paginated/query-aware listing.
type MediaRedirectDeliveryAdapter ¶ added in v0.62.0
type MediaRedirectDeliveryAdapter struct {
AllowedHosts []string `json:"allowed_hosts,omitempty"`
Status int `json:"status,omitempty"`
Cache string `json:"cache,omitempty"`
}
MediaRedirectDeliveryAdapter redirects to app-approved provider or CDN URLs.
func (MediaRedirectDeliveryAdapter) ResolveMediaDelivery ¶ added in v0.62.0
func (a MediaRedirectDeliveryAdapter) ResolveMediaDelivery(_ context.Context, req MediaDeliveryRequest) (MediaDeliveryResponse, error)
type MediaReference ¶ added in v0.51.0
type MediaReference struct {
ID string `json:"id,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
}
MediaReference identifies a media item by the stable value modes exposed to form widgets and APIs.
type MediaResolver ¶ added in v0.51.0
type MediaResolver interface {
ResolveMedia(ctx context.Context, ref MediaReference) (MediaItem, error)
}
MediaResolver resolves a picker reference into a media item.
type MediaUpdateInput ¶ added in v0.51.0
type MediaUpdateInput struct {
Name string `json:"name,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
Type string `json:"type,omitempty"`
MIMEType string `json:"mime_type,omitempty"`
Status string `json:"status,omitempty"`
WorkflowStatus string `json:"workflow_status,omitempty"`
WorkflowError string `json:"workflow_error,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MediaUpdateInput applies mutable metadata updates to an existing media item.
type MediaUpdater ¶ added in v0.51.0
type MediaUpdater interface {
UpdateMedia(ctx context.Context, id string, input MediaUpdateInput) (MediaItem, error)
}
MediaUpdater mutates an existing media item's metadata.
type MediaUploadCapabilities ¶ added in v0.51.0
type MediaUploadCapabilities struct {
DirectUpload bool `json:"direct_upload"`
Presign bool `json:"presign"`
MaxSize int64 `json:"max_size,omitempty"`
AcceptedKinds []string `json:"accepted_kinds,omitempty"`
AcceptedMIMETypes []string `json:"accepted_mime_types,omitempty"`
}
MediaUploadCapabilities describes available upload modes and limits.
type MediaUploadCapabilityOverrides ¶ added in v0.51.0
type MediaUploadCapabilityOverrides struct {
DirectUpload *bool `json:"direct_upload,omitempty"`
Presign *bool `json:"presign,omitempty"`
MaxSize *int64 `json:"max_size,omitempty"`
AcceptedKinds *[]string `json:"accepted_kinds,omitempty"`
AcceptedMIMETypes *[]string `json:"accepted_mime_types,omitempty"`
}
MediaUploadCapabilityOverrides applies partial request-scoped upload overrides without requiring callers to republish unchanged fields.
type MediaUploadInput ¶ added in v0.51.0
type MediaUploadInput struct {
MediaUploadRequest
Reader io.Reader `json:"-"`
}
MediaUploadInput carries the service-layer upload request with a reader-backed payload.
type MediaUploadRequest ¶ added in v0.51.0
type MediaUploadRequest struct {
Name string `json:"name,omitempty"`
FileName string `json:"file_name,omitempty"`
ContentType string `json:"content_type,omitempty"`
Size int64 `json:"size,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MediaUploadRequest captures transport-layer upload metadata from HTTP callers.
type MediaUploader ¶ added in v0.51.0
type MediaUploader interface {
UploadMedia(ctx context.Context, input MediaUploadInput) (MediaItem, error)
}
MediaUploader stores a new media asset from a reader-backed upload payload.
type MediaValueMode ¶ added in v0.51.0
type MediaValueMode string
MediaValueMode defines how media picker fields persist values.
const ( MediaValueModeURL MediaValueMode = "url" MediaValueModeID MediaValueMode = "id" )
type MemoryCommandRunStore ¶ added in v0.121.3
type MemoryCommandRunStore struct {
// contains filtered or unexported fields
}
MemoryCommandRunStore is a bounded concurrency-safe current-state projection.
func NewMemoryCommandRunStore ¶ added in v0.121.3
func NewMemoryCommandRunStore(config CommandRunMemoryStoreConfig) (*MemoryCommandRunStore, error)
NewMemoryCommandRunStore constructs a bounded default store.
func (*MemoryCommandRunStore) Apply ¶ added in v0.121.3
func (s *MemoryCommandRunStore) Apply(ctx context.Context, update CommandRunUpdate) (CommandRunRecord, bool, error)
Apply validates and projects one update. Duplicate, stale, equal-revision, and terminal-regressing deliveries return changed=false.
func (*MemoryCommandRunStore) Clear ¶ added in v0.121.3
func (s *MemoryCommandRunStore) Clear(ctx context.Context, selector CommandRunSelector) error
Clear removes only rows visible through the selector. Recent event IDs stay deduplicated so delayed redelivery does not resurrect a cleared row.
func (*MemoryCommandRunStore) ClearCommandRunsIfUnchanged ¶ added in v0.124.0
func (s *MemoryCommandRunStore) ClearCommandRunsIfUnchanged(ctx context.Context, selector CommandRunSelector, version uint64) (bool, error)
ClearCommandRunsIfUnchanged clears selector-matching rows only when no store mutation occurred after the supplied snapshot was captured.
func (*MemoryCommandRunStore) Count ¶ added in v0.121.3
func (s *MemoryCommandRunStore) Count() int
Count returns the current bounded projection size for diagnostics.
func (*MemoryCommandRunStore) List ¶ added in v0.121.3
func (s *MemoryCommandRunStore) List(ctx context.Context, selector CommandRunSelector) ([]CommandRunRecord, error)
List returns newest-first isolated rows authorized by the selector.
func (*MemoryCommandRunStore) SnapshotForCommandRunClear ¶ added in v0.124.0
func (s *MemoryCommandRunStore) SnapshotForCommandRunClear(ctx context.Context, selector CommandRunSelector) (CommandRunClearSnapshot, error)
SnapshotForCommandRunClear returns a versioned, newest-first candidate set.
type MemoryRepository ¶
type MemoryRepository struct {
// contains filtered or unexported fields
}
MemoryRepository is an in-memory implementation of Repository for testing/demo.
func NewMemoryRepository ¶
func NewMemoryRepository() *MemoryRepository
NewMemoryRepository constructs a MemoryRepository.
func (*MemoryRepository) Delete ¶
func (r *MemoryRepository) Delete(_ context.Context, id string) error
Delete removes a record by id.
func (*MemoryRepository) List ¶
func (r *MemoryRepository) List(_ context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns paginated records with simple filtering and sorting.
type MemoryTranslationExchangeRuntimeStore ¶ added in v0.27.0
type MemoryTranslationExchangeRuntimeStore struct {
// contains filtered or unexported fields
}
MemoryTranslationExchangeRuntimeStore provides a non-persistent runtime store used by tests and fallback wiring.
func NewMemoryTranslationExchangeRuntimeStore ¶ added in v0.27.0
func NewMemoryTranslationExchangeRuntimeStore(nowFn func() time.Time) *MemoryTranslationExchangeRuntimeStore
func (*MemoryTranslationExchangeRuntimeStore) CommitApplyRecord ¶ added in v0.132.1
func (s *MemoryTranslationExchangeRuntimeStore) CommitApplyRecord(_ context.Context, reservation translationExchangeApplyReservation, record translationExchangeAppliedRecord) (translationExchangeAppliedRecord, error)
func (*MemoryTranslationExchangeRuntimeStore) CompleteJob ¶ added in v0.27.0
func (*MemoryTranslationExchangeRuntimeStore) CreateJob ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) CreateJob(_ context.Context, job translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
func (*MemoryTranslationExchangeRuntimeStore) CreateOrGetApplyJob ¶ added in v0.132.1
func (s *MemoryTranslationExchangeRuntimeStore) CreateOrGetApplyJob(_ context.Context, identity translationTransportIdentity, job translationExchangeAsyncJob, rows []TranslationExchangeRow) (translationExchangeAsyncJob, bool, error)
func (*MemoryTranslationExchangeRuntimeStore) FindJobByRequestHash ¶ added in v0.27.0
func (*MemoryTranslationExchangeRuntimeStore) HeartbeatJob ¶ added in v0.27.0
func (*MemoryTranslationExchangeRuntimeStore) ListJobRows ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) ListJobRows(_ context.Context, jobID string) ([]translationExchangeStoredRow, error)
func (*MemoryTranslationExchangeRuntimeStore) ListJobs ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) ListJobs(_ context.Context, query translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
func (*MemoryTranslationExchangeRuntimeStore) ListRecoverableJobs ¶ added in v0.27.0
func (*MemoryTranslationExchangeRuntimeStore) LookupApplyRecord ¶ added in v0.27.0
func (*MemoryTranslationExchangeRuntimeStore) RecordApplyRecord ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) RecordApplyRecord(_ context.Context, identity translationTransportIdentity, record translationExchangeAppliedRecord) (translationExchangeAppliedRecord, bool, error)
func (*MemoryTranslationExchangeRuntimeStore) ReleaseApplyRecord ¶ added in v0.132.1
func (s *MemoryTranslationExchangeRuntimeStore) ReleaseApplyRecord(_ context.Context, reservation translationExchangeApplyReservation) error
func (*MemoryTranslationExchangeRuntimeStore) ReplaceJobArtifacts ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) ReplaceJobArtifacts(_ context.Context, job translationExchangeAsyncJob, artifacts []translationExchangeJobArtifact) error
func (*MemoryTranslationExchangeRuntimeStore) ReserveApplyRecord ¶ added in v0.132.1
func (*MemoryTranslationExchangeRuntimeStore) SaveJobRows ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) SaveJobRows(_ context.Context, job translationExchangeAsyncJob, rows []TranslationExchangeRow) error
func (*MemoryTranslationExchangeRuntimeStore) UpsertJobRow ¶ added in v0.27.0
func (s *MemoryTranslationExchangeRuntimeStore) UpsertJobRow(_ context.Context, jobID string, row translationExchangeStoredRow) error
type Menu ¶
Menu represents a simple CMS menu tree.
func LocalizeMenu ¶ added in v0.52.0
func LocalizeMenu(menu *Menu, t Translator, locale string) *Menu
LocalizeMenu returns a cloned menu tree with labels resolved through the configured translator when available. When no translator is configured it preserves literal labels and does not leak raw label keys into display fields.
type MenuBuilderService ¶ added in v0.26.0
type MenuBuilderService struct {
// contains filtered or unexported fields
}
MenuBuilderService stores admin menu-builder metadata and coordinates menu mutations.
func NewMenuBuilderService ¶ added in v0.26.0
func NewMenuBuilderService() *MenuBuilderService
func (*MenuBuilderService) ArchiveMenu ¶ added in v0.26.0
func (s *MenuBuilderService) ArchiveMenu(id string, archived bool) (AdminMenuRecord, error)
func (*MenuBuilderService) CloneMenu ¶ added in v0.26.0
func (s *MenuBuilderService) CloneMenu(ctx context.Context, svc CMSMenuService, sourceCode, targetCode string, defaultLocale string) (AdminMenuRecord, error)
func (*MenuBuilderService) Contracts ¶ added in v0.26.0
func (s *MenuBuilderService) Contracts(endpoints map[string]string) AdminMenuContracts
func (*MenuBuilderService) CreateMenu ¶ added in v0.26.0
func (s *MenuBuilderService) CreateMenu(ctx context.Context, svc CMSMenuService, input map[string]any, defaultLocale string) (AdminMenuRecord, error)
func (*MenuBuilderService) DeleteMenu ¶ added in v0.26.0
func (s *MenuBuilderService) DeleteMenu(id string, force bool) error
func (*MenuBuilderService) DeleteViewProfile ¶ added in v0.26.0
func (s *MenuBuilderService) DeleteViewProfile(code string) error
func (*MenuBuilderService) GetMenu ¶ added in v0.26.0
func (s *MenuBuilderService) GetMenu(id string) (AdminMenuRecord, bool)
func (*MenuBuilderService) GetViewProfile ¶ added in v0.26.0
func (s *MenuBuilderService) GetViewProfile(code string) (AdminMenuViewProfileRecord, bool)
func (*MenuBuilderService) ListBindings ¶ added in v0.26.0
func (s *MenuBuilderService) ListBindings() []AdminMenuBindingRecord
func (*MenuBuilderService) ListMenus ¶ added in v0.26.0
func (s *MenuBuilderService) ListMenus() []AdminMenuRecord
func (*MenuBuilderService) ListViewProfiles ¶ added in v0.26.0
func (s *MenuBuilderService) ListViewProfiles() []AdminMenuViewProfileRecord
func (*MenuBuilderService) PublishViewProfile ¶ added in v0.26.0
func (s *MenuBuilderService) PublishViewProfile(code string, publish bool) (AdminMenuViewProfileRecord, error)
func (*MenuBuilderService) ResolveBinding ¶ added in v0.26.0
func (s *MenuBuilderService) ResolveBinding(location string, locale string) *AdminMenuBindingRecord
func (*MenuBuilderService) SetMenuStatus ¶ added in v0.26.0
func (s *MenuBuilderService) SetMenuStatus(id, status string) (AdminMenuRecord, error)
func (*MenuBuilderService) UpdateMenu ¶ added in v0.26.0
func (s *MenuBuilderService) UpdateMenu(id string, input map[string]any) (AdminMenuRecord, error)
func (*MenuBuilderService) UpsertBinding ¶ added in v0.26.0
func (s *MenuBuilderService) UpsertBinding(location string, input map[string]any) (AdminMenuBindingRecord, error)
func (*MenuBuilderService) UpsertMenuItems ¶ added in v0.26.0
func (s *MenuBuilderService) UpsertMenuItems(ctx context.Context, svc CMSMenuService, menuCode string, tree []MenuItem, defaultLocale string) (*Menu, error)
func (*MenuBuilderService) UpsertViewProfile ¶ added in v0.26.0
func (s *MenuBuilderService) UpsertViewProfile(code string, input map[string]any) (AdminMenuViewProfileRecord, error)
type MenuContributor ¶
type MenuContributor = modinternal.MenuContributor
MenuContributor optionally lets a module contribute navigation items.
type MenuHandle ¶
type MenuHandle = Navigation
type MenuItem ¶
MenuItem describes a single navigation node.
func LocalizeMenuItems ¶ added in v0.52.0
func LocalizeMenuItems(items []MenuItem, t Translator, locale string) []MenuItem
LocalizeMenuItems returns a cloned slice of menu items with resolved display labels suitable for public and site consumers.
type MessageFactory ¶ added in v0.12.0
MessageFactory builds typed command messages from request data.
type MissingTranslationsError ¶ added in v0.24.0
type MissingTranslationsError struct {
EntityType string `json:"entity_type"`
PolicyEntity string `json:"policy_entity"`
EntityID string `json:"entity_id"`
Transition string `json:"transition"`
Environment string `json:"environment"`
RequestedLocale string `json:"requested_locale"`
MissingLocales []string `json:"missing_locales"`
MissingFieldsByLocale map[string][]string `json:"missing_fields_by_locale"`
RequiredFieldsEvaluated bool `json:"required_fields_evaluated"`
}
MissingTranslationsError reports which locales are required but absent.
func (MissingTranslationsError) Error ¶ added in v0.24.0
func (e MissingTranslationsError) Error() string
func (MissingTranslationsError) Unwrap ¶ added in v0.24.0
func (e MissingTranslationsError) Unwrap() error
type Module ¶
type Module interface {
Manifest() ModuleManifest
Register(ctx ModuleContext) error
}
Module defines the minimal contract for pluggable slices. Modules should be registered before Admin.Initialize is called.
type ModuleContext ¶
type ModuleContext struct {
Admin *Admin `json:"admin"`
// Router is the default module router and is auth-protected when auth is configured.
Router AdminRouter `json:"router"`
// ProtectedRouter always wraps routes with admin auth middleware when auth is configured.
ProtectedRouter AdminRouter `json:"protected_router"`
// PublicRouter bypasses auth middleware and must be used explicitly for public endpoints.
PublicRouter AdminRouter `json:"public_router"`
// AuthMiddleware exposes the admin auth middleware for selective route protection.
AuthMiddleware router.MiddlewareFunc `json:"auth_middleware"`
Locale string `json:"locale"`
Translator Translator `json:"translator"`
Routing routing.ModuleContext `json:"routing"`
// MountRouters exposes host-authorized named routing surfaces declared in
// Routing. Modules should resolve paths through Routing.MountRoutePath.
MountRouters map[string]AdminRouter `json:"-"`
}
ModuleContext is passed to modules so they can register panels, routes, commands, and other contributions against the admin orchestrator.
func (ModuleContext) MountRouter ¶ added in v0.119.0
func (c ModuleContext) MountRouter(name string) (AdminRouter, bool)
type ModuleManifest ¶
type ModuleManifest = modinternal.Manifest
ModuleManifest captures identifying metadata and dependencies for a module. Labels/description keys are i18n-friendly and resolved by the host.
type ModuleMountRouterProvider ¶ added in v0.119.0
type ModuleMountRouterProvider interface {
ModuleMountRouter(surface string) (AdminRouter, bool)
}
ModuleMountRouterProvider is implemented by host routers that can resolve a validated routing surface to its concrete registration router.
type ModuleStartupPolicy ¶ added in v0.25.0
type ModuleStartupPolicy string
ModuleStartupPolicy controls how startup validation errors are handled.
const ( // ModuleStartupPolicyEnforce treats module startup validation errors as fatal. ModuleStartupPolicyEnforce ModuleStartupPolicy = "enforce" // ModuleStartupPolicyWarn logs module startup validation errors and continues. ModuleStartupPolicyWarn ModuleStartupPolicy = "warn" )
type ModuleStartupValidator ¶ added in v0.25.0
ModuleStartupValidator can run additional startup checks after module registration.
type MutationFallback ¶ added in v0.86.0
type MutationFallback struct {
Redirect string
Status int
Toast *EnhancedToast
JSON any
}
type MutationPresentation ¶ added in v0.86.0
type MutationPresentation struct {
Version int `json:"version"`
OK bool `json:"ok"`
Status int `json:"-"`
Toasts []EnhancedToast `json:"toasts,omitempty"`
Fragments []EnhancedFragment `json:"fragments,omitempty"`
Focus string `json:"focus,omitempty"`
Redirect string `json:"redirect,omitempty"`
Error *EnhancedMutationError `json:"error,omitempty"`
Meta map[string]any `json:"meta,omitempty"`
}
func NewMutationPresentation ¶ added in v0.86.0
func NewMutationPresentation(opts ...func(*MutationPresentation)) MutationPresentation
type Navigation ¶
type Navigation = navinternal.Navigation
Navigation resolves menus from CMS or in-memory sources.
func NewNavigation ¶
func NewNavigation(menuSvc CMSMenuService, authorizer Authorizer) *Navigation
NewNavigation builds a navigation helper.
type NavigationClassification ¶ added in v0.90.0
type NavigationClassification = navcontract.Classification
func NavigationClassifications ¶ added in v0.90.0
func NavigationClassifications() []NavigationClassification
type NavigationContributionPolicy ¶ added in v0.90.0
type NavigationContributionPolicy string
const ( )
type NavigationConvergenceCoordinator ¶ added in v0.111.0
type NavigationConvergenceCoordinator interface {
}
type NavigationConvergenceScope ¶ added in v0.111.0
type NavigationConvergenceScope struct {
}
type NavigationCoordinationReport ¶ added in v0.111.0
type NavigationCoordinationReport struct {
}
type NavigationDoctorExpectedItem ¶ added in v0.90.0
type NavigationDoctorExpectedItem struct {
}
type NavigationDoctorItem ¶ added in v0.90.0
type NavigationDoctorItem = navcontract.ClassifiedItem
type NavigationDoctorOptions ¶ added in v0.90.0
type NavigationDoctorOptions struct {
}
type NavigationDoctorReport ¶ added in v0.90.0
type NavigationDoctorReport = navcontract.ClassificationReport
func ClassifyNavigation ¶ added in v0.90.0
func ClassifyNavigation(expected []NavigationDoctorExpectedItem, rendered, raw []MenuItem) NavigationDoctorReport
type NavigationItem ¶
type NavigationItem = navinternal.NavigationItem
NavigationItem represents a node in the admin navigation tree.
type NavigationLifecycleReport ¶ added in v0.90.0
type NavigationLifecycleReport struct {
}
type NavigationOwner ¶ added in v0.90.0
type NavigationOwner = navcontract.Owner
type NavigationPermissionDeclaration ¶ added in v0.111.0
type NavigationPermissionDeclaration struct {
}
type NavigationPermissionDeniedMode ¶ added in v0.82.0
type NavigationPermissionDeniedMode = navinternal.NavigationPermissionDeniedMode
NavigationPermissionDeniedMode controls how denied navigation entries resolve.
func NormalizeNavigationPermissionDeniedMode ¶ added in v0.82.0
func NormalizeNavigationPermissionDeniedMode(mode NavigationPermissionDeniedMode) NavigationPermissionDeniedMode
NormalizeNavigationPermissionDeniedMode returns the canonical navigation permission-denial mode.
type NavigationPermissionRegistry ¶ added in v0.111.0
type NavigationPermissionRegistry struct {
// contains filtered or unexported fields
}
func DefaultNavigationPermissionRegistry ¶ added in v0.111.0
func DefaultNavigationPermissionRegistry(cfg Config) *NavigationPermissionRegistry
func NewNavigationPermissionRegistry ¶ added in v0.111.0
func NewNavigationPermissionRegistry(declarations ...NavigationPermissionDeclaration) *NavigationPermissionRegistry
func (*NavigationPermissionRegistry) Declarations ¶ added in v0.111.0
func (r *NavigationPermissionRegistry) Declarations() []NavigationPermissionDeclaration
func (*NavigationPermissionRegistry) Register ¶ added in v0.111.0
func (r *NavigationPermissionRegistry) Register(declarations ...NavigationPermissionDeclaration)
func (*NavigationPermissionRegistry) ValidatePolicy ¶ added in v0.111.0
func (r *NavigationPermissionRegistry) ValidatePolicy(roles []RoleRecord) PermissionPolicyReport
type NavigationPersistenceReport ¶ added in v0.111.0
type NavigationPersistenceReport struct {
}
type NavigationRawInventoryOptions ¶ added in v0.111.0
type NavigationRawInventoryOptions struct {
}
type NavigationRouteMissingPolicy ¶ added in v0.90.0
type NavigationRouteMissingPolicy string
const ( )
type NoopCLIHandler ¶ added in v0.12.0
type NoopCLIHandler struct{}
NoopCLIHandler is a placeholder for CLI commands without a dedicated CLI implementation.
func (NoopCLIHandler) Run ¶ added in v0.12.0
func (NoopCLIHandler) Run() error
type NoopCMSContainer ¶
type NoopCMSContainer struct {
// contains filtered or unexported fields
}
NoopCMSContainer returns in-memory services that satisfy the CMS contracts.
func NewNoopCMSContainer ¶
func NewNoopCMSContainer() *NoopCMSContainer
NewNoopCMSContainer builds a container with in-memory services.
func (*NoopCMSContainer) ContentService ¶
func (c *NoopCMSContainer) ContentService() CMSContentService
func (*NoopCMSContainer) ContentTypeService ¶ added in v0.23.0
func (c *NoopCMSContainer) ContentTypeService() CMSContentTypeService
func (*NoopCMSContainer) MenuService ¶
func (c *NoopCMSContainer) MenuService() CMSMenuService
func (*NoopCMSContainer) WidgetService ¶
func (c *NoopCMSContainer) WidgetService() CMSWidgetService
type NoopTranslator ¶
type NoopTranslator struct{}
NoopTranslator returns the key unchanged.
func (NoopTranslator) Translate ¶
func (NoopTranslator) Translate(locale, key string, args ...any) (string, error)
func (NoopTranslator) TranslateCount ¶ added in v0.52.0
type Notification ¶
type Notification struct {
ID string `json:"id"`
Title string `json:"title"`
Message string `json:"message"`
Locale string `json:"locale,omitempty"`
ActionURL string `json:"action_url,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
UserID string `json:"user_id,omitempty"`
Read bool `json:"read"`
CreatedAt time.Time `json:"created_at"`
}
Notification represents an inbox item.
type NotificationCapabilityUnavailableError ¶ added in v0.130.0
type NotificationCapabilityUnavailableError struct {
}
NotificationCapabilityUnavailableError distinguishes an enabled feature whose legacy integration does not expose an optional capability.
func (NotificationCapabilityUnavailableError) Error ¶ added in v0.130.0
func (e NotificationCapabilityUnavailableError) Error() string
type NotificationDeliveryInspector ¶ added in v0.130.0
type NotificationDeliveryInspector interface {
GetDelivery(context.Context, deliveries.GetQuery) (deliveries.View, error)
ListDeliveries(context.Context, deliveries.ListQuery) (deliveries.Page, error)
}
NotificationDeliveryInspector exposes privacy-safe, scope-bound delivery projections from go-notifications.
type NotificationEventService ¶ added in v0.130.0
type NotificationEventService interface {
DispatchWithReceipt(context.Context, notifier.Event) (events.DispatchReceipt, error)
RetryWithReceipt(context.Context, events.RetryRequest) (events.DispatchReceipt, error)
RecoverPending(context.Context, int) error
}
NotificationEventService exposes typed event intake and recovery without expanding the legacy inbox-only NotificationService contract.
type NotificationMarkCommand ¶
type NotificationMarkCommand struct {
Service NotificationService `json:"service"`
}
NotificationMarkCommand toggles read state for notifications via the command bus.
func (*NotificationMarkCommand) Execute ¶
func (c *NotificationMarkCommand) Execute(ctx context.Context, msg NotificationMarkMsg) error
type NotificationMarkMsg ¶ added in v0.12.0
NotificationMarkMsg toggles notification read state.
func (NotificationMarkMsg) Type ¶ added in v0.12.0
func (NotificationMarkMsg) Type() string
func (NotificationMarkMsg) Validate ¶ added in v0.12.0
func (m NotificationMarkMsg) Validate() error
type NotificationReceiptService ¶ added in v0.130.0
type NotificationReceiptService interface {
LookupReceipt(context.Context, events.ReceiptLookup) (events.DispatchReceipt, error)
}
NotificationReceiptService recovers an existing idempotent receipt without dispatching or otherwise mutating notification state.
type NotificationRetentionPurgeCommand ¶ added in v0.130.0
type NotificationRetentionPurgeCommand struct {
Service NotificationRetentionService
Activity ActivitySink
Logger Logger
Metrics notifstorage.MetricsCollector
// contains filtered or unexported fields
}
NotificationRetentionPurgeCommand delegates one bounded pass to the configured application service and records only aggregate operational data.
func (*NotificationRetentionPurgeCommand) Execute ¶ added in v0.130.0
func (c *NotificationRetentionPurgeCommand) Execute(ctx context.Context, msg NotificationRetentionPurgeMsg) error
func (*NotificationRetentionPurgeCommand) Run ¶ added in v0.130.0
func (c *NotificationRetentionPurgeCommand) Run(ctx context.Context, msg NotificationRetentionPurgeMsg) (retention.Result, error)
func (*NotificationRetentionPurgeCommand) WithActivitySink ¶ added in v0.130.0
func (c *NotificationRetentionPurgeCommand) WithActivitySink(sink ActivitySink)
WithActivitySink updates the operational activity destination used by future purge executions. It is safe to call while commands are being dispatched.
type NotificationRetentionPurgeMsg ¶ added in v0.130.0
type NotificationRetentionPurgeMsg struct {
retention.Request
Confirm bool `json:"confirm"`
Scope string `json:"-"`
ActorID string `json:"-"`
}
NotificationRetentionPurgeMsg carries one confirmed, trusted-scope purge request.
func (NotificationRetentionPurgeMsg) Type ¶ added in v0.130.0
func (NotificationRetentionPurgeMsg) Type() string
func (NotificationRetentionPurgeMsg) Validate ¶ added in v0.130.0
func (m NotificationRetentionPurgeMsg) Validate() error
type NotificationRetentionService ¶ added in v0.130.0
type NotificationRetentionService interface {
Purge(context.Context, retention.Request) (retention.Result, error)
}
NotificationRetentionService performs one bounded retention pass.
type NotificationRuntimeOptions ¶ added in v0.130.0
type NotificationRuntimeOptions struct {
Storage notifstorage.Providers `json:"storage"`
Retention notifstore.RetentionRepository `json:"retention"`
DeliveryQueries notifstore.DeliveryQueryRepository `json:"delivery_queries"`
}
NotificationRuntimeOptions configures one coherent go-notifications repository graph. Storage is required when the options are supplied; focused repositories may override the matching entries before validation.
func NewBunNotificationRuntime ¶ added in v0.130.0
func NewBunNotificationRuntime(ctx context.Context, db *bun.DB, opts ...notifstorage.Option) (*NotificationRuntimeOptions, error)
NewBunNotificationRuntime builds a coherent persistent notification runtime after the go-notifications migrations have been applied. It fails before provider construction when the required schema is unavailable.
type NotificationService ¶
type NotificationService interface {
List(ctx context.Context) ([]Notification, error)
Add(ctx context.Context, n Notification) (Notification, error)
Mark(ctx context.Context, ids []string, read bool) error
}
NotificationService manages inbox items.
type NotificationsWidgetPayload ¶ added in v0.25.0
type NotificationsWidgetPayload struct {
Notifications []Notification `json:"notifications"`
Unread int `json:"unread"`
}
type ObjectResolverFunc ¶ added in v0.22.0
type ObjectResolverFunc func(ctx context.Context, objectType string, ids []string, meta usersactivity.ResolveContext) (map[string]usersactivity.ObjectInfo, error)
ObjectResolverFunc adapts a function into an ObjectResolver.
func (ObjectResolverFunc) ResolveObjects ¶ added in v0.22.0
func (f ObjectResolverFunc) ResolveObjects(ctx context.Context, objectType string, ids []string, meta usersactivity.ResolveContext) (map[string]usersactivity.ObjectInfo, error)
ResolveObjects satisfies usersactivity.ObjectResolver.
type ObjectResolverMap ¶ added in v0.22.0
type ObjectResolverMap struct {
Resolvers map[string]usersactivity.ObjectResolver `json:"resolvers"`
Fallback usersactivity.ObjectResolver `json:"fallback"`
}
ObjectResolverMap dispatches object resolution by object type.
func (ObjectResolverMap) ResolveObjects ¶ added in v0.22.0
func (m ObjectResolverMap) ResolveObjects(ctx context.Context, objectType string, ids []string, meta usersactivity.ResolveContext) (map[string]usersactivity.ObjectInfo, error)
ResolveObjects resolves objects by type, falling back when needed.
type Option ¶
type Option struct {
Value any `json:"value"`
Label string `json:"label"`
LabelKey string `json:"label_key,omitempty"`
}
Option is a select/choice option.
type OrganizationMember ¶
type OrganizationMember struct {
UserID string `json:"user_id"`
Roles []string `json:"roles,omitempty"`
Permissions []string `json:"permissions,omitempty"`
}
OrganizationMember captures membership assignments for an organization.
type OrganizationPanelRepository ¶
type OrganizationPanelRepository = genericPanelRepository[OrganizationRecord]
OrganizationPanelRepository adapts OrganizationService to the panel Repository contract.
func NewOrganizationPanelRepository ¶
func NewOrganizationPanelRepository(service *OrganizationService) *OrganizationPanelRepository
NewOrganizationPanelRepository constructs a repository backed by OrganizationService.
type OrganizationRecord ¶
type OrganizationRecord struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug,omitempty"`
Status string `json:"status,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
Members []OrganizationMember `json:"members,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
OrganizationRecord represents an organization managed by the admin.
type OrganizationRepository ¶
type OrganizationRepository interface {
List(ctx context.Context, opts ListOptions) ([]OrganizationRecord, int, error)
Get(ctx context.Context, id string) (OrganizationRecord, error)
Create(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
Update(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
Delete(ctx context.Context, id string) error
Search(ctx context.Context, query string, limit int) ([]OrganizationRecord, error)
}
OrganizationRepository exposes CRUD/search operations for organizations with membership awareness.
type OrganizationService ¶
type OrganizationService struct {
// contains filtered or unexported fields
}
OrganizationService orchestrates organization management and activity emission.
func NewOrganizationService ¶
func NewOrganizationService(repo OrganizationRepository) *OrganizationService
NewOrganizationService constructs a service with the provided repository or an in-memory fallback.
func (*OrganizationService) AssignMember ¶
func (s *OrganizationService) AssignMember(ctx context.Context, orgID string, member OrganizationMember) (OrganizationRecord, error)
AssignMember adds or updates an organization membership.
func (*OrganizationService) DeleteOrganization ¶
func (s *OrganizationService) DeleteOrganization(ctx context.Context, id string) error
DeleteOrganization removes an organization by ID.
func (*OrganizationService) GetOrganization ¶
func (s *OrganizationService) GetOrganization(ctx context.Context, id string) (OrganizationRecord, error)
GetOrganization fetches an organization by ID.
func (*OrganizationService) ListOrganizations ¶
func (s *OrganizationService) ListOrganizations(ctx context.Context, opts ListOptions) ([]OrganizationRecord, int, error)
ListOrganizations returns organizations with filters applied.
func (*OrganizationService) RemoveMember ¶
func (s *OrganizationService) RemoveMember(ctx context.Context, orgID, userID string) (OrganizationRecord, error)
RemoveMember detaches a user from an organization.
func (*OrganizationService) SaveOrganization ¶
func (s *OrganizationService) SaveOrganization(ctx context.Context, org OrganizationRecord) (OrganizationRecord, error)
SaveOrganization creates or updates an organization record.
func (*OrganizationService) SearchOrganizations ¶
func (s *OrganizationService) SearchOrganizations(ctx context.Context, query string, limit int) ([]OrganizationRecord, error)
SearchOrganizations performs a keyword search against organizations.
func (*OrganizationService) WithActivitySink ¶
func (s *OrganizationService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission for organization mutations.
type OrganizationsModule ¶
type OrganizationsModule struct {
// contains filtered or unexported fields
}
OrganizationsModule registers the organizations panel and navigation.
func NewOrganizationsModule ¶
func NewOrganizationsModule() *OrganizationsModule
NewOrganizationsModule constructs the default organizations module.
func (*OrganizationsModule) Manifest ¶
func (m *OrganizationsModule) Manifest() ModuleManifest
Manifest describes the module metadata.
func (*OrganizationsModule) MenuItems ¶
func (m *OrganizationsModule) MenuItems(locale string) []MenuItem
MenuItems contributes navigation for organizations.
func (*OrganizationsModule) Register ¶
func (m *OrganizationsModule) Register(ctx ModuleContext) error
Register wires the organizations panel and search adapter.
func (*OrganizationsModule) RouteContract ¶ added in v0.27.0
func (m *OrganizationsModule) RouteContract() routing.ModuleContract
func (*OrganizationsModule) WithMenuParent ¶
func (m *OrganizationsModule) WithMenuParent(parent string) *OrganizationsModule
WithMenuParent nests organization navigation under a parent menu item ID.
type OwnedCommandRuntimeConfig ¶ added in v0.126.8
type OwnedCommandRuntimeConfig struct {
Executors map[command.ExecutionMode]dispatcher.CommandExecutor
Placement command.PlacementResolver
Remote command.RemoteDispatcher
RunnerDefaults []runner.Option
}
OwnedCommandRuntimeConfig is the explicit execution-capability snapshot inherited by owner-scoped command runtimes.
Queued executors receive an observed context containing the safe command.DispatchRunContext that must be persisted with queued work. Workers rehydrate that value and invoke dispatcher.RunObservedCommand; arbitrary request-context values and raw secrets are not queue payload contracts.
type PageApplicationService ¶ added in v0.24.0
type PageApplicationService struct {
Read AdminPageReadService `json:"read"`
Write AdminPageWriteService `json:"write"`
Mapper PageMapper `json:"mapper"`
Workflow WorkflowEngine `json:"workflow"`
TranslationPolicy TranslationPolicy `json:"translation_policy"`
IncludeDefaults *PageReadDefaults `json:"include_defaults"`
}
PageApplicationService orchestrates admin page reads/writes plus mapping/workflow.
func (PageApplicationService) Create ¶ added in v0.24.0
func (s PageApplicationService) Create(ctx context.Context, payload map[string]any) (*AdminPageRecord, error)
Create writes a new page record, applying workflow transitions when configured.
func (PageApplicationService) Delete ¶ added in v0.24.0
func (s PageApplicationService) Delete(ctx context.Context, id string) error
Delete removes a page record.
func (PageApplicationService) Get ¶ added in v0.24.0
func (s PageApplicationService) Get(ctx context.Context, id string, opts PageGetOptions) (*AdminPageRecord, error)
Get retrieves a single admin page record using get include defaults.
func (PageApplicationService) List ¶ added in v0.24.0
func (s PageApplicationService) List(ctx context.Context, opts PageListOptions) ([]AdminPageRecord, int, error)
List returns admin page records using list include defaults.
func (PageApplicationService) Publish ¶ added in v0.24.0
func (s PageApplicationService) Publish(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
Publish applies the publish transition before delegating to the write service.
func (PageApplicationService) ToFormValues ¶ added in v0.24.0
func (s PageApplicationService) ToFormValues(record AdminPageRecord) map[string]any
ToFormValues maps an admin record into form values.
func (PageApplicationService) Unpublish ¶ added in v0.24.0
func (s PageApplicationService) Unpublish(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
Unpublish applies the unpublish transition before delegating to the write service.
func (PageApplicationService) Update ¶ added in v0.24.0
func (s PageApplicationService) Update(ctx context.Context, id string, payload map[string]any) (*AdminPageRecord, error)
Update writes an existing page record, applying workflow transitions when configured.
type PageGetOptions ¶ added in v0.24.0
type PageGetOptions struct {
PageReadOptions
}
PageGetOptions captures get options plus read overrides.
type PageIncludeDefaults ¶ added in v0.24.0
type PageIncludeDefaults struct {
IncludeContent bool `json:"include_content"`
IncludeBlocks bool `json:"include_blocks"`
IncludeData bool `json:"include_data"`
}
PageIncludeDefaults defines default include flags for read operations.
type PageListOptions ¶ added in v0.24.0
type PageListOptions struct {
PageReadOptions
Page int `json:"page"`
PerPage int `json:"per_page"`
SortBy string `json:"sort_by"`
SortDesc bool `json:"sort_desc"`
Search string `json:"search"`
Filters map[string]any `json:"filters"`
}
PageListOptions captures list options plus read overrides.
type PageMapper ¶ added in v0.24.0
type PageMapper interface {
ToFormValues(record AdminPageRecord) map[string]any
}
PageMapper centralizes mapping between admin read models and form values.
type PageReadDefaults ¶ added in v0.24.0
type PageReadDefaults struct {
List PageIncludeDefaults `json:"list"`
Get PageIncludeDefaults `json:"get"`
}
PageReadDefaults captures include defaults for list/get endpoints.
type PageReadOptions ¶ added in v0.24.0
type PageReadOptions struct {
Locale string `json:"locale"`
FallbackLocale string `json:"fallback_locale"`
AllowMissingTranslations bool `json:"allow_missing_translations"`
IncludeContent *bool `json:"include_content"`
IncludeBlocks *bool `json:"include_blocks"`
IncludeData *bool `json:"include_data"`
EnvironmentKey string `json:"environment_key"`
}
PageReadOptions captures caller overrides for read behavior.
type PageTranslation ¶ added in v0.24.0
type PageTranslation = cmsinterfaces.PageTranslation
PageTranslation mirrors the go-cms page translation DTO.
type Panel ¶
type Panel struct {
// contains filtered or unexported fields
}
Panel represents a registered panel.
func RegisterTranslationQueuePanel ¶ added in v0.25.0
func RegisterTranslationQueuePanel(admin *Admin, repo TranslationAssignmentRepository) (*Panel, error)
RegisterTranslationQueuePanel registers the translation queue panel.
func (*Panel) Authorizer ¶ added in v0.111.0
func (p *Panel) Authorizer() Authorizer
Authorizer returns the authorizer used by panel CRUD operations.
func (*Panel) Breadcrumbs ¶ added in v0.27.0
func (p *Panel) Breadcrumbs() PanelBreadcrumbConfig
Breadcrumbs returns the panel breadcrumb contract.
func (*Panel) Delete ¶
func (p *Panel) Delete(ctx AdminContext, id string) error
Delete removes a record with hooks and permissions.
func (*Panel) EntryMode ¶ added in v0.25.0
func (p *Panel) EntryMode() PanelEntryMode
EntryMode returns the canonical panel entry behavior.
func (*Panel) List ¶
func (p *Panel) List(ctx AdminContext, opts ListOptions) ([]map[string]any, int, error)
List retrieves records with permissions enforced.
func (*Panel) RunAction ¶
func (p *Panel) RunAction(ctx AdminContext, name string, payload map[string]any, ids []string) (map[string]any, error)
RunAction dispatches a command-backed action.
func (*Panel) RunActionResponse ¶ added in v0.27.0
func (p *Panel) RunActionResponse(ctx AdminContext, name string, payload map[string]any, ids []string) (ActionResponse, error)
RunActionResponse dispatches a command-backed action and returns a structured response.
func (*Panel) RunBulkAction ¶
func (p *Panel) RunBulkAction(ctx AdminContext, name string, payload map[string]any, ids []string) error
RunBulkAction dispatches a command-backed bulk action.
func (*Panel) SchemaWithTheme ¶
SchemaWithTheme attaches the resolved theme payload for UI renderers.
func (*Panel) ServeSubresource ¶ added in v0.25.0
func (p *Panel) ServeSubresource(ctx AdminContext, c router.Context, id, subresource, value string) error
ServeSubresource resolves a panel subresource request.
func (*Panel) Subresources ¶ added in v0.25.0
func (p *Panel) Subresources() []PanelSubresource
Subresources returns normalized panel subresource declarations.
func (*Panel) UIRouteMode ¶ added in v0.25.0
func (p *Panel) UIRouteMode() PanelUIRouteMode
UIRouteMode returns the panel UI route ownership mode.
type PanelActionDefaultsMode ¶ added in v0.27.0
type PanelActionDefaultsMode string
PanelActionDefaultsMode controls which implicit row/bulk actions are added when rendering panel schema contracts.
const ( // PanelActionDefaultsModeConservative keeps implicit defaults minimal. // Row defaults: view, edit. PanelActionDefaultsModeConservative PanelActionDefaultsMode = "conservative" // PanelActionDefaultsModeCRUD enables full CRUD defaults. // Row defaults: view, edit, delete. Bulk defaults: delete. PanelActionDefaultsModeCRUD PanelActionDefaultsMode = "crud" // PanelActionDefaultsModeNone disables implicit action defaults. PanelActionDefaultsModeNone PanelActionDefaultsMode = "none" )
type PanelBreadcrumbConfig ¶ added in v0.27.0
type PanelBreadcrumbConfig struct {
ListLabel string `json:"list_label"`
RootLabel string `json:"root_label"`
RootHref string `json:"root_href"`
ShowCurrentOnDetail bool `json:"show_current_on_detail"`
DetailLabelResolver func(record map[string]any) string `json:"detail_label_resolver"`
}
PanelBreadcrumbConfig controls breadcrumb rendering for panel-backed routes.
type PanelBuilder ¶
type PanelBuilder struct {
// contains filtered or unexported fields
}
PanelBuilder configures a panel before registration.
func NewTranslationQueuePanel ¶ added in v0.25.0
func NewTranslationQueuePanel(repo Repository) *PanelBuilder
NewTranslationQueuePanel builds the translation queue panel schema and actions.
func (*PanelBuilder) Actions ¶
func (b *PanelBuilder) Actions(actions ...Action) *PanelBuilder
Actions sets row-level actions.
func (*PanelBuilder) Build ¶
func (b *PanelBuilder) Build() (*Panel, error)
Build finalizes the panel.
func (*PanelBuilder) BulkActions ¶
func (b *PanelBuilder) BulkActions(actions ...Action) *PanelBuilder
BulkActions sets bulk actions.
func (*PanelBuilder) DetailFields ¶
func (b *PanelBuilder) DetailFields(fields ...Field) *PanelBuilder
DetailFields configures detail fields.
func (*PanelBuilder) Filters ¶
func (b *PanelBuilder) Filters(filters ...Filter) *PanelBuilder
Filters sets filters.
func (*PanelBuilder) FormFields ¶
func (b *PanelBuilder) FormFields(fields ...Field) *PanelBuilder
FormFields configures form fields.
func (*PanelBuilder) FormSchema ¶ added in v0.23.0
func (b *PanelBuilder) FormSchema(schema map[string]any) *PanelBuilder
FormSchema overrides the generated form schema for the panel.
func (*PanelBuilder) Hooks ¶
func (b *PanelBuilder) Hooks(h PanelHooks) *PanelBuilder
Hooks sets lifecycle hooks.
func (*PanelBuilder) ListFields ¶
func (b *PanelBuilder) ListFields(fields ...Field) *PanelBuilder
ListFields configures list fields.
func (*PanelBuilder) Permissions ¶
func (b *PanelBuilder) Permissions(p PanelPermissions) *PanelBuilder
Permissions sets panel permissions.
func (*PanelBuilder) Subresources ¶ added in v0.25.0
func (b *PanelBuilder) Subresources(subresources ...PanelSubresource) *PanelBuilder
Subresources sets panel subresource route declarations.
func (*PanelBuilder) Tabs ¶ added in v0.2.0
func (b *PanelBuilder) Tabs(tabs ...PanelTab) *PanelBuilder
Tabs sets owner tabs for the panel.
func (*PanelBuilder) TreeView ¶
func (b *PanelBuilder) TreeView(enabled bool) *PanelBuilder
TreeView toggles hierarchical view.
func (*PanelBuilder) UseBlocks ¶
func (b *PanelBuilder) UseBlocks(enabled bool) *PanelBuilder
UseBlocks enables block editing for CMS-backed panels.
func (*PanelBuilder) UseSEO ¶
func (b *PanelBuilder) UseSEO(enabled bool) *PanelBuilder
UseSEO enables SEO metadata for CMS-backed panels.
func (*PanelBuilder) WithActionDefaults ¶ added in v0.27.0
func (b *PanelBuilder) WithActionDefaults(mode PanelActionDefaultsMode) *PanelBuilder
WithActionDefaults configures implicit action defaults for schema/runtime action contracts.
func (*PanelBuilder) WithActionStateResolver ¶ added in v0.27.0
func (b *PanelBuilder) WithActionStateResolver(resolver BatchActionStateResolver) *PanelBuilder
WithActionStateResolver attaches a batch resolver for row/detail action state.
func (*PanelBuilder) WithActivitySink ¶
func (b *PanelBuilder) WithActivitySink(sink ActivitySink) *PanelBuilder
WithActivitySink wires the activity sink used to record panel events.
func (*PanelBuilder) WithAuthorizer ¶
func (b *PanelBuilder) WithAuthorizer(a Authorizer) *PanelBuilder
WithAuthorizer sets an authorizer for permission checks.
func (*PanelBuilder) WithBreadcrumbs ¶ added in v0.27.0
func (b *PanelBuilder) WithBreadcrumbs(cfg PanelBreadcrumbConfig) *PanelBuilder
WithBreadcrumbs configures package-level breadcrumb defaults for the panel.
func (*PanelBuilder) WithBulkActionStateResolver ¶ added in v0.27.0
func (b *PanelBuilder) WithBulkActionStateResolver(resolver BulkActionStateResolver) *PanelBuilder
WithBulkActionStateResolver attaches a resolver for static list bulk action state.
func (*PanelBuilder) WithCRUDService ¶
func (b *PanelBuilder) WithCRUDService(service crud.Service[map[string]any]) *PanelBuilder
WithCRUDService configures the panel to use a go-crud service (Bun-backed).
func (*PanelBuilder) WithCommandBus ¶
func (b *PanelBuilder) WithCommandBus(bus *CommandBus) *PanelBuilder
WithCommandBus attaches the command bus.
func (*PanelBuilder) WithEntryMode ¶ added in v0.25.0
func (b *PanelBuilder) WithEntryMode(mode PanelEntryMode) *PanelBuilder
WithEntryMode configures how the panel resolves its canonical entry route.
func (*PanelBuilder) WithRepository ¶
func (b *PanelBuilder) WithRepository(repo Repository) *PanelBuilder
WithRepository sets the panel repository.
func (*PanelBuilder) WithTranslationPolicy ¶ added in v0.24.0
func (b *PanelBuilder) WithTranslationPolicy(policy TranslationPolicy) *PanelBuilder
WithTranslationPolicy attaches a translation policy to the panel.
func (*PanelBuilder) WithTranslationQueueAutoCreateHook ¶ added in v0.25.0
func (b *PanelBuilder) WithTranslationQueueAutoCreateHook(hook TranslationQueueAutoCreateHook) *PanelBuilder
WithTranslationQueueAutoCreateHook attaches a queue auto-create hook to the panel. When set, workflow transitions blocked by missing translations will automatically create/reuse queue assignments for the missing locales.
func (*PanelBuilder) WithUIRouteMode ¶ added in v0.25.0
func (b *PanelBuilder) WithUIRouteMode(mode PanelUIRouteMode) *PanelBuilder
WithUIRouteMode configures whether canonical panel UI routes should be auto-wired.
func (*PanelBuilder) WithWorkflow ¶ added in v0.22.0
func (b *PanelBuilder) WithWorkflow(w WorkflowEngine) *PanelBuilder
WithWorkflow attaches a workflow engine to the panel.
func (*PanelBuilder) WithWorkflowAuthorizer ¶ added in v0.22.0
func (b *PanelBuilder) WithWorkflowAuthorizer(auth WorkflowAuthorizer) *PanelBuilder
WithWorkflowAuthorizer attaches a workflow authorizer to the panel.
type PanelEntryMode ¶ added in v0.25.0
type PanelEntryMode string
PanelEntryMode declares which surface a panel should use as its canonical entry point when the base panel route (for example /admin/<panel>) is opened.
const ( // PanelEntryModeList renders the panel list/datagrid view. PanelEntryModeList PanelEntryMode = "list" // PanelEntryModeDetailCurrentUser renders the detail view for the current // authenticated user ID from request context. PanelEntryModeDetailCurrentUser PanelEntryMode = "detail_current_user" )
type PanelFormAdapter ¶
type PanelFormAdapter struct {
ThemeResolver func(context.Context) *ThemeSelection `json:"theme_resolver"`
}
PanelFormAdapter maps panel definitions into a form request, injecting theme tokens and context. This is intentionally light so hosts can pass the payload to go-formgen orchestrators.
func (*PanelFormAdapter) Build ¶
func (a *PanelFormAdapter) Build(panel *Panel, ctx AdminContext, values map[string]any, errors map[string]string) PanelFormRequest
Build assembles a PanelFormRequest for a panel and locale, merging theme payload and provided values/errors.
type PanelFormRequest ¶
type PanelFormRequest struct {
Schema Schema `json:"schema"`
Values map[string]any `json:"values"`
Errors map[string]string `json:"errors"`
Locale string `json:"locale"`
Theme map[string]map[string]string `json:"theme"`
// RenderTheme carries the typed go-formgen theme contract for in-process
// renderers. It stays out of the wire payload because AssetURL is a function.
RenderTheme *formrender.ThemeConfig `json:"-"`
Metadata map[string]any `json:"metadata"`
}
PanelFormRequest captures the data needed to render a panel form via go-formgen.
type PanelHooks ¶
type PanelHooks struct {
BeforeCreate func(ctx AdminContext, record map[string]any) error `json:"before_create"`
AfterCreate func(ctx AdminContext, record map[string]any) error `json:"after_create"`
BeforeUpdate func(ctx AdminContext, record map[string]any) error `json:"before_update"`
BeforeUpdateWithID func(ctx AdminContext, id string, record map[string]any) error `json:"before_update_with_id"`
AfterUpdate func(ctx AdminContext, record map[string]any) error `json:"after_update"`
BeforeDelete func(ctx AdminContext, id string) error `json:"before_delete"`
AfterDelete func(ctx AdminContext, id string) error `json:"after_delete"`
}
PanelHooks contains lifecycle callbacks.
type PanelListCapabilities ¶ added in v0.130.0
type PanelListCapabilities struct {
Selection bool `json:"selection"`
Bulk bool `json:"bulk"`
Export bool `json:"export"`
}
PanelListCapabilities describes the optional operations supported by a panel list. Selection is derived from operations that consume selected record IDs.
func ResolvePanelListCapabilities ¶ added in v0.130.0
func ResolvePanelListCapabilities(bulk, export bool) PanelListCapabilities
ResolvePanelListCapabilities returns a normalized list capability projection.
func (PanelListCapabilities) Normalized ¶ added in v0.130.0
func (c PanelListCapabilities) Normalized() PanelListCapabilities
Normalized enforces the selection invariant for public callers.
type PanelPermissions ¶
type PanelPermissions struct {
View string `json:"view"`
Create string `json:"create"`
Edit string `json:"edit"`
Delete string `json:"delete"`
}
PanelPermissions declares resource actions.
type PanelSubresource ¶ added in v0.25.0
type PanelSubresource struct {
Name string `json:"name"`
Label string `json:"label,omitempty"`
Method string `json:"method,omitempty"`
Permission string `json:"permission,omitempty"`
}
PanelSubresource defines a panel-owned HTTP subresource endpoint addressable as /:panel/:id/:name/:value.
type PanelSubresourceRepository ¶ added in v0.25.0
type PanelSubresourceRepository interface {
ResolvePanelSubresource(ctx context.Context, id, subresource, value string) (any, error)
}
PanelSubresourceRepository resolves panel subresource payloads. Responses are JSON encoded by the default panel route handler.
type PanelSubresourceResponder ¶ added in v0.25.0
type PanelSubresourceResponder interface {
ServePanelSubresource(ctx AdminContext, c router.Context, id, subresource, value string) error
}
PanelSubresourceResponder writes panel subresource responses directly. This is useful for non-JSON responses such as binary file downloads.
type PanelTab ¶ added in v0.2.0
type PanelTab struct {
ID string `json:"id"`
Label string `json:"label,omitempty"`
LabelKey string `json:"label_key,omitempty"`
Icon string `json:"icon,omitempty"`
Position int `json:"position,omitempty"`
Permission string `json:"permission,omitempty"`
Scope PanelTabScope `json:"scope,omitempty"`
Target PanelTabTarget `json:"target"`
Filters map[string]string `json:"filters,omitempty"`
Query map[string]string `json:"query,omitempty"`
Contexts []string `json:"contexts,omitempty"`
}
PanelTab defines panel tab metadata for list/detail/form views.
type PanelTabCollisionHandler ¶ added in v0.2.0
type PanelTabCollisionHandler func(panelName string, existing PanelTab, incoming PanelTab) (PanelTab, error)
PanelTabCollisionHandler is invoked when a duplicate tab ID is detected. Return the chosen tab, or an error to abort registration/merge.
type PanelTabPermissionEvaluator ¶ added in v0.2.0
type PanelTabPermissionEvaluator func(ctx AdminContext, tab PanelTab, panelName string) bool
PanelTabPermissionEvaluator allows custom permission checks for tabs.
type PanelTabScope ¶ added in v0.2.0
type PanelTabScope string
PanelTabScope defines where a tab is intended to render.
const ( PanelTabScopeList PanelTabScope = "list" PanelTabScopeDetail PanelTabScope = "detail" PanelTabScopeForm PanelTabScope = "form" )
type PanelTabTarget ¶ added in v0.2.0
type PanelTabTarget struct {
Type string `json:"type"` // "panel" | "path" | "external"
Panel string `json:"panel,omitempty"` // when Type == "panel"
Path string `json:"path,omitempty"` // when Type == "path" or "external"
}
PanelTabTarget describes the navigation target for a tab.
type PanelUIRouteMode ¶ added in v0.25.0
type PanelUIRouteMode string
PanelUIRouteMode declares who owns the panel's HTML UI route surface.
const ( // PanelUIRouteModeCanonical means generic canonical UI routes may be auto-wired. PanelUIRouteModeCanonical PanelUIRouteMode = "canonical" // PanelUIRouteModeCustom means module-specific handlers own the panel UI routes. PanelUIRouteModeCustom PanelUIRouteMode = "custom" )
type PermissionDeniedError ¶ added in v0.8.0
type PermissionDeniedError struct {
Permission string `json:"permission"`
Resource string `json:"resource"`
Hint string `json:"hint"`
ReauthRequired bool `json:"reauth_required"`
}
PermissionDeniedError describes a missing authorization permission.
func (PermissionDeniedError) Error ¶ added in v0.8.0
func (e PermissionDeniedError) Error() string
func (PermissionDeniedError) Unwrap ¶ added in v0.8.0
func (e PermissionDeniedError) Unwrap() error
type PermissionEntry ¶ added in v0.25.0
type PermissionEntry struct {
Permission string `json:"permission"`
Required bool `json:"required"`
InClaims bool `json:"in_claims"`
CoveredByGrant bool `json:"covered_by_grant,omitempty"`
CoveringGrant string `json:"covering_grant,omitempty"`
Allows bool `json:"allows"`
Diagnosis string `json:"diagnosis"`
Status string `json:"status"` // ok, error, warning, info
Module string `json:"module,omitempty"`
}
PermissionEntry represents a single permission with its diagnostic status.
type PermissionPolicyFinding ¶ added in v0.111.0
type PermissionPolicyReport ¶ added in v0.111.0
type PermissionPolicyReport struct {
Declared int `json:"declared"`
Roles int `json:"roles"`
Missing []PermissionPolicyFinding `json:"missing,omitempty"`
Stale []PermissionPolicyFinding `json:"stale,omitempty"`
}
type PermissionResolverFunc ¶ added in v0.25.0
PermissionResolverFunc resolves the effective permission set for a request context.
type PermissionResolverMetrics ¶ added in v0.25.0
type PermissionResolverMetrics struct {
Calls uint64 `json:"calls"`
ResolverRuns uint64 `json:"resolver_runs"`
CacheHits uint64 `json:"cache_hits"`
CacheMisses uint64 `json:"cache_misses"`
Errors uint64 `json:"errors"`
ContextCacheAbsent uint64 `json:"context_cache_absent"`
}
PermissionResolverMetrics captures resolver/caching behavior counters.
type PermissionsDebugPanel ¶ added in v0.25.0
type PermissionsDebugPanel struct {
// contains filtered or unexported fields
}
PermissionsDebugPanel implements the DebugPanel interface for permissions diagnostics.
func NewPermissionsDebugPanel ¶ added in v0.25.0
func NewPermissionsDebugPanel(admin *Admin) *PermissionsDebugPanel
NewPermissionsDebugPanel creates a new permissions debug panel.
func (*PermissionsDebugPanel) Collect ¶ added in v0.25.0
func (p *PermissionsDebugPanel) Collect(ctx context.Context) map[string]any
Collect gathers permissions diagnostic data.
func (*PermissionsDebugPanel) ID ¶ added in v0.25.0
func (p *PermissionsDebugPanel) ID() string
ID returns the panel identifier.
func (*PermissionsDebugPanel) Icon ¶ added in v0.25.0
func (p *PermissionsDebugPanel) Icon() string
Icon returns the panel icon class.
func (*PermissionsDebugPanel) Label ¶ added in v0.25.0
func (p *PermissionsDebugPanel) Label() string
Label returns the panel display label.
func (*PermissionsDebugPanel) Span ¶ added in v0.25.0
func (p *PermissionsDebugPanel) Span() int
Span returns the panel grid span.
type PermissionsDebugSnapshot ¶ added in v0.25.0
type PermissionsDebugSnapshot struct {
Verdict string `json:"verdict"`
EnabledModules []string `json:"enabled_modules"`
RequiredPermissions map[string]string `json:"required_permissions"` // permission -> module
ClaimsPermissions []string `json:"claims_permissions"`
PermissionChecks map[string]bool `json:"permission_checks"`
MissingPermissions []string `json:"missing_permissions"`
Entries []PermissionEntry `json:"entries"`
Summary struct {
ModuleCount int `json:"module_count"`
RequiredKeys int `json:"required_keys"`
ClaimsKeys int `json:"claims_keys"`
MissingKeys int `json:"missing_keys"`
} `json:"summary"`
NextActions []string `json:"next_actions"`
UserInfo struct {
UserID string `json:"user_id,omitempty"`
Username string `json:"username,omitempty"`
Role string `json:"role,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
} `json:"user_info"`
}
PermissionsDebugSnapshot contains the full permissions diagnostic data.
type PersistedWorkflow ¶ added in v0.25.0
type PersistedWorkflow = workflowcore.PersistedWorkflow
type PersistedWorkflowListOptions ¶ added in v0.25.0
type PersistedWorkflowListOptions = workflowcore.PersistedWorkflowListOptions
type PersistedWorkflowStatus ¶ added in v0.25.0
type PersistedWorkflowStatus = workflowcore.PersistedWorkflowStatus
PersistedWorkflowStatus controls rollout state for stored workflow definitions.
type PreferenceLevel ¶ added in v0.11.0
type PreferenceLevel string
PreferenceLevel represents the scope level for resolved preferences.
const ( PreferenceLevelSystem PreferenceLevel = "system" PreferenceLevelTenant PreferenceLevel = "tenant" PreferenceLevelOrg PreferenceLevel = "org" PreferenceLevelUser PreferenceLevel = "user" )
type PreferenceScope ¶ added in v0.11.0
type PreferenceScope struct {
UserID string `json:"user_id,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
}
PreferenceScope captures scope identifiers used during resolution.
type PreferenceSnapshot ¶ added in v0.11.0
type PreferenceSnapshot struct {
Effective map[string]any `json:"effective"`
Traces []PreferenceTrace `json:"traces"`
Versions map[string]int `json:"versions"`
}
PreferenceSnapshot returns effective values plus optional metadata.
type PreferenceTrace ¶ added in v0.11.0
type PreferenceTrace struct {
Key string `json:"key"`
Layers []PreferenceTraceLayer `json:"layers"`
}
PreferenceTrace records provenance for a single key.
type PreferenceTraceLayer ¶ added in v0.11.0
type PreferenceTraceLayer struct {
Level PreferenceLevel `json:"level"`
Scope PreferenceScope `json:"scope"`
Found bool `json:"found"`
Value any `json:"value,omitempty"`
Version int `json:"version,omitempty"`
}
PreferenceTraceLayer records a resolved value at a specific level.
type PreferencesAPICapabilities ¶ added in v0.126.6
type PreferencesAPICapabilities struct {
Available bool `json:"available"`
Readable bool `json:"readable"`
Writable bool `json:"writable"`
}
PreferencesAPICapabilities describes route and request authorization for the shared Preferences panel.
type PreferencesDeleteInput ¶ added in v0.11.0
type PreferencesDeleteInput struct {
Scope PreferenceScope `json:"scope"`
Level PreferenceLevel `json:"level"`
Keys []string `json:"keys"`
}
PreferencesDeleteInput represents a scoped preference delete.
type PreferencesModule ¶
type PreferencesModule struct {
// contains filtered or unexported fields
}
PreferencesModule registers a user preferences panel and navigation entry. It is feature-gated via FeaturePreferences and backed by PreferencesService.
func NewPreferencesModule ¶
func NewPreferencesModule() *PreferencesModule
NewPreferencesModule constructs the default preferences module.
func (*PreferencesModule) Manifest ¶
func (m *PreferencesModule) Manifest() ModuleManifest
func (*PreferencesModule) MenuItems ¶
func (m *PreferencesModule) MenuItems(locale string) []MenuItem
func (*PreferencesModule) Register ¶
func (m *PreferencesModule) Register(ctx ModuleContext) error
func (*PreferencesModule) RouteContract ¶ added in v0.27.0
func (m *PreferencesModule) RouteContract() routing.ModuleContract
func (*PreferencesModule) WithBasePath ¶ added in v0.24.0
func (m *PreferencesModule) WithBasePath(basePath string) *PreferencesModule
WithBasePath sets the base path used for menu item targets (e.g., /admin).
func (*PreferencesModule) WithJSONEditorStrict ¶ added in v0.24.0
func (m *PreferencesModule) WithJSONEditorStrict(strict bool) *PreferencesModule
WithJSONEditorStrict toggles client-side JSON editor strictness.
func (*PreferencesModule) WithMenuParent ¶
func (m *PreferencesModule) WithMenuParent(parent string) *PreferencesModule
WithMenuParent nests the preferences navigation under a parent menu item ID.
func (*PreferencesModule) WithSchemaPath ¶ added in v0.24.0
func (m *PreferencesModule) WithSchemaPath(path string) *PreferencesModule
WithSchemaPath overrides the default preferences form schema path.
func (*PreferencesModule) WithSkipMenu ¶ added in v0.24.0
func (m *PreferencesModule) WithSkipMenu(skip bool) *PreferencesModule
WithSkipMenu suppresses navigation menu contribution while keeping panel registration.
func (*PreferencesModule) WithViewContextBuilder ¶ added in v0.24.0
func (m *PreferencesModule) WithViewContextBuilder(builder PreferencesViewContextBuilder) *PreferencesModule
WithViewContextBuilder injects navigation/session/theme data for the preferences UI.
type PreferencesOption ¶ added in v0.20.0
type PreferencesOption func(*PreferencesStoreAdapter)
PreferencesOption customizes the PreferencesStore adapter.
func WithDeleteMissing ¶ added in v0.24.0
func WithDeleteMissing(enabled bool) PreferencesOption
WithDeleteMissing controls whether Save deletes persisted keys missing in snapshot.
func WithKeyPrefix ¶ added in v0.20.0
func WithKeyPrefix(prefix string) PreferencesOption
WithKeyPrefix overrides the key prefix used for domain names.
func WithKeys ¶ added in v0.20.0
func WithKeys(keys ...string) PreferencesOption
WithKeys restricts loads to the provided feature keys (without prefix).
type PreferencesRepository ¶
type PreferencesRepository struct {
// contains filtered or unexported fields
}
PreferencesRepository adapts PreferencesService to the panel Repository contract.
func NewPreferencesRepository ¶
func NewPreferencesRepository(admin *Admin) *PreferencesRepository
NewPreferencesRepository constructs a repository backed by PreferencesService.
func (*PreferencesRepository) Delete ¶
func (r *PreferencesRepository) Delete(ctx context.Context, id string) error
func (*PreferencesRepository) List ¶
func (r *PreferencesRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
type PreferencesResolveInput ¶ added in v0.11.0
type PreferencesResolveInput struct {
Scope PreferenceScope `json:"scope"`
Keys []string `json:"keys"`
Levels []PreferenceLevel `json:"levels"`
Base map[string]any `json:"base"`
IncludeTraces bool `json:"include_traces"`
IncludeVersion bool `json:"include_version"`
}
PreferencesResolveInput configures preference resolution.
type PreferencesService ¶
type PreferencesService struct {
// contains filtered or unexported fields
}
PreferencesService orchestrates access to the PreferencesStore and applies defaults.
func NewPreferencesService ¶
func NewPreferencesService(store PreferencesStore) *PreferencesService
NewPreferencesService constructs a service with the provided store (or in-memory fallback).
func (*PreferencesService) Clear ¶ added in v0.10.0
func (s *PreferencesService) Clear(ctx context.Context, userID string, keys []string) (UserPreferences, error)
Clear removes stored preference keys for a user.
func (*PreferencesService) DashboardLayout ¶
func (s *PreferencesService) DashboardLayout(ctx context.Context, userID string) []DashboardWidgetInstance
DashboardLayout returns the stored dashboard layout, if any.
func (*PreferencesService) DashboardOverrides ¶
func (s *PreferencesService) DashboardOverrides(ctx context.Context, userID string) DashboardLayoutOverrides
DashboardOverrides returns persisted go-dashboard layout overrides, if any.
func (*PreferencesService) Get ¶
func (s *PreferencesService) Get(ctx context.Context, userID string) (UserPreferences, error)
Get returns preferences for a user with defaults applied.
func (*PreferencesService) Resolve ¶ added in v0.11.0
func (s *PreferencesService) Resolve(ctx context.Context, input PreferencesResolveInput) (PreferenceSnapshot, error)
Resolve returns an effective snapshot for the provided scope and options.
func (*PreferencesService) Save ¶
func (s *PreferencesService) Save(ctx context.Context, userID string, prefs UserPreferences) (UserPreferences, error)
Save updates preferences for a user, merging with existing values.
func (*PreferencesService) SaveDashboardLayout ¶
func (s *PreferencesService) SaveDashboardLayout(ctx context.Context, userID string, layout []DashboardWidgetInstance) (UserPreferences, error)
SaveDashboardLayout stores dashboard layout preferences for a user.
func (*PreferencesService) SaveDashboardOverrides ¶
func (s *PreferencesService) SaveDashboardOverrides(ctx context.Context, userID string, overrides DashboardLayoutOverrides) (UserPreferences, error)
SaveDashboardOverrides stores go-dashboard layout overrides for a user.
func (*PreferencesService) Store ¶
func (s *PreferencesService) Store() PreferencesStore
Store returns the underlying preferences store (useful for adapters).
func (*PreferencesService) ThemeSelectorForUser ¶
func (s *PreferencesService) ThemeSelectorForUser(ctx context.Context, userID string) ThemeSelector
ThemeSelectorForUser builds a ThemeSelector using stored preferences when present.
func (*PreferencesService) WithActivitySink ¶
func (s *PreferencesService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission on preference updates.
func (*PreferencesService) WithDefaults ¶
func (s *PreferencesService) WithDefaults(theme, variant string) *PreferencesService
WithDefaults sets the default theme selection used when user preferences are empty.
func (*PreferencesService) WithStore ¶
func (s *PreferencesService) WithStore(store PreferencesStore) *PreferencesService
WithStore swaps the underlying preferences store.
type PreferencesStore ¶
type PreferencesStore interface {
Resolve(ctx context.Context, input PreferencesResolveInput) (PreferenceSnapshot, error)
Upsert(ctx context.Context, input PreferencesUpsertInput) (PreferenceSnapshot, error)
Delete(ctx context.Context, input PreferencesDeleteInput) error
}
PreferencesStore defines the resolver-based preference contract.
type PreferencesStoreAdapter ¶ added in v0.20.0
type PreferencesStoreAdapter struct {
// contains filtered or unexported fields
}
PreferencesStoreAdapter adapts admin.PreferencesStore into a state.Store.
func NewPreferencesStoreAdapter ¶ added in v0.20.0
func NewPreferencesStoreAdapter(store PreferencesStore, opts ...PreferencesOption) *PreferencesStoreAdapter
NewPreferencesStoreAdapter constructs a new adapter for PreferencesStore.
type PreferencesUpsertInput ¶ added in v0.11.0
type PreferencesUpsertInput struct {
Scope PreferenceScope `json:"scope"`
Level PreferenceLevel `json:"level"`
Values map[string]any `json:"values"`
}
PreferencesUpsertInput represents a scoped preference update.
type PreferencesViewContextBuilder ¶ added in v0.24.0
type PreferencesViewContextBuilder func(adm *Admin, c router.Context, view router.ViewContext, active string) router.ViewContext
PreferencesViewContextBuilder augments the view context for the preferences UI.
type PresentedError ¶ added in v0.116.0
type PresentedError struct {
Category goerrors.Category `json:"category,omitempty"`
Code int `json:"code,omitempty"`
TextCode string `json:"text_code,omitempty"`
Message string `json:"message,omitempty"`
ValidationErrors []goerrors.PublicValidationError `json:"validation_errors,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
RequestID string `json:"request_id,omitempty"`
Timestamp time.Time `json:"timestamp"`
Severity goerrors.Severity `json:"severity,omitempty"`
Location *goerrors.ErrorLocation `json:"location,omitempty"`
StackTrace goerrors.StackTrace `json:"stack_trace,omitempty"`
}
PresentedError contains the fields go-admin deliberately exposes to API clients. Causes and validation values are never included.
type PreviewService ¶ added in v0.22.0
type PreviewService struct {
// contains filtered or unexported fields
}
PreviewService manages generation and validation of preview tokens.
func NewPreviewService ¶ added in v0.22.0
func NewPreviewService(secret string) *PreviewService
NewPreviewService creates a new preview service.
func (*PreviewService) Generate ¶ added in v0.22.0
func (s *PreviewService) Generate(entityType, contentID string, duration time.Duration) (string, error)
Generate creates a signed preview token for a record.
func (*PreviewService) GenerateJWT ¶ added in v0.22.0
func (s *PreviewService) GenerateJWT(entityType, contentID string, duration time.Duration) (string, error)
GenerateJWT creates a JWT-formatted preview token.
func (*PreviewService) Validate ¶ added in v0.22.0
func (s *PreviewService) Validate(tokenString string) (*PreviewToken, error)
Validate parses and verifies a preview token.
type PreviewToken ¶ added in v0.22.0
type PreviewToken struct {
ContentID string `json:"content_id"`
EntityType string `json:"entity_type"`
Expiry int64 `json:"expiry"`
}
PreviewToken carries metadata for content preview.
type ProfileModule ¶
type ProfileModule struct {
// contains filtered or unexported fields
}
ProfileModule registers a user profile panel and navigation entry. Feature-gated via FeatureProfile and backed by ProfileService.
func NewProfileModule ¶
func NewProfileModule() *ProfileModule
NewProfileModule constructs the default profile module.
func (*ProfileModule) Manifest ¶
func (m *ProfileModule) Manifest() ModuleManifest
func (*ProfileModule) MenuItems ¶
func (m *ProfileModule) MenuItems(locale string) []MenuItem
func (*ProfileModule) Register ¶
func (m *ProfileModule) Register(ctx ModuleContext) error
func (*ProfileModule) RouteContract ¶ added in v0.27.0
func (m *ProfileModule) RouteContract() routing.ModuleContract
func (*ProfileModule) WithMenuParent ¶
func (m *ProfileModule) WithMenuParent(parent string) *ProfileModule
WithMenuParent nests the profile navigation under a parent menu item ID.
func (*ProfileModule) WithSkipMenu ¶ added in v0.24.0
func (m *ProfileModule) WithSkipMenu(skip bool) *ProfileModule
WithSkipMenu suppresses navigation menu contribution while keeping panel registration.
type ProfileRepository ¶
type ProfileRepository struct {
// contains filtered or unexported fields
}
ProfileRepository adapts ProfileService to the panel Repository contract.
func NewProfileRepository ¶
func NewProfileRepository(service *ProfileService, defaultLocale string) *ProfileRepository
NewProfileRepository constructs a repository backed by ProfileService.
func (*ProfileRepository) Delete ¶
func (r *ProfileRepository) Delete(ctx context.Context, id string) error
func (*ProfileRepository) List ¶
func (r *ProfileRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
type ProfileService ¶
type ProfileService struct {
// contains filtered or unexported fields
}
ProfileService orchestrates profile retrieval and persistence.
func NewProfileService ¶
func NewProfileService(store ProfileStore) *ProfileService
NewProfileService constructs a service with the provided store (or in-memory fallback).
func (*ProfileService) Get ¶
func (s *ProfileService) Get(ctx context.Context, userID string) (UserProfile, error)
Get returns the profile for a user, applying defaults.
func (*ProfileService) Save ¶
func (s *ProfileService) Save(ctx context.Context, userID string, profile UserProfile) (UserProfile, error)
Save merges and persists a profile for a user.
func (*ProfileService) Store ¶
func (s *ProfileService) Store() ProfileStore
Store exposes the underlying profile store (useful for adapters).
func (*ProfileService) WithActivitySink ¶
func (s *ProfileService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission on profile updates.
func (*ProfileService) WithStore ¶
func (s *ProfileService) WithStore(store ProfileStore) *ProfileService
WithStore swaps the underlying profile store.
type ProfileStore ¶
type ProfileStore interface {
Get(ctx context.Context, userID string) (UserProfile, error)
Save(ctx context.Context, profile UserProfile) (UserProfile, error)
}
ProfileStore persists profile data.
type ProtectedSurfaceScope ¶ added in v0.58.0
type ProtectedSurfaceScope string
const ( ProtectedSurfaceScopeAdmin ProtectedSurfaceScope = "admin" ProtectedSurfaceScopeProtectedApp ProtectedSurfaceScope = "protected_app" )
type QuickActionWidgetPayload ¶ added in v0.25.0
type QuickActionsWidgetPayload ¶ added in v0.25.0
type QuickActionsWidgetPayload struct {
Actions []QuickActionWidgetPayload `json:"actions"`
}
type RPCCommandConfig ¶ added in v0.27.0
type RPCCommandConfig struct {
DiscoveryEnabled bool `json:"discovery_enabled,omitempty"`
PermissionMode RPCCommandPermissionMode `json:"permission_mode,omitempty"`
Commands map[string]RPCCommandRule `json:"commands,omitempty"`
MetadataAllowlist []string `json:"metadata_allowlist,omitempty"`
}
RPCCommandConfig controls command RPC exposure and authorization behavior.
func (RPCCommandConfig) ResolveRule ¶ added in v0.27.0
func (c RPCCommandConfig) ResolveRule(commandName string) (RPCCommandRule, bool)
ResolveRule returns the configured rule for the given command id.
type RPCCommandDispatchRequest ¶ added in v0.27.0
type RPCCommandDispatchRequest = command.CommandDispatchRequest
RPCCommandDispatchRequest is a compatibility alias for the canonical go-command generic dispatch payload.
type RPCCommandDispatchResponse ¶ added in v0.27.0
type RPCCommandDispatchResponse = command.CommandDispatchResponse
RPCCommandDispatchResponse is a compatibility alias for the canonical go-command generic dispatch response.
type RPCCommandListResponse ¶ added in v0.27.0
type RPCCommandListResponse struct {
Commands []string `json:"commands,omitempty"`
}
RPCCommandListResponse describes available command names.
type RPCCommandPermissionMode ¶ added in v0.89.0
type RPCCommandPermissionMode string
RPCCommandPermissionMode selects how RPC command permissions are evaluated.
const ( // RPCCommandPermissionModeResourceRole uses the configured Authorizer's // resource/action semantics. This preserves the historical behavior where // permissions such as admin.posts.publish can authorize through an edit role // on the posts resource. RPCCommandPermissionModeResourceRole RPCCommandPermissionMode = "resource_role" // RPCCommandPermissionModeExact requires the exact permission string to be // present in the authorizer's resolved permission set. RPCCommandPermissionModeExact RPCCommandPermissionMode = "exact" )
type RPCCommandPolicyHook ¶ added in v0.27.0
type RPCCommandPolicyHook func(context.Context, RPCCommandPolicyInput) error
RPCCommandPolicyHook runs host-level business rule checks for allowed RPC commands.
type RPCCommandPolicyInput ¶ added in v0.27.0
type RPCCommandPolicyInput struct {
Method string `json:"method,omitempty"`
CommandName string `json:"command_name,omitempty"`
Payload map[string]any `json:"payload,omitempty"`
IDs []string `json:"ids,omitempty"`
Rule RPCCommandRule `json:"rule"`
Dispatch command.DispatchOptions `json:"dispatch"`
ActorID string `json:"actor_id,omitempty"`
Subject string `json:"subject,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
RequestID string `json:"request_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
RPCCommandPolicyInput contains trusted request data used by host business-rule checks.
type RPCCommandRule ¶ added in v0.27.0
type RPCCommandRule struct {
Permission string `json:"permission,omitempty"`
Resource string `json:"resource,omitempty"`
PermissionMode RPCCommandPermissionMode `json:"permission_mode,omitempty"`
AllowUnauthenticated bool `json:"allow_unauthenticated,omitempty"`
}
RPCCommandRule maps a command id to the permission/resource required for RPC dispatch.
func DefaultTranslationSuggestionRPCCommandRule ¶ added in v0.110.0
func DefaultTranslationSuggestionRPCCommandRule() RPCCommandRule
DefaultTranslationSuggestionRPCCommandRule returns the default RPC exposure rule for translation suggestion generation.
type RateLimiter ¶ added in v0.23.0
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter provides simple rate limiting for schema validation endpoints
func DefaultSchemaRateLimiter ¶ added in v0.23.0
func DefaultSchemaRateLimiter() *RateLimiter
DefaultSchemaRateLimiter returns a rate limiter with default settings (30 requests per minute per client)
func NewRateLimiter ¶ added in v0.23.0
func NewRateLimiter(maxRequests int, window time.Duration) *RateLimiter
NewRateLimiter creates a rate limiter with the specified limits
func (*RateLimiter) Allow ¶ added in v0.23.0
func (r *RateLimiter) Allow(key string) bool
Allow checks if a request from the given key should be allowed
func (*RateLimiter) Cleanup ¶ added in v0.23.0
func (r *RateLimiter) Cleanup()
Cleanup removes expired entries from the rate limiter
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry stores registered panels, modules, dashboard providers, and settings.
func (*Registry) DashboardProviders ¶
func (r *Registry) DashboardProviders() []DashboardProviderSpec
DashboardProviders returns provider specs sorted by code.
func (*Registry) PanelTabs ¶ added in v0.2.0
PanelTabs returns registered tabs for a panel, ordered by position then ID.
func (*Registry) RegisterDashboardProvider ¶
func (r *Registry) RegisterDashboardProvider(spec DashboardProviderSpec)
RegisterDashboardProvider records a provider manifest for discovery/lookups.
func (*Registry) RegisterModule ¶
RegisterModule records a module in registration order; duplicate IDs are rejected.
func (*Registry) RegisterPanel ¶
RegisterPanel stores a panel by name; duplicate names are rejected.
func (*Registry) RegisterPanelTab ¶ added in v0.2.0
RegisterPanelTab records a panel tab for the named panel.
func (*Registry) RegisterSetting ¶
func (r *Registry) RegisterSetting(def SettingDefinition)
RegisterSetting tracks a setting definition for lookups.
func (*Registry) SetPanelTab ¶ added in v0.2.0
SetPanelTab upserts a panel tab for the named panel.
func (*Registry) Settings ¶
func (r *Registry) Settings() []SettingDefinition
Settings returns registered setting definitions sorted by key.
func (*Registry) UnregisterPanel ¶ added in v0.23.0
UnregisterPanel removes a panel by name and clears associated tab registrations.
func (*Registry) UpsertPanel ¶ added in v0.36.0
UpsertPanel stores or replaces a panel by name.
func (*Registry) WithLogger ¶ added in v0.25.0
WithLogger sets the registry logger used for runtime diagnostics.
type Repository ¶
type Repository interface {
List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
Get(ctx context.Context, id string) (map[string]any, error)
Create(ctx context.Context, record map[string]any) (map[string]any, error)
Update(ctx context.Context, id string, record map[string]any) (map[string]any, error)
Delete(ctx context.Context, id string) error
}
Repository provides CRUD operations for panel data.
type RepositoryTranslationCreator ¶ added in v0.25.0
type RepositoryTranslationCreator interface {
CreateTranslation(ctx context.Context, input TranslationCreateInput) (map[string]any, error)
}
RepositoryTranslationCreator allows repositories to provide a first-class translation creation command.
type RequestAuthenticator ¶ added in v0.48.0
RequestAuthenticator performs request authentication without relying on browser-oriented redirect handlers. This is required for transports like WebSocket upgrades where redirects are not a valid auth response.
type RequestEntry ¶ added in v0.14.0
type RequestEntry struct {
ID string `json:"id"`
Timestamp time.Time `json:"timestamp"`
SessionID string `json:"session_id,omitempty"`
UserID string `json:"user_id,omitempty"`
Method string `json:"method"`
Path string `json:"path"`
Status int `json:"status"`
Duration time.Duration `json:"duration"`
Headers map[string]string `json:"headers,omitempty"`
Query map[string]string `json:"query,omitempty"`
ContentType string `json:"content_type,omitempty"`
RequestBody string `json:"request_body,omitempty"`
RequestSize int64 `json:"request_size,omitempty"`
BodyTruncated bool `json:"body_truncated,omitempty"`
ResponseHeaders map[string]string `json:"response_headers,omitempty"`
ResponseBody string `json:"response_body,omitempty"`
ResponseSize int64 `json:"response_size,omitempty"`
RemoteIP string `json:"remote_ip,omitempty"`
Error string `json:"error,omitempty"`
}
RequestEntry captures HTTP request details.
type RequestInfo ¶ added in v0.24.0
type RequestInfo struct {
Method string `json:"method"`
Path string `json:"path"`
FullURL string `json:"full_url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
QueryParams map[string]string `json:"query_params,omitempty"`
FormData map[string]string `json:"form_data,omitempty"`
Body string `json:"body,omitempty"`
ContentType string `json:"content_type,omitempty"`
RemoteIP string `json:"remote_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
}
RequestInfo holds HTTP request details.
type RequiredFieldsValidationStrategy ¶ added in v0.24.0
type RequiredFieldsValidationStrategy = cmsinterfaces.RequiredFieldsValidationStrategy
RequiredFieldsValidationStrategy mirrors go-cms required field validation strategy.
const ( RequiredFieldsValidationError RequiredFieldsValidationStrategy = cmsinterfaces.RequiredFieldsValidationError RequiredFieldsValidationWarn RequiredFieldsValidationStrategy = cmsinterfaces.RequiredFieldsValidationWarn RequiredFieldsValidationIgnore RequiredFieldsValidationStrategy = cmsinterfaces.RequiredFieldsValidationIgnore )
type ResolveOptions ¶ added in v0.82.0
type ResolveOptions = navinternal.ResolveOptions
ResolveOptions controls navigation resolution behavior.
type ResolveResult ¶ added in v0.82.0
type ResolveResult = navinternal.ResolveResult
ResolveResult carries resolved navigation items plus source diagnostics.
type ResolveSource ¶ added in v0.82.0
type ResolveSource = navinternal.ResolveSource
ResolveSource identifies which backing source produced a navigation result.
type ResolvedSetting ¶
type ResolvedSetting struct {
Key string `json:"key"`
Value any `json:"value"`
Scope SettingsScope `json:"scope"`
Provenance string `json:"provenance"`
Definition SettingDefinition `json:"definition"`
}
ResolvedSetting contains a resolved value and provenance.
type ResolverActivityPageEnricherConfig ¶ added in v0.133.0
type ResolverActivityPageEnricherConfig struct {
ActorResolver usersactivity.ActorResolver
ObjectResolver usersactivity.ObjectResolver
HintPolicy ActivityDisplayHintPolicy
ActionLabels map[string]string
}
ResolverActivityPageEnricherConfig wires generic batch resolvers into the Activity page enrichment contract.
type ResultDispatchFactory ¶ added in v0.88.0
type ResultDispatchFactory func(ctx context.Context, payload map[string]any, ids []string, opts command.DispatchOptions) (command.DispatchReceipt, any, error)
ResultDispatchFactory executes a typed dispatch and returns an inline result when available.
type RingBuffer ¶ added in v0.14.0
type RingBuffer[T any] struct { // contains filtered or unexported fields }
RingBuffer stores the most recent values up to a fixed capacity.
func NewRingBuffer ¶ added in v0.14.0
func NewRingBuffer[T any](capacity int) *RingBuffer[T]
NewRingBuffer creates a ring buffer with the provided capacity.
func (*RingBuffer[T]) Add ¶ added in v0.14.0
func (r *RingBuffer[T]) Add(value T)
Add appends a value, overwriting the oldest when full.
func (*RingBuffer[T]) Cap ¶ added in v0.14.0
func (r *RingBuffer[T]) Cap() int
Cap returns the buffer capacity.
func (*RingBuffer[T]) Clear ¶ added in v0.14.0
func (r *RingBuffer[T]) Clear()
Clear removes all buffered values.
func (*RingBuffer[T]) Len ¶ added in v0.14.0
func (r *RingBuffer[T]) Len() int
Len returns the current number of stored values.
func (*RingBuffer[T]) Values ¶ added in v0.14.0
func (r *RingBuffer[T]) Values() []T
Values returns the buffered values ordered from oldest to newest.
type RoleAssignmentLookup ¶ added in v0.2.0
type RoleAssignmentLookup interface {
IsAssignable(ctx context.Context, roleID string) (bool, error)
}
RoleAssignmentLookup decides whether a role ID should be treated as an assignable custom role.
type RolePanelRepository ¶
type RolePanelRepository = genericPanelRepository[RoleRecord]
RolePanelRepository adapts roles to the panel Repository contract.
func NewRolePanelRepository ¶
func NewRolePanelRepository(service *UserManagementService) *RolePanelRepository
NewRolePanelRepository constructs a repository backed by UserManagementService roles.
type RoleRecord ¶
type RoleRecord struct {
ID string `json:"id"`
Name string `json:"name"`
RoleKey string `json:"role_key"`
Description string `json:"description"`
Permissions []string `json:"permissions"`
Metadata map[string]any `json:"metadata"`
IsSystem bool `json:"is_system"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
RoleRecord captures custom roles and their permissions.
type RoleRepository ¶
type RoleRepository interface {
List(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
Get(ctx context.Context, id string) (RoleRecord, error)
Create(ctx context.Context, role RoleRecord) (RoleRecord, error)
Update(ctx context.Context, role RoleRecord) (RoleRecord, error)
Delete(ctx context.Context, id string) error
Assign(ctx context.Context, userID, roleID string) error
Unassign(ctx context.Context, userID, roleID string) error
RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
}
RoleRepository exposes CRUD and assignment helpers for custom roles.
type RoleRepositoryLookup ¶ added in v0.2.0
type RoleRepositoryLookup struct {
Roles RoleRepository `json:"roles"`
}
RoleRepositoryLookup uses a RoleRepository to validate assignable IDs.
func (RoleRepositoryLookup) IsAssignable ¶ added in v0.2.0
type RoleWorkflowAuthorizer ¶ added in v0.24.0
type RoleWorkflowAuthorizer struct {
MinRole string `json:"min_role"`
Resource string `json:"resource"`
Permission string `json:"permission"`
Extra func(context.Context, WorkflowApplyEventRequest) bool `json:"extra"`
}
RoleWorkflowAuthorizer enforces minimum role requirements and optional permission checks.
func (*RoleWorkflowAuthorizer) CanApplyEvent ¶ added in v0.26.0
func (a *RoleWorkflowAuthorizer) CanApplyEvent(ctx context.Context, input WorkflowApplyEventRequest) bool
CanApplyEvent validates the workflow transition against role + optional permission checks.
type RoleWorkflowAuthorizerOption ¶ added in v0.24.0
type RoleWorkflowAuthorizerOption func(*RoleWorkflowAuthorizer)
RoleWorkflowAuthorizerOption customizes a RoleWorkflowAuthorizer.
func WithWorkflowExtraCheck ¶ added in v0.24.0
func WithWorkflowExtraCheck(fn func(context.Context, WorkflowApplyEventRequest) bool) RoleWorkflowAuthorizerOption
WithWorkflowExtraCheck adds an extra custom check for workflow transitions.
func WithWorkflowPermission ¶ added in v0.24.0
func WithWorkflowPermission(resource, permission string) RoleWorkflowAuthorizerOption
WithWorkflowPermission adds a permission check using authlib.Can.
type RouteContractProvider ¶ added in v0.27.0
type RouteContractProvider interface {
RouteContract() routing.ModuleContract
}
RouteContractProvider exposes the explicit routing contract required for mounted modules.
type RouteEntry ¶ added in v0.14.0
type RouteEntry struct {
Method string `json:"method"`
Path string `json:"path"`
Name string `json:"name,omitempty"`
Handler string `json:"handler,omitempty"`
Middleware []string `json:"middleware,omitempty"`
Summary string `json:"summary,omitempty"`
Tags []string `json:"tags,omitempty"`
}
RouteEntry captures router information for the routes panel.
type RouterContext ¶
type SQLEntry ¶ added in v0.14.0
type SQLEntry struct {
ID string `json:"id"`
Timestamp time.Time `json:"timestamp"`
SessionID string `json:"session_id,omitempty"`
UserID string `json:"user_id,omitempty"`
Query string `json:"query"`
Args []any `json:"args,omitempty"`
Duration time.Duration `json:"duration"`
RowCount int `json:"row_count"`
Error string `json:"error,omitempty"`
}
SQLEntry captures database query details.
type Schema ¶
type Schema struct {
ListFields []Field `json:"list_fields"`
FormFields []Field `json:"form_fields"`
DetailFields []Field `json:"detail_fields"`
Filters []Filter `json:"filters,omitempty"`
Actions []Action `json:"actions,omitempty"`
BulkActions []Action `json:"bulk_actions,omitempty"`
BulkActionStateConfig *BulkActionStateConfig `json:"bulk_action_state_config,omitempty"`
Subresources []PanelSubresource `json:"subresources,omitempty"`
Tabs []PanelTab `json:"tabs,omitempty"`
FormSchema map[string]any `json:"form_schema,omitempty"`
UseBlocks bool `json:"use_blocks,omitempty"`
UseSEO bool `json:"use_seo,omitempty"`
TreeView bool `json:"tree_view,omitempty"`
Permissions PanelPermissions `json:"permissions"`
Theme map[string]map[string]string `json:"theme,omitempty"`
Export *ExportConfig `json:"export,omitempty"`
Bulk *BulkConfig `json:"bulk,omitempty"`
Media *MediaConfig `json:"media,omitempty"`
}
Schema renders list/form/detail schema descriptions.
type SchemaGuardrails ¶ added in v0.23.0
type SchemaGuardrails struct {
MaxSizeBytes int `json:"max_size_bytes"`
MaxFields int `json:"max_fields"`
MaxDepth int `json:"max_depth"`
UISchemaMaxSizeBytes int `json:"ui_schema_max_size_bytes"`
PreviewHTMLMaxSizeBytes int `json:"preview_html_max_size_bytes"`
ReservedFields map[string]bool `json:"reserved_fields"`
}
SchemaGuardrails provides validation and security checks for content type schemas
func NewSchemaGuardrails ¶ added in v0.23.0
func NewSchemaGuardrails() *SchemaGuardrails
NewSchemaGuardrails creates guardrails with default limits
func (*SchemaGuardrails) IsReservedFieldName ¶ added in v0.23.0
func (g *SchemaGuardrails) IsReservedFieldName(name string) bool
IsReservedFieldName checks if a field name is reserved
func (*SchemaGuardrails) ValidatePreviewHTML ¶ added in v0.23.0
func (g *SchemaGuardrails) ValidatePreviewHTML(html []byte) error
ValidatePreviewHTML checks generated HTML size limits
func (*SchemaGuardrails) ValidateSchema ¶ added in v0.23.0
func (g *SchemaGuardrails) ValidateSchema(schema map[string]any) (*SchemaValidationResult, error)
ValidateSchema performs comprehensive schema validation
func (*SchemaGuardrails) ValidateUISchema ¶ added in v0.23.0
func (g *SchemaGuardrails) ValidateUISchema(uiSchema map[string]any, jsonSchema map[string]any) error
ValidateUISchema validates UI schema overlay format and JSON Pointer targets
type SchemaGuardrailsOption ¶ added in v0.23.0
type SchemaGuardrailsOption func(*SchemaGuardrails)
SchemaGuardrailsOption configures guardrails
func WithSchemaMaxDepth ¶ added in v0.23.0
func WithSchemaMaxDepth(depth int) SchemaGuardrailsOption
WithSchemaMaxDepth sets the maximum nesting depth
func WithSchemaMaxFields ¶ added in v0.23.0
func WithSchemaMaxFields(count int) SchemaGuardrailsOption
WithSchemaMaxFields sets the maximum number of fields
func WithSchemaMaxSize ¶ added in v0.23.0
func WithSchemaMaxSize(bytes int) SchemaGuardrailsOption
WithSchemaMaxSize sets the maximum schema size in bytes
type SchemaPreviewFallback ¶ added in v0.24.0
type SchemaPreviewFallback func(ctx AdminContext, schema map[string]any, opts SchemaValidationOptions, err error) (html string, handled bool)
SchemaPreviewFallback renders preview HTML when preview generation fails.
type SchemaPreviewer ¶ added in v0.23.0
type SchemaPreviewer interface {
Preview(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) ([]byte, error)
}
SchemaPreviewer renders preview output for a schema.
type SchemaRegistryEntry ¶ added in v0.23.0
type SchemaRegistryEntry struct {
Resource string `json:"resource"`
Plural string `json:"plural,omitempty"`
SchemaFormat string `json:"schema_format"`
Document map[string]any `json:"document"`
UpdatedAt time.Time `json:"updated_at"`
}
SchemaRegistryEntry captures a projected schema document from the registry.
type SchemaRegistryPayload ¶ added in v0.23.0
type SchemaRegistryPayload struct {
Schemas []SchemaRegistryEntry `json:"schemas"`
}
SchemaRegistryPayload wraps schema registry entries for UI consumption.
type SchemaToFieldsConverter ¶ added in v0.23.0
type SchemaToFieldsConverter struct {
// contains filtered or unexported fields
}
SchemaToFieldsConverter maps JSON Schema properties into panel field definitions.
func NewSchemaToFieldsConverter ¶ added in v0.23.0
func NewSchemaToFieldsConverter() *SchemaToFieldsConverter
NewSchemaToFieldsConverter builds a converter with default mappings.
func (*SchemaToFieldsConverter) Convert ¶ added in v0.23.0
func (c *SchemaToFieldsConverter) Convert(schema map[string]any, uiSchema map[string]any) ConvertedFields
Convert maps a JSON schema + UI overlay into panel fields.
type SchemaValidationOptions ¶ added in v0.23.0
type SchemaValidationOptions struct {
Slug string `json:"slug"`
FormID string `json:"form_id"`
UISchema map[string]any `json:"ui_schema"`
}
SchemaValidationOptions captures schema validation/preview context.
type SchemaValidationResult ¶ added in v0.23.0
type SchemaValidationResult struct {
Valid bool `json:"valid"`
FieldCount int `json:"field_count,omitempty"`
MaxDepth int `json:"max_depth,omitempty"`
SizeBytes int `json:"size_bytes,omitempty"`
Errors map[string]string `json:"errors,omitempty"`
}
SchemaValidationResult holds validation results
type SchemaValidator ¶ added in v0.23.0
type SchemaValidator interface {
Validate(ctx context.Context, schema map[string]any, opts SchemaValidationOptions) error
}
SchemaValidator validates JSON schema input for content types.
type ScopeInput ¶ added in v0.83.0
ScopeInput carries trusted scope values supplied by a service path.
type ScopePolicy ¶ added in v0.83.0
type ScopePolicy struct {
Mode ScopePolicyMode `json:"mode"`
DefaultTenantID string `json:"default_tenant_id"`
DefaultOrgID string `json:"default_org_id"`
}
ScopePolicy captures the go-admin tenant/org scope policy.
type ScopePolicyMode ¶ added in v0.83.0
type ScopePolicyMode string
ScopePolicyMode controls how effective tenant/org scope is resolved.
const ( ScopePolicySingle ScopePolicyMode = "single" ScopePolicyMulti ScopePolicyMode = "multi" )
type SearchAdapter ¶
type SearchAdapter interface {
Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
Permission() string
}
SearchAdapter performs a search for a specific entity type.
type SearchCount ¶ added in v0.117.0
type SearchCount struct {
Value int `json:"value"`
Accuracy SearchCountAccuracy `json:"accuracy"`
Diagnostic string `json:"diagnostic,omitempty"`
}
type SearchCountAccuracy ¶ added in v0.117.0
type SearchCountAccuracy string
const ( SearchCountAccuracyExact SearchCountAccuracy = "exact" SearchCountAccuracyLowerBound SearchCountAccuracy = "lower_bound" SearchCountAccuracyApproximate SearchCountAccuracy = "approximate" )
type SearchEngine ¶
type SearchEngine struct {
// contains filtered or unexported fields
}
SearchEngine aggregates adapters and executes queries across them.
func NewSearchEngine ¶
func NewSearchEngine(authorizer Authorizer) *SearchEngine
NewSearchEngine constructs a search engine.
func (*SearchEngine) Enable ¶
func (s *SearchEngine) Enable(enabled bool)
Enable toggles whether search is available.
func (*SearchEngine) Query ¶
func (s *SearchEngine) Query(ctx AdminContext, query string, limit int) ([]SearchResult, error)
Query searches all adapters respecting permissions.
func (*SearchEngine) Register ¶
func (s *SearchEngine) Register(key string, adapter SearchAdapter)
Register registers a search adapter under a key.
func (*SearchEngine) SetPrimary ¶ added in v0.27.0
func (s *SearchEngine) SetPrimary(adapter SearchAdapter)
SetPrimary installs the canonical search adapter. When configured, Query routes all requests through the primary adapter instead of fanout across the legacy registry.
func (*SearchEngine) Unregister ¶ added in v0.36.0
func (s *SearchEngine) Unregister(key string)
Unregister removes a search adapter by key.
type SearchEvidence ¶ added in v0.117.0
type SearchEvidence struct {
Exact bool `json:"exact"`
Status SearchEvidenceStatus `json:"status,omitempty"`
Locations []SearchEvidenceLocation `json:"locations"`
Diagnostic string `json:"diagnostic,omitempty"`
}
type SearchEvidenceLocation ¶ added in v0.117.0
type SearchEvidenceLocation struct {
Location string `json:"location"`
Count int `json:"count"`
Samples []SearchEvidenceSample `json:"samples,omitempty"`
}
type SearchEvidenceSample ¶ added in v0.117.0
type SearchEvidenceSnippet ¶ added in v0.117.0
type SearchEvidenceStatus ¶ added in v0.117.0
type SearchEvidenceStatus string
const ( SearchEvidenceStatusComplete SearchEvidenceStatus = "complete" SearchEvidenceStatusPartial SearchEvidenceStatus = "partial" SearchEvidenceStatusUnsupported SearchEvidenceStatus = "unsupported" )
type SearchFacet ¶ added in v0.26.0
type SearchFacet struct {
Name string `json:"name"`
Kind string `json:"kind,omitempty"`
Disjunctive bool `json:"disjunctive,omitempty"`
Buckets []SearchFacetTerm `json:"buckets,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
SearchFacet describes one facet dimension and value buckets.
type SearchFacetTerm ¶ added in v0.26.0
type SearchFacetTerm struct {
Value string `json:"value"`
Label string `json:"label,omitempty"`
Count int `json:"count"`
Selected bool `json:"selected,omitempty"`
Path []string `json:"path,omitempty"`
Level int `json:"level,omitempty"`
ParentValue string `json:"parent_value,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
SearchFacetTerm describes one facet value bucket.
type SearchHit ¶ added in v0.26.0
type SearchHit struct {
ID string `json:"id"`
Type string `json:"type,omitempty"`
Title string `json:"title,omitempty"`
Summary string `json:"summary,omitempty"`
URL string `json:"url,omitempty"`
Locale string `json:"locale,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
Score float64 `json:"score,omitempty"`
Fields map[string]any `json:"fields,omitempty"`
Snippet string `json:"snippet,omitempty"`
Highlighted string `json:"highlighted,omitempty"`
ParentID string `json:"parent_id,omitempty"`
ParentTitle string `json:"parent_title,omitempty"`
ParentURL string `json:"parent_url,omitempty"`
ParentThumbnail string `json:"parent_thumbnail,omitempty"`
ParentSummary string `json:"parent_summary,omitempty"`
Anchor any `json:"anchor,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Evidence *SearchEvidence `json:"match_evidence,omitempty"`
}
SearchHit represents one normalized search document hit.
type SearchProvider ¶ added in v0.26.0
type SearchProvider interface {
Search(ctx context.Context, req SearchRequest) (SearchResultPage, error)
Suggest(ctx context.Context, req SuggestRequest) (SuggestResult, error)
}
SearchProvider defines the minimal site-search integration contract.
type SearchRange ¶ added in v0.27.0
type SearchRange struct {
Field string `json:"field"`
GTE any `json:"gte,omitempty"`
LTE any `json:"lte,omitempty"`
}
SearchRange describes one provider-neutral range constraint.
type SearchRequest ¶ added in v0.26.0
type SearchRequest struct {
Query string `json:"q"`
Locale string `json:"locale,omitempty"`
Page int `json:"page,omitempty"`
PerPage int `json:"per_page,omitempty"`
Sort string `json:"sort,omitempty"`
Filters map[string][]string `json:"filters,omitempty"`
Ranges []SearchRange `json:"ranges,omitempty"`
Actor any `json:"actor,omitempty"`
Request any `json:"request,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Variant SearchVariant `json:"variant,omitempty"`
MaxCandidates int `json:"max_candidates,omitempty"`
}
SearchRequest is a backend-agnostic site search request envelope.
type SearchResult ¶
type SearchResult struct {
Type string `json:"type"`
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
URL string `json:"url,omitempty"`
Icon string `json:"icon,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
}
SearchResult represents a single search hit.
type SearchResultPage ¶ added in v0.26.0
type SearchResultPage struct {
Hits []SearchHit `json:"hits"`
Facets []SearchFacet `json:"facets,omitempty"`
Page int `json:"page"`
PerPage int `json:"per_page"`
Total int `json:"total"`
TotalAccuracy SearchTotalAccuracy `json:"total_accuracy,omitempty"`
Counts map[string]SearchCount `json:"counts,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
SearchResultPage captures paginated search hits plus facets.
type SearchTotalAccuracy ¶ added in v0.117.0
type SearchTotalAccuracy string
const ( SearchTotalAccuracyExact SearchTotalAccuracy = "exact" SearchTotalAccuracyLowerBound SearchTotalAccuracy = "lower_bound" SearchTotalAccuracyApproximate SearchTotalAccuracy = "approximate" )
type SearchVariant ¶ added in v0.117.0
type SearchVariant string
SearchVariant is an application-defined product variant. It is intentionally distinct from provider retrieval modes such as lexical or semantic search.
type SettingDefinition ¶
type SettingDefinition struct {
Key string `json:"key"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Default any `json:"default,omitempty"`
Type string `json:"type,omitempty"`
Group string `json:"group,omitempty"`
AllowedScopes []SettingsScope `json:"allowed_scopes,omitempty"`
Enum []any `json:"enum,omitempty"`
Widget string `json:"widget,omitempty"`
VisibilityRule string `json:"visibility_rule,omitempty"`
Options []SettingOption `json:"options,omitempty"`
OptionsProvider SettingOptionsProvider `json:"-"`
Enrichers []SettingFieldEnricher `json:"-"`
Validator SettingValidator `json:"-"`
}
SettingDefinition describes a single setting and its defaults.
type SettingFieldEnricher ¶
SettingFieldEnricher can mutate the schema payload for a definition.
type SettingOption ¶
type SettingOption struct {
Label string `json:"label,omitempty"`
Value any `json:"value"`
Description string `json:"description,omitempty"`
}
SettingOption represents an allowed value for select-like controls.
type SettingOptionsProvider ¶
type SettingOptionsProvider func(ctx context.Context) ([]SettingOption, error)
SettingOptionsProvider dynamically resolves options for a definition.
type SettingOverviewValuePayload ¶ added in v0.25.0
type SettingRecord ¶
type SettingRecord struct {
bun.BaseModel `bun:"table:admin_settings"`
ID uuid.UUID `bun:",pk,type:uuid" json:"id"`
Key string `bun:",notnull,unique:admin_settings_scope" json:"key"`
Scope string `bun:",notnull,unique:admin_settings_scope" json:"scope"`
UserID string `bun:",nullzero,unique:admin_settings_scope" json:"user_id"`
Value json.RawMessage `bun:"type:jsonb,nullzero" json:"value"`
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp" json:"created_at"`
UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp" json:"updated_at"`
}
type SettingValidator ¶
SettingValidator applies custom validation logic for a definition.
type SettingsAdapter ¶
type SettingsAdapter interface {
RegisterDefinition(def SettingDefinition)
Definitions() []SettingDefinition
Apply(ctx context.Context, bundle SettingsBundle) error
Resolve(key, userID string) ResolvedSetting
ResolveAll(userID string) map[string]ResolvedSetting
Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
WithSchemaOptions(opts ...opts.Option)
}
SettingsAdapter allows the settings service to delegate persistence and resolution.
type SettingsBundle ¶
type SettingsBundle struct {
Scope SettingsScope `json:"scope"`
UserID string `json:"user_id"`
Values map[string]any `json:"values"`
}
SettingsBundle captures a bulk mutation request.
type SettingsForm ¶
type SettingsForm struct {
Schema map[string]any `json:"schema"`
SchemaFormat opts.SchemaFormat `json:"schema_format,omitempty"`
Scopes []opts.SchemaScope `json:"scopes,omitempty"`
Values map[string]ResolvedSetting `json:"values"`
Theme map[string]map[string]string `json:"theme,omitempty"`
}
SettingsForm bundles schema, values, and theme for rendering.
type SettingsFormAdapter ¶
type SettingsFormAdapter struct {
// contains filtered or unexported fields
}
SettingsFormAdapter maps definitions to a form-like payload with theme tokens.
func NewSettingsFormAdapter ¶
func NewSettingsFormAdapter(service *SettingsService, theme string, tokens map[string]string) *SettingsFormAdapter
NewSettingsFormAdapter constructs a form adapter for settings.
func (*SettingsFormAdapter) Form ¶
func (a *SettingsFormAdapter) Form(userID string) SettingsForm
Form returns a schema/value payload suitable for feeding form renderers.
func (*SettingsFormAdapter) FormWithContext ¶
func (a *SettingsFormAdapter) FormWithContext(ctx context.Context, userID string) SettingsForm
FormWithContext is context-aware to allow theme providers to resolve per-request.
func (*SettingsFormAdapter) WithThemeResolver ¶
func (a *SettingsFormAdapter) WithThemeResolver(resolver func(ctx context.Context) *ThemeSelection) *SettingsFormAdapter
WithThemeResolver injects a resolver that can fetch the current theme selection.
type SettingsOverviewWidgetPayload ¶ added in v0.25.0
type SettingsOverviewWidgetPayload struct {
Values map[string]SettingOverviewValuePayload `json:"values"`
}
type SettingsScope ¶
type SettingsScope string
SettingsScope represents the provenance of a setting value.
const ( SettingsScopeSystem SettingsScope = "system" SettingsScopeSite SettingsScope = "site" SettingsScopeUser SettingsScope = "user" SettingsScopeDefault SettingsScope = "default" )
type SettingsService ¶
type SettingsService struct {
// contains filtered or unexported fields
}
SettingsService stores definitions and layered values (system/site/user).
func NewSettingsService ¶
func NewSettingsService() *SettingsService
NewSettingsService constructs an empty settings service.
func (*SettingsService) Apply ¶
func (s *SettingsService) Apply(ctx context.Context, bundle SettingsBundle) error
Apply validates and persists a bundle of settings.
func (*SettingsService) Definitions ¶
func (s *SettingsService) Definitions() []SettingDefinition
Definitions returns all registered definitions sorted by key.
func (*SettingsService) Enable ¶
func (s *SettingsService) Enable(enabled bool)
Enable toggles whether settings are available.
func (*SettingsService) RegisterDefinition ¶
func (s *SettingsService) RegisterDefinition(def SettingDefinition)
RegisterDefinition adds or updates a definition.
func (*SettingsService) Resolve ¶
func (s *SettingsService) Resolve(key, userID string) ResolvedSetting
Resolve returns a setting value with provenance.
func (*SettingsService) ResolveAll ¶
func (s *SettingsService) ResolveAll(userID string) map[string]ResolvedSetting
ResolveAll returns all settings with provenance.
func (*SettingsService) Schema ¶
func (s *SettingsService) Schema(ctx context.Context, userID string) (opts.SchemaDocument, error)
Schema returns the go-options schema document for the current settings stack.
func (*SettingsService) UseAdapter ¶
func (s *SettingsService) UseAdapter(adapter SettingsAdapter)
UseAdapter delegates settings persistence and resolution to an external adapter.
func (*SettingsService) WithActivitySink ¶
func (s *SettingsService) WithActivitySink(sink ActivitySink)
WithActivitySink wires a shared activity sink for settings mutations.
func (*SettingsService) WithRegistry ¶
func (s *SettingsService) WithRegistry(reg *Registry)
WithRegistry wires the shared registry so definitions are discoverable.
func (*SettingsService) WithSchemaOptions ¶
func (s *SettingsService) WithSchemaOptions(opts ...opts.Option)
WithSchemaOptions appends options used when generating schemas from go-options.
type SettingsUpdateCommand ¶
type SettingsUpdateCommand struct {
Service *SettingsService `json:"service"`
Permission string `json:"permission"`
}
SettingsUpdateCommand wraps settings mutations in a go-command handler.
func (*SettingsUpdateCommand) CLIHandler ¶ added in v0.12.0
func (c *SettingsUpdateCommand) CLIHandler() any
CLIOptions exposes CLI metadata for the update command.
func (*SettingsUpdateCommand) CLIOptions ¶
func (c *SettingsUpdateCommand) CLIOptions() command.CLIConfig
CLIOptions exposes CLI metadata for the update command.
func (*SettingsUpdateCommand) Execute ¶
func (c *SettingsUpdateCommand) Execute(ctx context.Context, msg SettingsUpdateMsg) error
Execute applies the bundle found in the message.
type SettingsUpdateMsg ¶ added in v0.12.0
type SettingsUpdateMsg struct {
Bundle SettingsBundle `json:"bundle"`
}
SettingsUpdateMsg updates settings via the command bus.
func (SettingsUpdateMsg) Type ¶ added in v0.12.0
func (SettingsUpdateMsg) Type() string
func (SettingsUpdateMsg) Validate ¶ added in v0.12.0
func (m SettingsUpdateMsg) Validate() error
type SettingsValidationErrors ¶
type SettingsValidationErrors struct {
Fields map[string]string `json:"fields"`
Scope SettingsScope `json:"scope,omitempty"`
}
SettingsValidationErrors aggregates field-level validation issues.
func (SettingsValidationErrors) Error ¶
func (e SettingsValidationErrors) Error() string
type SidebarCollapsePlacement ¶ added in v0.126.3
type SidebarCollapsePlacement string
SidebarCollapsePlacement controls where the desktop collapse action renders. The empty value normalizes to the legacy header placement.
const ( SidebarCollapsePlacementHeader SidebarCollapsePlacement = "header" )
func NormalizeSidebarCollapsePlacement ¶ added in v0.126.3
func NormalizeSidebarCollapsePlacement(value SidebarCollapsePlacement) SidebarCollapsePlacement
NormalizeSidebarCollapsePlacement returns a supported sidebar collapse placement while preserving the legacy header behavior for empty/unknown input.
type SignedTokenStrategy ¶ added in v0.16.0
type SignedTokenStrategy struct {
Secret []byte `json:"secret"`
Audience string `json:"audience"`
Issuer string `json:"issuer"`
}
SignedTokenStrategy allows overrides when a signed token validates.
func (SignedTokenStrategy) Allows ¶ added in v0.16.0
func (s SignedTokenStrategy) Allows(_ context.Context, req DebugREPLRequest) (bool, error)
type SiteAPIClient ¶ added in v0.26.0
type SiteAPIClient interface {
ContentList(ctx context.Context, contentType string, query SiteQuery) (*SiteContentListResponse, error)
ContentDetail(ctx context.Context, contentType, slug string, query SiteQuery) (*SiteContentDetailResponse, error)
MenuByLocation(ctx context.Context, location string, query SiteQuery) (*SiteMenuResponse, error)
MenuByCode(ctx context.Context, code string, query SiteQuery) (*SiteMenuResponse, error)
}
SiteAPIClient defines typed client methods for normalized site endpoints.
type SiteAPIError ¶ added in v0.26.0
type SiteAPIError struct {
Code int `json:"code,omitempty"`
TextCode string `json:"text_code,omitempty"`
Message string `json:"message,omitempty"`
Category string `json:"category,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
SiteAPIError mirrors machine-readable error payloads consumed by clients.
type SiteAPIErrorResponse ¶ added in v0.26.0
type SiteAPIErrorResponse struct {
Error SiteAPIError `json:"error"`
}
SiteAPIErrorResponse wraps SiteAPIError payloads.
type SiteConfig ¶ added in v0.26.0
type SiteConfig struct {
// AllowLocaleFallback controls missing translation fallback behavior for site APIs.
// Nil defaults to true.
AllowLocaleFallback *bool `json:"allow_locale_fallback"`
// AllowUnauthenticatedReads explicitly opts into anonymous public-site reads.
// Leave false to require an authenticated actor for the public API surface.
AllowUnauthenticatedReads bool `json:"allow_unauthenticated_reads,omitempty"`
// Protected forces authenticated site reads even when anonymous reads would
// otherwise be allowed by configuration.
Protected bool `json:"protected"`
// ReadPermission guards authenticated site endpoint reads.
ReadPermission string `json:"read_permission"`
// DraftReadPermission optionally guards include_drafts access.
DraftReadPermission string `json:"draft_read_permission"`
// TrustPrivateNetworkDraftReads allows include_drafts reads from private/loopback
// network origins without actor permission checks. Disabled by default to avoid
// network-topology-based authorization.
TrustPrivateNetworkDraftReads bool `json:"trust_private_network_draft_reads"`
// ViewProfileOverridePermission optionally guards view_profile overrides.
ViewProfileOverridePermission string `json:"view_profile_override_permission"`
}
SiteConfig controls public site API behavior exposed by go-admin.
type SiteContentDetailResponse ¶ added in v0.26.0
type SiteContentDetailResponse struct {
Data map[string]any `json:"data"`
Meta SiteResponseMeta `json:"meta"`
}
SiteContentDetailResponse is the normalized detail response for site content routes.
type SiteContentListResponse ¶ added in v0.26.0
type SiteContentListResponse struct {
Data []map[string]any `json:"data"`
Meta SiteResponseMeta `json:"meta"`
}
SiteContentListResponse is the normalized list response for site content routes.
type SiteMenuReadOptions ¶ added in v0.26.0
type SiteMenuReadOptions struct {
Locale string `json:"locale,omitempty"`
IncludeDrafts bool `json:"include_drafts,omitempty"`
IncludeContributions bool `json:"include_contributions,omitempty"`
PreviewToken string `json:"preview_token,omitempty"`
ViewProfile string `json:"view_profile,omitempty"`
}
SiteMenuReadOptions captures menu-specific query options.
type SiteMenuResponse ¶ added in v0.26.0
type SiteMenuResponse struct {
Data *Menu `json:"data"`
Meta SiteResponseMeta `json:"meta"`
}
SiteMenuResponse is the normalized response for site menu routes.
type SiteQuery ¶ added in v0.26.0
type SiteQuery struct {
Locale string `json:"locale,omitempty"`
Page int `json:"page,omitempty"`
PerPage int `json:"per_page,omitempty"`
Sort string `json:"sort,omitempty"`
SortDesc bool `json:"sort_desc,omitempty"`
Fields []string `json:"fields,omitempty"`
Filters map[string][]string `json:"filters,omitempty"`
Q string `json:"q,omitempty"`
IncludeDrafts bool `json:"include_drafts,omitempty"`
IncludeContributions bool `json:"include_contributions,omitempty"`
PreviewToken string `json:"preview_token,omitempty"`
ViewProfile string `json:"view_profile,omitempty"`
}
SiteQuery defines normalized site endpoint query parameters.
type SiteResponseMeta ¶ added in v0.26.0
type SiteResponseMeta struct {
RequestedLocale string `json:"requested_locale,omitempty"`
ResolvedLocale string `json:"resolved_locale,omitempty"`
Page int `json:"page,omitempty"`
PerPage int `json:"per_page,omitempty"`
Total int `json:"total,omitempty"`
Query SiteQuery `json:"query"`
}
SiteResponseMeta provides stable response metadata for site endpoints.
type SiteTranslationMissingDetails ¶ added in v0.26.0
type SiteTranslationMissingDetails struct {
RequestedLocale string `json:"requested_locale,omitempty"`
AvailableLocales []string `json:"available_locales,omitempty"`
ContentType string `json:"content_type,omitempty"`
Slug string `json:"slug,omitempty"`
}
SiteTranslationMissingDetails exposes structured metadata for translation_missing errors.
type SiteURLResolver ¶ added in v0.26.0
type SiteURLResolver interface {
ContentPath(contentType, slug string) string
ContentURL(contentType, slug string) string
NormalizePath(path, fallback string) string
}
SiteURLResolver resolves canonical site paths and URLs used by delivery/search integrations.
type SourceContext ¶ added in v0.24.0
type SourceContext struct {
File string `json:"file"`
Line int `json:"line"`
StartLine int `json:"start_line"`
Lines []SourceLine `json:"lines"`
Function string `json:"function,omitempty"`
Language string `json:"language,omitempty"`
Snippet string `json:"snippet,omitempty"`
RelPath string `json:"rel_path,omitempty"`
IsAppCode bool `json:"is_app_code"`
CanOpenIDE bool `json:"can_open_ide"`
}
SourceContext holds source code lines around an error location.
func ExtractSourceContext ¶ added in v0.24.0
func ExtractSourceContext(filePath string, errorLine, contextLines int) *SourceContext
ExtractSourceContext reads source code around the given file and line. contextLines specifies how many lines to show before and after the error line.
type SourceLine ¶ added in v0.24.0
type SourceLine struct {
Number int `json:"number"`
Content string `json:"content"`
IsError bool `json:"is_error"`
IsContext bool `json:"is_context"`
}
SourceLine represents a single line of source code.
type StackFrameInfo ¶ added in v0.24.0
type StackFrameInfo struct {
File string `json:"file"`
Line int `json:"line"`
Function string `json:"function"`
Package string `json:"package,omitempty"`
IsAppCode bool `json:"is_app_code"`
IsExpanded bool `json:"is_expanded"`
Source *SourceContext `json:"source,omitempty"`
IDELink string `json:"ide_link,omitempty"`
}
StackFrameInfo holds enriched stack frame data.
func EnrichStackFrames ¶ added in v0.24.0
func EnrichStackFrames(frames []StackFrameInfo, contextLines int, maxFrames int) []StackFrameInfo
EnrichStackFrames adds source context to stack frames.
func EnrichStackFramesWithConfig ¶ added in v0.73.0
func EnrichStackFramesWithConfig(frames []StackFrameInfo, cfg ErrorConfig) []StackFrameInfo
type StaticKeyStrategy ¶ added in v0.16.0
StaticKeyStrategy allows overrides when a shared key matches.
func (StaticKeyStrategy) Allows ¶ added in v0.16.0
func (s StaticKeyStrategy) Allows(_ context.Context, req DebugREPLRequest) (bool, error)
type SuggestRequest ¶ added in v0.26.0
type SuggestRequest struct {
Query string `json:"q"`
Locale string `json:"locale,omitempty"`
Limit int `json:"limit,omitempty"`
Filters map[string][]string `json:"filters,omitempty"`
Actor any `json:"actor,omitempty"`
Request any `json:"request,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Variant SearchVariant `json:"variant,omitempty"`
}
SuggestRequest is a backend-agnostic suggest request envelope.
type SuggestResult ¶ added in v0.26.0
type SuggestResult struct {
Suggestions []string `json:"suggestions"`
Metadata map[string]any `json:"metadata,omitempty"`
}
SuggestResult captures typeahead suggestions with optional metadata.
type SyncTransportAdapter ¶ added in v0.27.0
type SyncTransportAdapter struct {
ScopeDefaults AuthenticatedRequestScopeDefaults `json:"scope_defaults"`
ResolveScope SyncTransportScopeResolver `json:"resolve_scope"`
}
SyncTransportAdapter resolves authenticated actor, scope, and trace metadata for go-admin consumers that expose pkg/go-sync transports.
func (SyncTransportAdapter) Resolve ¶ added in v0.27.0
func (a SyncTransportAdapter) Resolve(c router.Context) (SyncTransportRequestMetadata, error)
Resolve returns trusted sync transport metadata without consulting browser-supplied actor or scope overrides.
type SyncTransportRequestMetadata ¶ added in v0.27.0
type SyncTransportRequestMetadata struct {
ActorID string `json:"actor_id"`
RequestID string `json:"request_id"`
CorrelationID string `json:"correlation_id"`
TraceID string `json:"trace_id"`
Scope map[string]string `json:"scope"`
}
SyncTransportRequestMetadata captures trusted sync transport metadata that a consumer can adapt into its package-specific transport layer.
type SyncTransportScopeResolver ¶ added in v0.27.0
type SyncTransportScopeResolver func(router.Context, AuthenticatedRequestIdentity) (map[string]string, error)
SyncTransportScopeResolver resolves consumer-owned canonical scope metadata from an authenticated admin request.
type TenantMember ¶
type TenantMember struct {
UserID string `json:"user_id"`
Roles []string `json:"roles,omitempty"`
Permissions []string `json:"permissions,omitempty"`
}
TenantMember captures membership assignments for a tenant, including scoped roles/permissions.
type TenantPanelRepository ¶
type TenantPanelRepository = genericPanelRepository[TenantRecord]
TenantPanelRepository adapts TenantService to the panel Repository contract.
func NewTenantPanelRepository ¶
func NewTenantPanelRepository(service *TenantService) *TenantPanelRepository
NewTenantPanelRepository constructs a repository backed by TenantService.
type TenantRecord ¶
type TenantRecord struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug,omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
Members []TenantMember `json:"members,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
TenantRecord represents a managed tenant.
type TenantRepository ¶
type TenantRepository interface {
List(ctx context.Context, opts ListOptions) ([]TenantRecord, int, error)
Get(ctx context.Context, id string) (TenantRecord, error)
Create(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
Update(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
Delete(ctx context.Context, id string) error
Search(ctx context.Context, query string, limit int) ([]TenantRecord, error)
}
TenantRepository exposes CRUD/search operations for tenants with membership awareness.
type TenantService ¶
type TenantService struct {
// contains filtered or unexported fields
}
TenantService orchestrates tenant management and activity emission.
func NewTenantService ¶
func NewTenantService(repo TenantRepository) *TenantService
NewTenantService constructs a service with the provided repository or an in-memory fallback.
func (*TenantService) AssignMember ¶
func (s *TenantService) AssignMember(ctx context.Context, tenantID string, member TenantMember) (TenantRecord, error)
AssignMember adds or updates a tenant membership.
func (*TenantService) DeleteTenant ¶
func (s *TenantService) DeleteTenant(ctx context.Context, id string) error
DeleteTenant removes a tenant by ID.
func (*TenantService) GetTenant ¶
func (s *TenantService) GetTenant(ctx context.Context, id string) (TenantRecord, error)
GetTenant fetches a tenant by ID.
func (*TenantService) ListTenants ¶
func (s *TenantService) ListTenants(ctx context.Context, opts ListOptions) ([]TenantRecord, int, error)
ListTenants returns tenants with filters applied.
func (*TenantService) RemoveMember ¶
func (s *TenantService) RemoveMember(ctx context.Context, tenantID, userID string) (TenantRecord, error)
RemoveMember detaches a user from a tenant.
func (*TenantService) SaveTenant ¶
func (s *TenantService) SaveTenant(ctx context.Context, tenant TenantRecord) (TenantRecord, error)
SaveTenant creates or updates a tenant record.
func (*TenantService) SearchTenants ¶
func (s *TenantService) SearchTenants(ctx context.Context, query string, limit int) ([]TenantRecord, error)
SearchTenants performs a keyword search against tenants.
func (*TenantService) WithActivitySink ¶
func (s *TenantService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission for tenant mutations.
type TenantsModule ¶
type TenantsModule struct {
// contains filtered or unexported fields
}
TenantsModule registers the tenants panel and navigation.
func NewTenantsModule ¶
func NewTenantsModule() *TenantsModule
NewTenantsModule constructs the default tenants module.
func (*TenantsModule) Manifest ¶
func (m *TenantsModule) Manifest() ModuleManifest
Manifest describes the module metadata.
func (*TenantsModule) MenuItems ¶
func (m *TenantsModule) MenuItems(locale string) []MenuItem
MenuItems contributes navigation for tenants.
func (*TenantsModule) Register ¶
func (m *TenantsModule) Register(ctx ModuleContext) error
Register wires the tenants panel and search adapter.
func (*TenantsModule) RouteContract ¶ added in v0.27.0
func (m *TenantsModule) RouteContract() routing.ModuleContract
func (*TenantsModule) WithMenuParent ¶
func (m *TenantsModule) WithMenuParent(parent string) *TenantsModule
WithMenuParent nests tenant navigation under a parent menu item ID.
type ThemeProvider ¶
type ThemeProvider func(ctx context.Context, selector ThemeSelector) (*ThemeSelection, error)
ThemeProvider resolves the theme selection, typically backed by go-theme.
func ThemeProviderFromGoThemeSelector ¶ added in v0.36.0
func ThemeProviderFromGoThemeSelector(selector gotheme.ThemeSelector) ThemeProvider
ThemeProviderFromGoThemeSelector adapts a go-theme selector into the admin theme provider contract.
type ThemeSelection ¶
type ThemeSelection struct {
Name string `json:"name"`
Variant string `json:"variant"`
// VariantResolved marks Variant and ChartTheme as authoritative even when empty.
VariantResolved bool `json:"-"`
Tokens map[string]string `json:"tokens"`
CSSVars map[string]string `json:"css_vars"`
SemanticTokens map[string]string `json:"semantic_tokens,omitempty"`
RootCSSVarsInline string `json:"root_css_vars_inline,omitempty"`
Diagnostics []ThemeTokenDiagnostic `json:"diagnostics,omitempty"`
Assets map[string]string `json:"assets"`
Partials map[string]string `json:"partials"`
ChartTheme string `json:"chart_theme"`
AssetPrefix string `json:"asset_prefix"`
}
ThemeSelection captures resolved theme assets/tokens.
type ThemeSelector ¶
ThemeSelector describes the requested theme/variant.
func ThemeSelectorFromContext ¶
func ThemeSelectorFromContext(ctx context.Context) ThemeSelector
ThemeSelectorFromContext extracts a theme selector override from context, if present.
type ThemeTokenDiagnostic ¶ added in v0.125.0
type ThemeTokenDiagnostic struct {
Token string `json:"token"`
Canonical string `json:"canonical,omitempty"`
Variable string `json:"variable,omitempty"`
Constraint string `json:"constraint,omitempty"`
Status string `json:"status"`
Consumer string `json:"consumer,omitempty"`
Reason string `json:"reason,omitempty"`
}
ThemeTokenDiagnostic mirrors go-theme's renderer-neutral token lifecycle without changing the legacy view payload shape.
type TranslationActorOption ¶ added in v0.113.6
type TranslationActorOptionProvider ¶ added in v0.113.6
type TranslationActorOptionProvider interface {
ListTranslationActorOptions(context.Context, TranslationActorOptionQuery) ([]TranslationActorOption, error)
}
type TranslationActorOptionPurpose ¶ added in v0.113.6
type TranslationActorOptionPurpose string
const ( TranslationActorOptionPurposeAssignee TranslationActorOptionPurpose = "assignee" TranslationActorOptionPurposeReviewer TranslationActorOptionPurpose = "reviewer" )
type TranslationActorOptionQuery ¶ added in v0.113.6
type TranslationActorOptionQuery struct {
Purpose TranslationActorOptionPurpose `json:"purpose"`
Search string `json:"search,omitempty"`
SelectedIDs []string `json:"selected_ids,omitempty"`
Page int `json:"page,omitempty"`
PerPage int `json:"per_page,omitempty"`
Channel string `json:"channel,omitempty"`
EntityType string `json:"entity_type,omitempty"`
SourceRecordID string `json:"source_record_id,omitempty"`
FamilyID string `json:"family_id,omitempty"`
TargetLocale string `json:"target_locale,omitempty"`
AdminContext AdminContext `json:"-"`
}
type TranslationAlreadyExistsError ¶ added in v0.25.0
type TranslationAlreadyExistsError struct {
Panel string `json:"panel"`
EntityID string `json:"entity_id"`
SourceLocale string `json:"source_locale"`
Locale string `json:"locale"`
FamilyID string `json:"family_id"`
}
TranslationAlreadyExistsError reports locale-level duplicate translation attempts.
func (TranslationAlreadyExistsError) Error ¶ added in v0.25.0
func (e TranslationAlreadyExistsError) Error() string
func (TranslationAlreadyExistsError) Unwrap ¶ added in v0.25.0
func (e TranslationAlreadyExistsError) Unwrap() error
type TranslationAssignment ¶ added in v0.25.0
type TranslationAssignment struct {
ID string `json:"id"`
FamilyID string `json:"family_id"`
VariantID string `json:"variant_id,omitempty"`
EntityType string `json:"entity_type"`
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
SourceRecordID string `json:"source_record_id"`
SourceLocale string `json:"source_locale"`
TargetLocale string `json:"target_locale"`
TargetRecordID string `json:"target_record_id,omitempty"`
SourceTitle string `json:"source_title,omitempty"`
SourcePath string `json:"source_path,omitempty"`
WorkScope string `json:"work_scope,omitempty"`
AssignmentType AssignmentType `json:"assignment_type"`
Status AssignmentStatus `json:"status"`
Priority Priority `json:"priority"`
DueDate *time.Time `json:"due_date,omitempty"`
AssigneeID string `json:"assignee_id,omitempty"`
ReviewerID string `json:"reviewer_id,omitempty"`
AssignerID string `json:"assigner_id,omitempty"`
LastReviewerID string `json:"last_reviewer_id,omitempty"`
LastRejectionReason string `json:"last_rejection_reason,omitempty"`
AssignedAt *time.Time `json:"assigned_at,omitempty"`
Version int64 `json:"version"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClaimedAt *time.Time `json:"claimed_at,omitempty"`
SubmittedAt *time.Time `json:"submitted_at,omitempty"`
ApprovedAt *time.Time `json:"approved_at,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
ArchivedAt *time.Time `json:"archived_at,omitempty"`
}
TranslationAssignment coordinates translation work for one target locale.
func (TranslationAssignment) ActiveUniquenessKey ¶ added in v0.25.0
func (a TranslationAssignment) ActiveUniquenessKey() string
ActiveUniquenessKey returns the canonical active-assignment uniqueness key.
func (TranslationAssignment) Validate ¶ added in v0.25.0
func (a TranslationAssignment) Validate() error
Validate ensures required model fields and enum values are present.
type TranslationAssignmentConflictError ¶ added in v0.25.0
type TranslationAssignmentConflictError struct {
AssignmentID string `json:"assignment_id"`
ExistingAssignmentID string `json:"existing_assignment_id"`
FamilyID string `json:"family_id"`
EntityType string `json:"entity_type"`
SourceLocale string `json:"source_locale"`
TargetLocale string `json:"target_locale"`
WorkScope string `json:"work_scope"`
}
TranslationAssignmentConflictError captures active uniqueness conflicts.
func (TranslationAssignmentConflictError) Error ¶ added in v0.25.0
func (e TranslationAssignmentConflictError) Error() string
func (TranslationAssignmentConflictError) Unwrap ¶ added in v0.25.0
func (e TranslationAssignmentConflictError) Unwrap() error
type TranslationAssignmentDashboardSummary ¶ added in v0.80.0
type TranslationAssignmentDashboardSummaryInput ¶ added in v0.80.0
type TranslationAssignmentFamilyAssignmentsQueryInput ¶ added in v0.82.1
type TranslationAssignmentFamilyAssignmentsQueryResult ¶ added in v0.82.1
type TranslationAssignmentFamilyAssignmentsQueryResult struct {
Items []TranslationAssignment
Total int
HasNext bool
}
type TranslationAssignmentFamilyGroup ¶ added in v0.82.1
type TranslationAssignmentFamilyGroup struct {
FamilyID string
FamilyLabel string
EntityType string
SourceRecordID string
SourceLocale string
SourceTitle string
SourcePath string
AssignmentCount int
LocaleCount int
TargetLocales []string
StatusCounts map[string]int
DueStateCounts map[string]int
PriorityCounts map[string]int
FamilyBlockerCount *int
FamilyBlockerCountAvailable bool
FamilyBlockerCountReason string
ActionHints map[string]int
CreatedAt time.Time
UpdatedAt time.Time
DueDate *time.Time
DueState string
Priority Priority
}
type TranslationAssignmentFamilyGroupQueryInput ¶ added in v0.82.1
type TranslationAssignmentFamilyGroupQueryResult ¶ added in v0.82.1
type TranslationAssignmentFamilyGroupQueryResult struct {
Families []TranslationAssignmentFamilyGroup
FamilyTotal int
AssignmentTotal int
}
type TranslationAssignmentFamilyGroupingStore ¶ added in v0.82.1
type TranslationAssignmentFamilyGroupingStore interface {
ListAssignmentFamilyGroups(ctx context.Context, input TranslationAssignmentFamilyGroupQueryInput) (TranslationAssignmentFamilyGroupQueryResult, error)
ListFamilyAssignments(ctx context.Context, input TranslationAssignmentFamilyAssignmentsQueryInput) (TranslationAssignmentFamilyAssignmentsQueryResult, error)
}
type TranslationAssignmentFamilyOptionQueryInput ¶ added in v0.113.5
type TranslationAssignmentFamilyOptionQueryResult ¶ added in v0.113.5
type TranslationAssignmentFamilyOptionQueryResult struct {
Options []TranslationAssignmentGroupOption
}
type TranslationAssignmentFamilyOptionQueryStore ¶ added in v0.113.5
type TranslationAssignmentFamilyOptionQueryStore interface {
ListAssignmentFamilyOptions(ctx context.Context, input TranslationAssignmentFamilyOptionQueryInput) (TranslationAssignmentFamilyOptionQueryResult, error)
}
type TranslationAssignmentGroupOption ¶ added in v0.100.0
type TranslationAssignmentMyWorkSummaryInput ¶ added in v0.80.0
type TranslationAssignmentOptionStore ¶ added in v0.100.0
type TranslationAssignmentOptionStore interface {
DistinctAssignmentEntityTypes(ctx context.Context) ([]string, error)
DistinctAssignmentLocales(ctx context.Context, filters map[string]any) ([]string, error)
DistinctAssignmentTranslationGroups(ctx context.Context, filters map[string]any) ([]TranslationAssignmentGroupOption, error)
}
type TranslationAssignmentPageQueryInput ¶ added in v0.80.0
type TranslationAssignmentPageQueryResult ¶ added in v0.80.0
type TranslationAssignmentPageQueryResult struct {
Items []TranslationAssignment
Total int
}
type TranslationAssignmentPageQueryStore ¶ added in v0.80.0
type TranslationAssignmentPageQueryStore interface {
ListAssignmentPage(ctx context.Context, input TranslationAssignmentPageQueryInput) (TranslationAssignmentPageQueryResult, error)
}
type TranslationAssignmentPanelRepository ¶ added in v0.25.0
type TranslationAssignmentPanelRepository struct {
// contains filtered or unexported fields
}
TranslationAssignmentPanelRepository adapts typed queue storage to panel CRUD contracts.
func NewTranslationAssignmentPanelRepository ¶ added in v0.25.0
func NewTranslationAssignmentPanelRepository(repo TranslationAssignmentRepository) *TranslationAssignmentPanelRepository
NewTranslationAssignmentPanelRepository wraps a typed assignment repository for panel usage.
func (*TranslationAssignmentPanelRepository) Delete ¶ added in v0.25.0
func (r *TranslationAssignmentPanelRepository) Delete(ctx context.Context, id string) error
func (*TranslationAssignmentPanelRepository) List ¶ added in v0.25.0
func (r *TranslationAssignmentPanelRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
type TranslationAssignmentQueueSummary ¶ added in v0.80.0
type TranslationAssignmentQueueSummaryInput ¶ added in v0.80.0
type TranslationAssignmentRepository ¶ added in v0.25.0
type TranslationAssignmentRepository interface {
List(ctx context.Context, opts ListOptions) ([]TranslationAssignment, int, error)
Create(ctx context.Context, assignment TranslationAssignment) (TranslationAssignment, error)
CreateOrReuseActive(ctx context.Context, assignment TranslationAssignment) (TranslationAssignment, bool, error)
Get(ctx context.Context, id string) (TranslationAssignment, error)
Update(ctx context.Context, assignment TranslationAssignment, expectedVersion int64) (TranslationAssignment, error)
}
TranslationAssignmentRepository stores translation queue assignments.
type TranslationAssignmentResourceAdapter ¶ added in v0.86.0
type TranslationAssignmentResourceAdapter struct {
// contains filtered or unexported fields
}
func NewTranslationAssignmentResourceAdapter ¶ added in v0.86.0
func NewTranslationAssignmentResourceAdapter(a *Admin) *TranslationAssignmentResourceAdapter
func (*TranslationAssignmentResourceAdapter) FamilyAssignments ¶ added in v0.93.0
func (a *TranslationAssignmentResourceAdapter) FamilyAssignments(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
func (*TranslationAssignmentResourceAdapter) Index ¶ added in v0.86.0
func (a *TranslationAssignmentResourceAdapter) Index(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
func (*TranslationAssignmentResourceAdapter) Show ¶ added in v0.86.0
func (a *TranslationAssignmentResourceAdapter) Show(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
type TranslationAssignmentReviewerAggregateInput ¶ added in v0.80.0
type TranslationAssignmentReviewerAggregateStore ¶ added in v0.91.0
type TranslationAssignmentReviewerAggregateStore interface {
AssignmentReviewerAggregateSummary(ctx context.Context, input TranslationAssignmentReviewerAggregateInput) (TranslationAssignmentReviewerAggregateSummary, error)
}
type TranslationAssignmentReviewerAggregateSummary ¶ added in v0.91.0
type TranslationAssignmentReviewerSummaryStore ¶ added in v0.80.0
type TranslationAssignmentSnapshotQueryInput ¶ added in v0.82.1
type TranslationAssignmentSnapshotQueryResult ¶ added in v0.82.1
type TranslationAssignmentSnapshotQueryResult struct {
Selections []TranslationAssignmentSnapshotSelection
Total int
}
type TranslationAssignmentSnapshotQueryStore ¶ added in v0.82.1
type TranslationAssignmentSnapshotQueryStore interface {
ListAssignmentSnapshot(ctx context.Context, input TranslationAssignmentSnapshotQueryInput) (TranslationAssignmentSnapshotQueryResult, error)
}
type TranslationAssignmentSnapshotSelection ¶ added in v0.82.1
type TranslationAssignmentSummaryStore ¶ added in v0.80.0
type TranslationAssignmentSummaryStore interface {
AssignmentQueueSummary(ctx context.Context, input TranslationAssignmentQueueSummaryInput) (TranslationAssignmentQueueSummary, error)
AssignmentMyWorkSummary(ctx context.Context, input TranslationAssignmentMyWorkSummaryInput) (map[string]int, error)
AssignmentDashboardSummary(ctx context.Context, input TranslationAssignmentDashboardSummaryInput) (TranslationAssignmentDashboardSummary, error)
}
type TranslationAssignmentVersionConflictError ¶ added in v0.25.0
type TranslationAssignmentVersionConflictError struct {
AssignmentID string `json:"assignment_id"`
ExpectedVersion int64 `json:"expected_version"`
ActualVersion int64 `json:"actual_version"`
}
TranslationAssignmentVersionConflictError captures optimistic locking conflicts.
func (TranslationAssignmentVersionConflictError) Error ¶ added in v0.25.0
func (e TranslationAssignmentVersionConflictError) Error() string
func (TranslationAssignmentVersionConflictError) Unwrap ¶ added in v0.25.0
func (e TranslationAssignmentVersionConflictError) Unwrap() error
type TranslationBundle ¶ added in v0.24.0
type TranslationBundle[T any] = cmsinterfaces.TranslationBundle[T]
TranslationBundle wraps requested/resolved translations with locale metadata.
type TranslationCheckOptions ¶ added in v0.24.0
type TranslationCheckOptions = cmsinterfaces.TranslationCheckOptions
TranslationCheckOptions mirrors go-cms translation check options.
type TranslationCreateInput ¶ added in v0.25.0
type TranslationCreateInput struct {
SourceID string `json:"source_id"`
Locale string `json:"locale"`
Environment string `json:"environment"`
PolicyEntity string `json:"policy_entity"`
ContentType string `json:"content_type"`
Status string `json:"status"`
Path string `json:"path"`
RouteKey string `json:"route_key"`
Metadata map[string]any `json:"metadata"`
}
TranslationCreateInput captures canonical translation creation intent.
type TranslationDashboardFamilyMetrics ¶ added in v0.80.0
type TranslationDashboardFamilyMetrics struct {
BlockedFamilies int
MissingRequiredFamilies int
TopBlocked []translationservices.FamilyRecord
}
type TranslationDashboardFamilyMetricsInput ¶ added in v0.80.0
type TranslationDashboardFamilyMetricsStore ¶ added in v0.80.0
type TranslationDashboardFamilyMetricsStore interface {
TranslationDashboardFamilyMetrics(context.Context, TranslationDashboardFamilyMetricsInput) (TranslationDashboardFamilyMetrics, error)
}
type TranslationEditorMemorySuggestion ¶ added in v0.80.0
type TranslationEditorMemorySuggestion struct {
Family translationservices.FamilyRecord
SourceVariant translationservices.FamilyVariant
TargetVariant translationservices.FamilyVariant
FieldPath string
SourceText string
SuggestedText string
}
type TranslationEditorMemorySuggestionInput ¶ added in v0.80.0
type TranslationEditorMemorySuggestionStore ¶ added in v0.80.0
type TranslationEditorMemorySuggestionStore interface {
TranslationEditorMemorySuggestions(context.Context, TranslationEditorMemorySuggestionInput) ([]TranslationEditorMemorySuggestion, error)
}
type TranslationExchangeApplier ¶ added in v0.25.0
type TranslationExchangeApplier interface {
ApplyImport(ctx context.Context, input TranslationImportApplyInput) (TranslationExchangeResult, error)
}
TranslationExchangeApplier defines import apply behavior for command handlers.
type TranslationExchangeApplyDefaults ¶ added in v0.92.0
type TranslationExchangeApplyDefaults struct {
AllowCreateMissing *bool `koanf:"allow_create_missing" json:"allow_create_missing,omitempty" yaml:"allow_create_missing,omitempty"`
AllowSourceHashOverride *bool `koanf:"allow_source_hash_override" json:"allow_source_hash_override,omitempty" yaml:"allow_source_hash_override,omitempty"`
ContinueOnError *bool `koanf:"continue_on_error" json:"continue_on_error,omitempty" yaml:"continue_on_error,omitempty"`
DryRun *bool `koanf:"dry_run" json:"dry_run,omitempty" yaml:"dry_run,omitempty"`
}
TranslationExchangeApplyDefaults configures import/apply wizard option defaults.
type TranslationExchangeApplyRequest ¶ added in v0.25.0
type TranslationExchangeApplyRequest struct {
Key TranslationExchangeLinkageKey `json:"key"`
TranslatedText string `json:"translated_text"`
CreateTranslation bool `json:"create_translation"`
WorkflowStatus string `json:"workflow_status"`
Path string `json:"path,omitempty"`
RouteKey string `json:"route_key,omitempty"`
}
type TranslationExchangeConflictError ¶ added in v0.25.0
type TranslationExchangeConflictError struct {
Type string `json:"type"`
Index int `json:"index"`
Resource string `json:"resource"`
EntityID string `json:"entity_id"`
FamilyID string `json:"family_id"`
TargetLocale string `json:"target_locale"`
FieldPath string `json:"field_path"`
CurrentSourceHash string `json:"current_source_hash"`
ProvidedSourceHash string `json:"provided_source_hash"`
}
TranslationExchangeConflictError captures row-level deterministic linkage conflicts.
func (TranslationExchangeConflictError) Error ¶ added in v0.25.0
func (e TranslationExchangeConflictError) Error() string
func (TranslationExchangeConflictError) Unwrap ¶ added in v0.25.0
func (e TranslationExchangeConflictError) Unwrap() error
type TranslationExchangeConflictInfo ¶ added in v0.25.0
type TranslationExchangeConflictInfo struct {
Type string `json:"type"`
Message string `json:"message,omitempty"`
CurrentSourceHash string `json:"current_source_hash,omitempty"`
ProvidedSourceHash string `json:"provided_source_hash,omitempty"`
}
TranslationExchangeConflictInfo captures deterministic row conflict metadata.
type TranslationExchangeConflictResolution ¶ added in v0.27.0
type TranslationExchangeConflictResolution struct {
Row int `json:"row"`
Decision string `json:"decision"`
ConflictType string `json:"conflict_type,omitempty"`
}
TranslationExchangeConflictResolution captures an explicit row-level retry decision.
type TranslationExchangeExporter ¶ added in v0.25.0
type TranslationExchangeExporter interface {
Export(ctx context.Context, input TranslationExportInput) (TranslationExportResult, error)
}
TranslationExchangeExporter defines export behavior for command handlers.
type TranslationExchangeInvalidPayloadError ¶ added in v0.25.0
type TranslationExchangeInvalidPayloadError struct {
Message string `json:"message"`
Field string `json:"field"`
Format string `json:"format"`
Metadata map[string]any `json:"metadata"`
}
TranslationExchangeInvalidPayloadError captures invalid payload details.
func (TranslationExchangeInvalidPayloadError) Error ¶ added in v0.25.0
func (e TranslationExchangeInvalidPayloadError) Error() string
func (TranslationExchangeInvalidPayloadError) Unwrap ¶ added in v0.25.0
func (e TranslationExchangeInvalidPayloadError) Unwrap() error
type TranslationExchangeLinkage ¶ added in v0.25.0
type TranslationExchangeLinkage struct {
Key TranslationExchangeLinkageKey `json:"key"`
SourceHash string `json:"source_hash"`
TargetExists bool `json:"target_exists"`
}
type TranslationExchangeLinkageKey ¶ added in v0.25.0
type TranslationExchangeLinkageKey struct {
Resource string `json:"resource"`
EntityID string `json:"entity_id"`
FamilyID string `json:"family_id"`
TargetLocale string `json:"target_locale"`
FieldPath string `json:"field_path"`
}
func ResolveTranslationExchangeLinkageKey ¶ added in v0.25.0
func ResolveTranslationExchangeLinkageKey(row TranslationExchangeRow) (TranslationExchangeLinkageKey, error)
ResolveTranslationExchangeLinkageKey canonicalizes deterministic row linkage identifiers.
func (TranslationExchangeLinkageKey) String ¶ added in v0.25.0
func (k TranslationExchangeLinkageKey) String() string
type TranslationExchangeLocaleOption ¶ added in v0.92.0
type TranslationExchangeLocaleOption struct {
Code string `koanf:"code" json:"code" yaml:"code"`
Label string `koanf:"label" json:"label,omitempty" yaml:"label,omitempty"`
}
TranslationExchangeLocaleOption describes a selectable locale.
type TranslationExchangeResourceOption ¶ added in v0.92.0
type TranslationExchangeResourceOption struct {
ID string `koanf:"id" json:"id" yaml:"id"`
Label string `koanf:"label" json:"label,omitempty" yaml:"label,omitempty"`
}
TranslationExchangeResourceOption describes a selectable exchange resource.
type TranslationExchangeResult ¶ added in v0.25.0
type TranslationExchangeResult struct {
Summary TranslationExchangeSummary `json:"summary"`
Results []TranslationExchangeRowResult `json:"results"`
TotalRows int `json:"total_rows,omitempty"`
}
TranslationExchangeResult captures structured validate/apply responses.
func (*TranslationExchangeResult) Add ¶ added in v0.25.0
func (r *TranslationExchangeResult) Add(row TranslationExchangeRowResult)
Add appends a row result and updates aggregate counters.
type TranslationExchangeRow ¶ added in v0.25.0
type TranslationExchangeRow struct {
Index int `json:"index,omitempty"`
Resource string `json:"resource"`
EntityID string `json:"entity_id"`
FamilyID string `json:"family_id"`
SourceLocale string `json:"source_locale,omitempty"`
TargetLocale string `json:"target_locale"`
FieldPath string `json:"field_path"`
SourceText string `json:"source_text,omitempty"`
TranslatedText string `json:"translated_text,omitempty"`
SourceHash string `json:"source_hash,omitempty"`
CreateTranslation bool `json:"create_translation,omitempty"`
Path string `json:"path,omitempty"`
RouteKey string `json:"route_key,omitempty"`
Title string `json:"title,omitempty"`
Status string `json:"status,omitempty"`
Notes string `json:"notes,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
TranslationExchangeRow defines a normalized translation row used by command handlers.
type TranslationExchangeRowResult ¶ added in v0.25.0
type TranslationExchangeRowResult struct {
Index int `json:"index"`
Resource string `json:"resource"`
EntityID string `json:"entity_id"`
FamilyID string `json:"family_id"`
TargetLocale string `json:"target_locale"`
FieldPath string `json:"field_path"`
Status string `json:"status"`
Error string `json:"error,omitempty"`
Conflict *TranslationExchangeConflictInfo `json:"conflict,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
TranslationExchangeRowResult captures per-row validate/apply status.
type TranslationExchangeRuntime ¶ added in v0.27.0
type TranslationExchangeRuntime struct {
// contains filtered or unexported fields
}
func NewTranslationExchangeRuntime ¶ added in v0.27.0
func NewTranslationExchangeRuntime(store TranslationExchangeRuntimeStore, exporter TranslationExchangeExporter, applyService *TranslationExchangeService) *TranslationExchangeRuntime
func (*TranslationExchangeRuntime) Configure ¶ added in v0.27.0
func (r *TranslationExchangeRuntime) Configure(exporter TranslationExchangeExporter, applier TranslationExchangeApplier)
func (*TranslationExchangeRuntime) ListJobs ¶ added in v0.27.0
func (r *TranslationExchangeRuntime) ListJobs(ctx context.Context, query translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
func (*TranslationExchangeRuntime) QueueApply ¶ added in v0.27.0
func (r *TranslationExchangeRuntime) QueueApply(ctx context.Context, identity translationTransportIdentity, job translationExchangeAsyncJob, rows []TranslationExchangeRow) (translationExchangeAsyncJob, bool, error)
func (*TranslationExchangeRuntime) QueueExport ¶ added in v0.27.0
func (r *TranslationExchangeRuntime) QueueExport(ctx context.Context, job translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
func (*TranslationExchangeRuntime) RecordCompletedJob ¶ added in v0.27.0
func (r *TranslationExchangeRuntime) RecordCompletedJob(ctx context.Context, job translationExchangeAsyncJob, rows []TranslationExchangeRow, result map[string]any) (translationExchangeAsyncJob, error)
type TranslationExchangeRuntimeStore ¶ added in v0.27.0
type TranslationExchangeRuntimeStore interface {
CreateJob(context.Context, translationExchangeAsyncJob) (translationExchangeAsyncJob, error)
CreateOrGetApplyJob(context.Context, translationTransportIdentity, translationExchangeAsyncJob, []TranslationExchangeRow) (translationExchangeAsyncJob, bool, error)
FindJobByRequestHash(context.Context, string, translationTransportIdentity, string) (translationExchangeAsyncJob, bool, error)
GetJob(context.Context, translationTransportIdentity, string) (translationExchangeAsyncJob, bool, error)
ListJobs(context.Context, translationExchangeJobQuery) ([]translationExchangeAsyncJob, int, error)
DeleteJob(context.Context, translationTransportIdentity, string) (translationExchangeAsyncJob, bool, error)
SaveJobRows(context.Context, translationExchangeAsyncJob, []TranslationExchangeRow) error
ListJobRows(context.Context, string) ([]translationExchangeStoredRow, error)
UpsertJobRow(context.Context, string, translationExchangeStoredRow) error
ReplaceJobArtifacts(context.Context, translationExchangeAsyncJob, []translationExchangeJobArtifact) error
ClaimJob(context.Context, string, string, time.Time, time.Time) (translationExchangeAsyncJob, bool, error)
HeartbeatJob(context.Context, string, string, map[string]any, time.Time, time.Time) error
CompleteJob(context.Context, string, string, map[string]any, map[string]any, map[string]any, time.Time) (translationExchangeAsyncJob, error)
FailJob(context.Context, string, string, map[string]any, error, time.Time) (translationExchangeAsyncJob, error)
ListRecoverableJobs(context.Context, time.Time, int) ([]translationExchangeAsyncJob, error)
LookupApplyRecord(context.Context, translationTransportIdentity, string, string) (translationExchangeAppliedRecord, bool, error)
RecordApplyRecord(context.Context, translationTransportIdentity, translationExchangeAppliedRecord) (translationExchangeAppliedRecord, bool, error)
ReserveApplyRecord(context.Context, translationTransportIdentity, string, string, time.Time, time.Time) (translationExchangeApplyReservation, translationExchangeAppliedRecord, string, error)
CommitApplyRecord(context.Context, translationExchangeApplyReservation, translationExchangeAppliedRecord) (translationExchangeAppliedRecord, error)
ReleaseApplyRecord(context.Context, translationExchangeApplyReservation) error
}
TranslationExchangeRuntimeStore persists async exchange jobs, artifacts, row state, and apply dedupe records.
type TranslationExchangeService ¶ added in v0.25.0
type TranslationExchangeService struct {
// contains filtered or unexported fields
}
TranslationExchangeService contains transport-agnostic exchange domain behavior.
func NewTranslationExchangeService ¶ added in v0.25.0
func NewTranslationExchangeService(store TranslationExchangeStore, opts ...TranslationExchangeServiceOption) *TranslationExchangeService
func (*TranslationExchangeService) ApplyImport ¶ added in v0.25.0
func (s *TranslationExchangeService) ApplyImport(ctx context.Context, input TranslationImportApplyInput) (TranslationExchangeResult, error)
func (*TranslationExchangeService) Export ¶ added in v0.25.0
func (s *TranslationExchangeService) Export(ctx context.Context, input TranslationExportInput) (TranslationExportResult, error)
func (*TranslationExchangeService) ValidateImport ¶ added in v0.25.0
func (s *TranslationExchangeService) ValidateImport(ctx context.Context, input TranslationImportValidateInput) (TranslationExchangeResult, error)
type TranslationExchangeServiceOption ¶ added in v0.27.0
type TranslationExchangeServiceOption func(*TranslationExchangeService)
func WithTranslationExchangeApplyRecordStore ¶ added in v0.27.0
func WithTranslationExchangeApplyRecordStore(store translationExchangeApplyRecordStore) TranslationExchangeServiceOption
type TranslationExchangeStore ¶ added in v0.25.0
type TranslationExchangeStore interface {
ExportRows(ctx context.Context, filter TranslationExportFilter) ([]TranslationExchangeRow, error)
ResolveLinkage(ctx context.Context, key TranslationExchangeLinkageKey) (TranslationExchangeLinkage, error)
ApplyTranslation(ctx context.Context, req TranslationExchangeApplyRequest) error
}
TranslationExchangeStore abstracts deterministic linkage resolution and row writes.
type TranslationExchangeSummary ¶ added in v0.25.0
type TranslationExchangeSummary struct {
Processed int `json:"processed"`
Succeeded int `json:"succeeded"`
Failed int `json:"failed"`
Conflicts int `json:"conflicts,omitempty"`
Skipped int `json:"skipped,omitempty"`
PartialSuccess bool `json:"partial_success,omitempty"`
ByStatus map[string]int `json:"by_status,omitempty"`
ByConflict map[string]int `json:"by_conflict,omitempty"`
}
TranslationExchangeSummary captures aggregate validate/apply outcomes.
type TranslationExchangeTemplateOption ¶ added in v0.92.0
type TranslationExchangeTemplateOption struct {
Label string `koanf:"label" json:"label,omitempty" yaml:"label,omitempty"`
Format string `koanf:"format" json:"format,omitempty" yaml:"format,omitempty"`
Href string `koanf:"href" json:"href,omitempty" yaml:"href,omitempty"`
Filename string `koanf:"filename" json:"filename,omitempty" yaml:"filename,omitempty"`
}
TranslationExchangeTemplateOption configures the template download affordance.
type TranslationExchangeUIConfig ¶ added in v0.92.0
type TranslationExchangeUIConfig struct {
Configured bool `koanf:"configured" json:"configured,omitempty" yaml:"configured,omitempty"`
SourceLocale string `koanf:"source_locale" json:"source_locale,omitempty" yaml:"source_locale,omitempty"`
SourceLocales []TranslationExchangeLocaleOption `koanf:"source_locales" json:"source_locales,omitempty" yaml:"source_locales,omitempty"`
TargetLocales []TranslationExchangeLocaleOption `koanf:"target_locales" json:"target_locales,omitempty" yaml:"target_locales,omitempty"`
LocaleLabels map[string]string `koanf:"locale_labels" json:"locale_labels,omitempty" yaml:"locale_labels,omitempty"`
Resources []TranslationExchangeResourceOption `koanf:"resources" json:"resources,omitempty" yaml:"resources,omitempty"`
DefaultResources []string `koanf:"default_resources" json:"default_resources,omitempty" yaml:"default_resources,omitempty"`
DefaultTargetLocales []string `koanf:"default_target_locales" json:"default_target_locales,omitempty" yaml:"default_target_locales,omitempty"`
IncludeSourceHash *bool `koanf:"include_source_hash" json:"include_source_hash,omitempty" yaml:"include_source_hash,omitempty"`
IncludeExamples *bool `koanf:"include_examples" json:"include_examples,omitempty" yaml:"include_examples,omitempty"`
Template TranslationExchangeTemplateOption `koanf:"template" json:"template" yaml:"template,omitempty"`
Apply TranslationExchangeApplyDefaults `koanf:"apply" json:"apply" yaml:"apply,omitempty"`
}
TranslationExchangeUIConfig carries JSON-safe exchange wizard settings for SSR and client enhancement. Host-facing packages may alias this type.
type TranslationExchangeUnsupportedFormatError ¶ added in v0.25.0
type TranslationExchangeUnsupportedFormatError struct {
Format string `json:"format"`
Supported []string `json:"supported"`
}
TranslationExchangeUnsupportedFormatError captures unsupported upload format details.
func (TranslationExchangeUnsupportedFormatError) Error ¶ added in v0.25.0
func (e TranslationExchangeUnsupportedFormatError) Error() string
func (TranslationExchangeUnsupportedFormatError) Unwrap ¶ added in v0.25.0
func (e TranslationExchangeUnsupportedFormatError) Unwrap() error
type TranslationExchangeValidator ¶ added in v0.25.0
type TranslationExchangeValidator interface {
ValidateImport(ctx context.Context, input TranslationImportValidateInput) (TranslationExchangeResult, error)
}
TranslationExchangeValidator defines import validate behavior for command handlers.
type TranslationExportCommand ¶ added in v0.25.0
type TranslationExportCommand struct {
Service TranslationExchangeExporter `json:"service"`
}
func (*TranslationExportCommand) CLIHandler ¶ added in v0.25.0
func (c *TranslationExportCommand) CLIHandler() any
func (*TranslationExportCommand) CLIOptions ¶ added in v0.25.0
func (c *TranslationExportCommand) CLIOptions() gocommand.CLIConfig
func (*TranslationExportCommand) Execute ¶ added in v0.25.0
func (c *TranslationExportCommand) Execute(ctx context.Context, msg TranslationExportInput) error
type TranslationExportFilter ¶ added in v0.25.0
type TranslationExportFilter struct {
Resources []string `json:"resources"`
EntityIDs []string `json:"entity_ids,omitempty"`
SourceLocale string `json:"source_locale,omitempty"`
TargetLocales []string `json:"target_locales,omitempty"`
FieldPaths []string `json:"field_paths,omitempty"`
IncludeSourceHash bool `json:"include_source_hash,omitempty"`
Options map[string]any `json:"options,omitempty"`
}
TranslationExportFilter captures normalized export criteria.
type TranslationExportInput ¶ added in v0.25.0
type TranslationExportInput struct {
Filter TranslationExportFilter `json:"filter"`
Output *TranslationExportResult `json:"-"`
}
TranslationExportInput is the typed export command input.
func (TranslationExportInput) Type ¶ added in v0.25.0
func (TranslationExportInput) Type() string
func (TranslationExportInput) Validate ¶ added in v0.25.0
func (m TranslationExportInput) Validate() error
type TranslationExportResult ¶ added in v0.25.0
type TranslationExportResult struct {
RowCount int `json:"row_count"`
Format string `json:"format,omitempty"`
Rows []TranslationExchangeRow `json:"rows,omitempty"`
}
TranslationExportResult captures exported rows and aggregate metadata.
type TranslationFamilyAssignCommand ¶ added in v0.86.0
type TranslationFamilyAssignCommand struct {
Binding *translationFamilyBinding `json:"binding"`
}
func (*TranslationFamilyAssignCommand) Execute ¶ added in v0.86.0
func (c *TranslationFamilyAssignCommand) Execute(ctx context.Context, msg TranslationFamilyAssignInput) error
type TranslationFamilyAssignInput ¶ added in v0.86.0
type TranslationFamilyAssignInput struct {
FamilyID string `json:"family_id"`
Scope translationservices.Scope `json:"scope"`
ActorID string `json:"actor_id"`
TargetLocale string `json:"target_locale"`
AssigneeID string `json:"assignee_id"`
OpenPool bool `json:"open_pool"`
Priority Priority `json:"priority"`
PrioritySet bool `json:"-"`
DueDate *time.Time `json:"due_date"`
WorkScope string `json:"work_scope"`
Channel string `json:"channel"`
Result *TranslationFamilyAssignResult `json:"-"`
}
TranslationFamilyAssignInput is the transport-neutral command input for assigning or creating one translation-family assignment.
func (TranslationFamilyAssignInput) Validate ¶ added in v0.86.0
func (msg TranslationFamilyAssignInput) Validate() error
type TranslationFamilyAssignResult ¶ added in v0.86.0
type TranslationFamilyAssignResult struct {
Family translationservices.FamilyRecord `json:"family"`
Assignment TranslationAssignment `json:"assignment"`
AssignmentReused bool `json:"assignment_reused"`
}
TranslationFamilyAssignResult contains only domain data produced by the command; presentation payloads are built by route responders.
type TranslationFamilyResourceAdapter ¶ added in v0.86.0
type TranslationFamilyResourceAdapter struct {
// contains filtered or unexported fields
}
func NewTranslationFamilyResourceAdapter ¶ added in v0.86.0
func NewTranslationFamilyResourceAdapter(a *Admin) *TranslationFamilyResourceAdapter
func (*TranslationFamilyResourceAdapter) Index ¶ added in v0.86.0
func (a *TranslationFamilyResourceAdapter) Index(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
func (*TranslationFamilyResourceAdapter) Show ¶ added in v0.86.0
func (a *TranslationFamilyResourceAdapter) Show(c router.Context, input TranslationSSRPresenterInput) (TranslationSSRResourceResult, error)
type TranslationImportApplyCommand ¶ added in v0.25.0
type TranslationImportApplyCommand struct {
Service TranslationExchangeApplier `json:"service"`
}
func (*TranslationImportApplyCommand) CLIHandler ¶ added in v0.25.0
func (c *TranslationImportApplyCommand) CLIHandler() any
func (*TranslationImportApplyCommand) CLIOptions ¶ added in v0.25.0
func (c *TranslationImportApplyCommand) CLIOptions() gocommand.CLIConfig
func (*TranslationImportApplyCommand) Execute ¶ added in v0.25.0
func (c *TranslationImportApplyCommand) Execute(ctx context.Context, msg TranslationImportApplyInput) error
type TranslationImportApplyInput ¶ added in v0.25.0
type TranslationImportApplyInput struct {
Rows []TranslationExchangeRow `json:"rows"`
AllowCreateMissing bool `json:"allow_create_missing,omitempty"`
AllowSourceHashOverride bool `json:"allow_source_hash_override,omitempty"`
ContinueOnError bool `json:"continue_on_error,omitempty"`
DryRun bool `json:"dry_run,omitempty"`
RetryJobID string `json:"retry_job_id,omitempty"`
Resolutions []TranslationExchangeConflictResolution `json:"resolutions,omitempty"`
Result *TranslationExchangeResult `json:"-"`
}
TranslationImportApplyInput is the typed import-apply command input.
func (TranslationImportApplyInput) Type ¶ added in v0.25.0
func (TranslationImportApplyInput) Type() string
func (TranslationImportApplyInput) Validate ¶ added in v0.25.0
func (m TranslationImportApplyInput) Validate() error
type TranslationImportRunCommand ¶ added in v0.25.0
type TranslationImportRunCommand struct {
Validator TranslationExchangeValidator `json:"validator"`
Applier TranslationExchangeApplier `json:"applier"`
}
func (*TranslationImportRunCommand) CLIHandler ¶ added in v0.25.0
func (c *TranslationImportRunCommand) CLIHandler() any
func (*TranslationImportRunCommand) CLIOptions ¶ added in v0.25.0
func (c *TranslationImportRunCommand) CLIOptions() gocommand.CLIConfig
func (*TranslationImportRunCommand) Execute ¶ added in v0.25.0
func (c *TranslationImportRunCommand) Execute(ctx context.Context, msg TranslationImportRunInput) error
type TranslationImportRunInput ¶ added in v0.25.0
type TranslationImportRunInput struct {
ValidateInput TranslationImportValidateInput `json:"validate"`
ApplyInput TranslationImportApplyInput `json:"apply"`
Result *TranslationImportRunResult `json:"-"`
}
TranslationImportRunInput is an optional typed wrapper that composes validate+apply.
func (TranslationImportRunInput) Type ¶ added in v0.25.0
func (TranslationImportRunInput) Type() string
func (TranslationImportRunInput) Validate ¶ added in v0.25.0
func (m TranslationImportRunInput) Validate() error
type TranslationImportRunResult ¶ added in v0.25.0
type TranslationImportRunResult struct {
Validate TranslationExchangeResult `json:"validate"`
Apply TranslationExchangeResult `json:"apply"`
}
TranslationImportRunResult captures the optional run-command two-step result.
type TranslationImportRunTriggerBuilder ¶ added in v0.25.0
type TranslationImportRunTriggerBuilder func(context.Context, TranslationImportRunTriggerInput) (TranslationImportRunInput, error)
TranslationImportRunTriggerBuilder resolves scheduled/manual trigger input into a typed run input.
type TranslationImportRunTriggerCommand ¶ added in v0.25.0
type TranslationImportRunTriggerCommand struct {
Schedule string `json:"schedule"`
BuildInput TranslationImportRunTriggerBuilder `json:"build_input"`
}
TranslationImportRunTriggerCommand composes run input and dispatches the run command.
func (*TranslationImportRunTriggerCommand) CronHandler ¶ added in v0.25.0
func (c *TranslationImportRunTriggerCommand) CronHandler() func() error
func (*TranslationImportRunTriggerCommand) CronOptions ¶ added in v0.25.0
func (c *TranslationImportRunTriggerCommand) CronOptions() command.HandlerConfig
func (*TranslationImportRunTriggerCommand) Execute ¶ added in v0.25.0
func (c *TranslationImportRunTriggerCommand) Execute(ctx context.Context, msg TranslationImportRunTriggerInput) error
type TranslationImportRunTriggerInput ¶ added in v0.25.0
type TranslationImportRunTriggerInput struct {
RunInput *TranslationImportRunInput `json:"run_input,omitempty"`
}
TranslationImportRunTriggerInput is a typed trigger message for scheduled imports.
func (TranslationImportRunTriggerInput) Type ¶ added in v0.25.0
func (TranslationImportRunTriggerInput) Type() string
func (TranslationImportRunTriggerInput) Validate ¶ added in v0.25.0
func (m TranslationImportRunTriggerInput) Validate() error
type TranslationImportValidateCommand ¶ added in v0.25.0
type TranslationImportValidateCommand struct {
Service TranslationExchangeValidator `json:"service"`
}
func (*TranslationImportValidateCommand) CLIHandler ¶ added in v0.25.0
func (c *TranslationImportValidateCommand) CLIHandler() any
func (*TranslationImportValidateCommand) CLIOptions ¶ added in v0.25.0
func (c *TranslationImportValidateCommand) CLIOptions() gocommand.CLIConfig
func (*TranslationImportValidateCommand) Execute ¶ added in v0.25.0
func (c *TranslationImportValidateCommand) Execute(ctx context.Context, msg TranslationImportValidateInput) error
type TranslationImportValidateInput ¶ added in v0.25.0
type TranslationImportValidateInput struct {
Rows []TranslationExchangeRow `json:"rows"`
Result *TranslationExchangeResult `json:"-"`
}
TranslationImportValidateInput is the typed import-validate command input.
func (TranslationImportValidateInput) Type ¶ added in v0.25.0
func (TranslationImportValidateInput) Type() string
func (TranslationImportValidateInput) Validate ¶ added in v0.25.0
func (m TranslationImportValidateInput) Validate() error
type TranslationLinkWidgetPayload ¶ added in v0.25.0
type TranslationMeta ¶ added in v0.24.0
type TranslationMeta = cmsinterfaces.TranslationMeta
TranslationMeta mirrors the go-cms translation metadata contract.
type TranslationMetrics ¶ added in v0.25.0
type TranslationMetrics interface {
IncrementBlockedTransition(ctx context.Context, tags map[string]string)
IncrementCreateAction(ctx context.Context, tags map[string]string)
IncrementCreateLocaleAction(ctx context.Context, tags map[string]string)
IncrementReviewAction(ctx context.Context, tags map[string]string)
IncrementQAOutcome(ctx context.Context, tags map[string]string)
}
TranslationMetrics captures counters for translation workflow observability.
type TranslationPolicy ¶ added in v0.24.0
type TranslationPolicy interface {
Validate(ctx context.Context, input TranslationPolicyInput) error
}
TranslationPolicy validates workflow transitions against translation requirements.
type TranslationPolicyFunc ¶ added in v0.24.0
type TranslationPolicyFunc func(context.Context, TranslationPolicyInput) error
TranslationPolicyFunc adapts a function into a TranslationPolicy.
func (TranslationPolicyFunc) Validate ¶ added in v0.24.0
func (fn TranslationPolicyFunc) Validate(ctx context.Context, input TranslationPolicyInput) error
Validate executes the policy function.
type TranslationPolicyInput ¶ added in v0.24.0
type TranslationPolicyInput struct {
EntityType string `json:"entity_type"`
EntityID string `json:"entity_id"`
Transition string `json:"transition"`
Environment string `json:"environment"`
State string `json:"state"`
PolicyEntity string `json:"policy_entity"`
RequestedLocale string `json:"requested_locale"`
}
TranslationPolicyInput captures workflow context needed for translation checks.
type TranslationProgressWidgetPayload ¶ added in v0.25.0
type TranslationProgressWidgetPayload struct {
Summary TranslationSummaryWidgetPayload `json:"summary"`
StatusCounts map[string]int `json:"status_counts"`
LocaleCounts map[string]int `json:"locale_counts"`
UpdatedAt string `json:"updated_at"`
// UpdatedAtLabel is a human-readable rendering of UpdatedAt for templates
// without client-side relative-time enhancement.
UpdatedAtLabel string `json:"updated_at_label,omitempty"`
Links []TranslationLinkWidgetPayload `json:"links"`
}
type TranslationQueueApproveCommand ¶ added in v0.25.0
type TranslationQueueApproveCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueApproveCommand dispatches approve lifecycle actions.
func (*TranslationQueueApproveCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueApproveCommand) Execute(ctx context.Context, msg TranslationQueueApproveInput) error
type TranslationQueueApproveInput ¶ added in v0.25.0
type TranslationQueueApproveInput struct {
AssignmentID string `json:"assignment_id"`
ReviewerID string `json:"reviewer_id"`
Comment string `json:"comment,omitempty"`
TerminologyNotes []string `json:"terminology_notes,omitempty"`
StyleNotes []string `json:"style_notes,omitempty"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueApproveInput approves a review item.
func (TranslationQueueApproveInput) Type ¶ added in v0.25.0
func (TranslationQueueApproveInput) Type() string
func (TranslationQueueApproveInput) Validate ¶ added in v0.25.0
func (m TranslationQueueApproveInput) Validate() error
type TranslationQueueArchiveCommand ¶ added in v0.25.0
type TranslationQueueArchiveCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueArchiveCommand dispatches archive lifecycle actions.
func (*TranslationQueueArchiveCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueArchiveCommand) Execute(ctx context.Context, msg TranslationQueueArchiveInput) error
type TranslationQueueArchiveInput ¶ added in v0.25.0
type TranslationQueueArchiveInput struct {
AssignmentID string `json:"assignment_id"`
ActorID string `json:"actor_id"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueArchiveInput archives a queue assignment.
func (TranslationQueueArchiveInput) Type ¶ added in v0.25.0
func (TranslationQueueArchiveInput) Type() string
func (TranslationQueueArchiveInput) Validate ¶ added in v0.25.0
func (m TranslationQueueArchiveInput) Validate() error
type TranslationQueueAssignCommand ¶ added in v0.25.0
type TranslationQueueAssignCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueAssignCommand dispatches assign lifecycle actions.
func (*TranslationQueueAssignCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueAssignCommand) Execute(ctx context.Context, msg TranslationQueueAssignInput) error
type TranslationQueueAssignInput ¶ added in v0.25.0
type TranslationQueueAssignInput struct {
AssignmentID string `json:"assignment_id"`
AssigneeID string `json:"assignee_id"`
AssignerID string `json:"assigner_id"`
Priority Priority `json:"priority,omitempty"`
DueDate *time.Time `json:"due_date,omitempty"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueAssignInput assigns an item to a translator.
func (TranslationQueueAssignInput) Type ¶ added in v0.25.0
func (TranslationQueueAssignInput) Type() string
func (TranslationQueueAssignInput) Validate ¶ added in v0.25.0
func (m TranslationQueueAssignInput) Validate() error
type TranslationQueueAutoCreateHook ¶ added in v0.25.0
type TranslationQueueAutoCreateHook interface {
// OnTranslationBlocker is called when a workflow transition is blocked
// due to missing required translations. It creates or reuses queue assignments
// for each missing locale. This is a side-effect hook that must not alter
// the primary policy response - errors are logged but not returned.
OnTranslationBlocker(ctx context.Context, input TranslationQueueAutoCreateInput) TranslationQueueAutoCreateResult
}
TranslationQueueAutoCreateHook handles automatic queue item creation when translation policy blocks a transition due to missing locales.
type TranslationQueueAutoCreateInput ¶ added in v0.25.0
type TranslationQueueAutoCreateInput struct {
FamilyID string `json:"family_id"`
EntityType string `json:"entity_type"`
EntityID string `json:"entity_id"`
SourceLocale string `json:"source_locale"`
MissingLocales []string `json:"missing_locales"`
Transition string `json:"transition"`
Environment string `json:"environment"`
SourceTitle string `json:"source_title"`
SourcePath string `json:"source_path"`
ActorID string `json:"actor_id"`
Priority Priority `json:"priority"`
}
TranslationQueueAutoCreateInput captures the context needed to create queue items.
type TranslationQueueAutoCreateResult ¶ added in v0.25.0
type TranslationQueueAutoCreateResult struct {
Created int `json:"created"`
Reused int `json:"reused"`
Failed int `json:"failed"`
Errors []error `json:"errors"`
Assignments []TranslationAssignment `json:"assignments"`
}
TranslationQueueAutoCreateResult captures the outcome of auto-create operations.
type TranslationQueueBulkArchiveCommand ¶ added in v0.25.0
type TranslationQueueBulkArchiveCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueBulkArchiveCommand dispatches bulk-archive lifecycle actions.
func (*TranslationQueueBulkArchiveCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueBulkArchiveCommand) Execute(ctx context.Context, msg TranslationQueueBulkArchiveInput) error
type TranslationQueueBulkArchiveInput ¶ added in v0.25.0
type TranslationQueueBulkArchiveInput struct {
AssignmentIDs []string `json:"assignment_ids"`
ActorID string `json:"actor_id"`
Result *[]TranslationAssignment `json:"-"`
}
TranslationQueueBulkArchiveInput bulk-archives queue items.
func (TranslationQueueBulkArchiveInput) Type ¶ added in v0.25.0
func (TranslationQueueBulkArchiveInput) Type() string
func (TranslationQueueBulkArchiveInput) Validate ¶ added in v0.25.0
func (m TranslationQueueBulkArchiveInput) Validate() error
type TranslationQueueBulkAssignCommand ¶ added in v0.25.0
type TranslationQueueBulkAssignCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueBulkAssignCommand dispatches bulk-assign lifecycle actions.
func (*TranslationQueueBulkAssignCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueBulkAssignCommand) Execute(ctx context.Context, msg TranslationQueueBulkAssignInput) error
type TranslationQueueBulkAssignInput ¶ added in v0.25.0
type TranslationQueueBulkAssignInput struct {
AssignmentIDs []string `json:"assignment_ids"`
AssigneeID string `json:"assignee_id"`
AssignerID string `json:"assigner_id"`
Priority Priority `json:"priority,omitempty"`
DueDate *time.Time `json:"due_date,omitempty"`
Result *[]TranslationAssignment `json:"-"`
}
TranslationQueueBulkAssignInput bulk-assigns queue items.
func (TranslationQueueBulkAssignInput) Type ¶ added in v0.25.0
func (TranslationQueueBulkAssignInput) Type() string
func (TranslationQueueBulkAssignInput) Validate ¶ added in v0.25.0
func (m TranslationQueueBulkAssignInput) Validate() error
type TranslationQueueBulkPriorityCommand ¶ added in v0.25.0
type TranslationQueueBulkPriorityCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueBulkPriorityCommand dispatches bulk-priority lifecycle actions.
func (*TranslationQueueBulkPriorityCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueBulkPriorityCommand) Execute(ctx context.Context, msg TranslationQueueBulkPriorityInput) error
type TranslationQueueBulkPriorityInput ¶ added in v0.25.0
type TranslationQueueBulkPriorityInput struct {
AssignmentIDs []string `json:"assignment_ids"`
Priority Priority `json:"priority"`
ActorID string `json:"actor_id"`
Result *[]TranslationAssignment `json:"-"`
}
TranslationQueueBulkPriorityInput bulk-updates priority.
func (TranslationQueueBulkPriorityInput) Type ¶ added in v0.25.0
func (TranslationQueueBulkPriorityInput) Type() string
func (TranslationQueueBulkPriorityInput) Validate ¶ added in v0.25.0
func (m TranslationQueueBulkPriorityInput) Validate() error
type TranslationQueueBulkReleaseCommand ¶ added in v0.25.0
type TranslationQueueBulkReleaseCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueBulkReleaseCommand dispatches bulk-release lifecycle actions.
func (*TranslationQueueBulkReleaseCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueBulkReleaseCommand) Execute(ctx context.Context, msg TranslationQueueBulkReleaseInput) error
type TranslationQueueBulkReleaseInput ¶ added in v0.25.0
type TranslationQueueBulkReleaseInput struct {
AssignmentIDs []string `json:"assignment_ids"`
ActorID string `json:"actor_id"`
Result *[]TranslationAssignment `json:"-"`
}
TranslationQueueBulkReleaseInput bulk-releases queue items.
func (TranslationQueueBulkReleaseInput) Type ¶ added in v0.25.0
func (TranslationQueueBulkReleaseInput) Type() string
func (TranslationQueueBulkReleaseInput) Validate ¶ added in v0.25.0
func (m TranslationQueueBulkReleaseInput) Validate() error
type TranslationQueueClaimCommand ¶ added in v0.25.0
type TranslationQueueClaimCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueClaimCommand dispatches claim lifecycle actions.
func (*TranslationQueueClaimCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueClaimCommand) Execute(ctx context.Context, msg TranslationQueueClaimInput) error
type TranslationQueueClaimInput ¶ added in v0.25.0
type TranslationQueueClaimInput struct {
AssignmentID string `json:"assignment_id"`
ClaimerID string `json:"claimer_id"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueClaimInput claims or starts an assignment in progress.
func (TranslationQueueClaimInput) Type ¶ added in v0.25.0
func (TranslationQueueClaimInput) Type() string
func (TranslationQueueClaimInput) Validate ¶ added in v0.25.0
func (m TranslationQueueClaimInput) Validate() error
type TranslationQueueRejectCommand ¶ added in v0.25.0
type TranslationQueueRejectCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueRejectCommand dispatches reject lifecycle actions.
func (*TranslationQueueRejectCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueRejectCommand) Execute(ctx context.Context, msg TranslationQueueRejectInput) error
type TranslationQueueRejectInput ¶ added in v0.25.0
type TranslationQueueRejectInput struct {
AssignmentID string `json:"assignment_id"`
ReviewerID string `json:"reviewer_id"`
Reason string `json:"reason"`
Comment string `json:"comment,omitempty"`
TerminologyNotes []string `json:"terminology_notes,omitempty"`
StyleNotes []string `json:"style_notes,omitempty"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueRejectInput rejects a review item with required reason.
func (TranslationQueueRejectInput) Type ¶ added in v0.25.0
func (TranslationQueueRejectInput) Type() string
func (TranslationQueueRejectInput) Validate ¶ added in v0.25.0
func (m TranslationQueueRejectInput) Validate() error
type TranslationQueueReleaseCommand ¶ added in v0.25.0
type TranslationQueueReleaseCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueReleaseCommand dispatches release lifecycle actions.
func (*TranslationQueueReleaseCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueReleaseCommand) Execute(ctx context.Context, msg TranslationQueueReleaseInput) error
type TranslationQueueReleaseInput ¶ added in v0.25.0
type TranslationQueueReleaseInput struct {
AssignmentID string `json:"assignment_id"`
ActorID string `json:"actor_id"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueReleaseInput returns an assignment back to open pool.
func (TranslationQueueReleaseInput) Type ¶ added in v0.25.0
func (TranslationQueueReleaseInput) Type() string
func (TranslationQueueReleaseInput) Validate ¶ added in v0.25.0
func (m TranslationQueueReleaseInput) Validate() error
type TranslationQueueService ¶ added in v0.25.0
type TranslationQueueService interface {
Claim(ctx context.Context, input TranslationQueueClaimInput) (TranslationAssignment, error)
Assign(ctx context.Context, input TranslationQueueAssignInput) (TranslationAssignment, error)
Release(ctx context.Context, input TranslationQueueReleaseInput) (TranslationAssignment, error)
SubmitReview(ctx context.Context, input TranslationQueueSubmitInput) (TranslationAssignment, error)
Approve(ctx context.Context, input TranslationQueueApproveInput) (TranslationAssignment, error)
Reject(ctx context.Context, input TranslationQueueRejectInput) (TranslationAssignment, error)
Archive(ctx context.Context, input TranslationQueueArchiveInput) (TranslationAssignment, error)
BulkAssign(ctx context.Context, input TranslationQueueBulkAssignInput) ([]TranslationAssignment, error)
BulkRelease(ctx context.Context, input TranslationQueueBulkReleaseInput) ([]TranslationAssignment, error)
BulkPriority(ctx context.Context, input TranslationQueueBulkPriorityInput) ([]TranslationAssignment, error)
BulkArchive(ctx context.Context, input TranslationQueueBulkArchiveInput) ([]TranslationAssignment, error)
}
TranslationQueueService contains queue lifecycle operations used by command handlers.
type TranslationQueueStatsFromRepository ¶ added in v0.25.0
type TranslationQueueStatsFromRepository struct {
Repository TranslationAssignmentRepository `json:"repository"`
}
TranslationQueueStatsFromRepository computes queue stats from assignment storage.
func (*TranslationQueueStatsFromRepository) Snapshot ¶ added in v0.25.0
func (s *TranslationQueueStatsFromRepository) Snapshot(ctx context.Context) (TranslationQueueStatsSnapshot, error)
type TranslationQueueStatsService ¶ added in v0.25.0
type TranslationQueueStatsService interface {
Snapshot(ctx context.Context) (TranslationQueueStatsSnapshot, error)
}
TranslationQueueStatsService provides aggregate queue metrics for dashboard providers.
type TranslationQueueStatsSnapshot ¶ added in v0.25.0
type TranslationQueueStatsSnapshot struct {
Summary map[string]int `json:"summary"`
StatusCounts map[string]int `json:"status_counts"`
LocaleCounts map[string]int `json:"locale_counts"`
UpdatedAt time.Time `json:"updated_at"`
AssignmentRows int `json:"assignment_rows"`
}
TranslationQueueStatsSnapshot captures queue dashboard aggregate counts.
type TranslationQueueSubmitCommand ¶ added in v0.25.0
type TranslationQueueSubmitCommand struct {
Service TranslationQueueService `json:"service"`
}
TranslationQueueSubmitCommand dispatches submit-review lifecycle actions.
func (*TranslationQueueSubmitCommand) Execute ¶ added in v0.25.0
func (c *TranslationQueueSubmitCommand) Execute(ctx context.Context, msg TranslationQueueSubmitInput) error
type TranslationQueueSubmitInput ¶ added in v0.25.0
type TranslationQueueSubmitInput struct {
AssignmentID string `json:"assignment_id"`
TranslatorID string `json:"translator_id"`
ExpectedVersion int64 `json:"expected_version"`
Result *TranslationAssignment `json:"-"`
}
TranslationQueueSubmitInput submits in-progress work for review.
func (TranslationQueueSubmitInput) Type ¶ added in v0.25.0
func (TranslationQueueSubmitInput) Type() string
func (TranslationQueueSubmitInput) Validate ¶ added in v0.25.0
func (m TranslationQueueSubmitInput) Validate() error
type TranslationQueueUIOptions ¶ added in v0.113.5
type TranslationRequirements ¶ added in v0.24.0
type TranslationRequirements struct {
Locales []string `json:"locales"`
SourceLocale string `json:"source_locale,omitempty"`
RequiredFields map[string][]string `json:"required_fields"`
RequiredFieldsStrategy RequiredFieldsValidationStrategy `json:"required_fields_strategy"`
ReviewRequired bool `json:"review_required"`
AllowPublishOverride bool `json:"allow_publish_override"`
AssignmentLifecycleMode string `json:"assignment_lifecycle_mode"`
DefaultWorkScope string `json:"default_work_scope"`
}
TranslationRequirements captures required locales and optional field checks.
type TranslationRequirementsResolver ¶ added in v0.24.0
type TranslationRequirementsResolver interface {
Requirements(ctx context.Context, input TranslationPolicyInput) (TranslationRequirements, bool, error)
}
TranslationRequirementsResolver resolves translation requirements for a transition.
type TranslationRequirementsResolverFunc ¶ added in v0.24.0
type TranslationRequirementsResolverFunc func(context.Context, TranslationPolicyInput) (TranslationRequirements, bool, error)
TranslationRequirementsResolverFunc adapts a function into a requirements resolver.
func (TranslationRequirementsResolverFunc) Requirements ¶ added in v0.24.0
func (fn TranslationRequirementsResolverFunc) Requirements(ctx context.Context, input TranslationPolicyInput) (TranslationRequirements, bool, error)
Requirements executes the resolver function.
type TranslationSSRPage ¶ added in v0.86.0
type TranslationSSRPage struct {
Surface string `json:"surface"`
Title string `json:"title,omitempty"`
Data map[string]any `json:"data,omitempty"`
Meta map[string]any `json:"meta,omitempty"`
DataGrid map[string]any `json:"datagrid,omitempty"`
Actions map[string]any `json:"actions,omitempty"`
Links map[string]any `json:"links,omitempty"`
Enhancement map[string]any `json:"enhancement,omitempty"`
Assignee map[string]any `json:"assignee,omitempty"`
EmptyState map[string]any `json:"empty_state,omitempty"`
ErrorState map[string]any `json:"error_state,omitempty"`
ResourceName string `json:"resource_name,omitempty"`
}
type TranslationSSRPresenter ¶ added in v0.86.0
type TranslationSSRPresenter interface {
Dashboard(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
FamilyList(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
FamilyDetail(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
FamilyAssignments(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
Queue(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
Editor(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
Matrix(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
Exchange(router.Context, TranslationSSRPresenterInput) (TranslationSSRPage, error)
}
TranslationSSRPresenter is the exported boundary consumed by UI route wiring. It keeps translation SSR hydration owned by admin, where permissions, scope, action-state, lifecycle, and binding contracts already live.
func NewTranslationSSRPresenter ¶ added in v0.86.0
func NewTranslationSSRPresenter(a *Admin) TranslationSSRPresenter
type TranslationSSRPresenterInput ¶ added in v0.86.0
type TranslationSSRPresenterInput struct {
BasePath string
APIBasePath string
DashboardPath string
QueuePath string
FamilyListPath string
FamilyBasePath string
MatrixPath string
ExchangePath string
EditorBasePath string
ContentBasePath string
MatrixAPIPath string
ExchangeAPIPath string
BulkActionAPIPath string
AssignmentID string
FamilyID string
Channel string
Query map[string]string
ExchangeUIConfig TranslationExchangeUIConfig
InitialPresetID string
SyncClientBasePath string
EnhancedAction EnhancedActionRuntimeOptions
QueueUI TranslationQueueUIOptions
}
type TranslationSSRResourceResult ¶ added in v0.86.0
type TranslationSuggestionActionEvaluator ¶ added in v0.110.0
type TranslationSuggestionActionEvaluator interface {
EvaluateTranslationSuggestionAction(context.Context, TranslationSuggestionInput, TranslationSuggestionAssignmentContext) (TranslationSuggestionDecision, error)
}
TranslationSuggestionActionEvaluator can report safe field-level availability without invoking a provider.
type TranslationSuggestionAllowAllEligibility ¶ added in v0.110.0
type TranslationSuggestionAllowAllEligibility struct{}
TranslationSuggestionAllowAllEligibility is an explicit opt-in eligibility checker for tests or hosts that perform policy checks outside this service.
func (TranslationSuggestionAllowAllEligibility) EvaluateTranslationSuggestion ¶ added in v0.110.0
func (TranslationSuggestionAllowAllEligibility) EvaluateTranslationSuggestion(context.Context, TranslationSuggestionInput, TranslationSuggestionAssignmentContext) (TranslationSuggestionDecision, error)
type TranslationSuggestionAssignmentContext ¶ added in v0.110.0
type TranslationSuggestionAssignmentContext struct {
Assignment TranslationAssignment `json:"assignment"`
Environment string `json:"environment,omitempty"`
EntityType string `json:"entity_type,omitempty"`
SourceLocale string `json:"source_locale,omitempty"`
TargetLocale string `json:"target_locale,omitempty"`
SourceFields map[string]string `json:"source_fields,omitempty"`
TargetFields map[string]string `json:"target_fields,omitempty"`
SourceRecordID string `json:"source_record_id,omitempty"`
TargetRecordID string `json:"target_record_id,omitempty"`
SourceVersion string `json:"source_version,omitempty"`
TargetRowVersion int64 `json:"target_row_version,omitempty"`
}
TranslationSuggestionAssignmentContext is the server-loaded editor state needed by the suggestion service. Implementations should populate it from trusted repositories/loaders, not browser payloads.
type TranslationSuggestionAssistContextExtractor ¶ added in v0.110.0
type TranslationSuggestionAssistContextExtractor interface {
TranslationSuggestionAssistContext(context.Context, TranslationSuggestionInput, TranslationSuggestionAssignmentContext) (map[string]any, error)
}
TranslationSuggestionAssistContextExtractor builds glossary/style/TM context that may be sent to the provider after eligibility checks pass.
type TranslationSuggestionContextLoader ¶ added in v0.110.0
type TranslationSuggestionContextLoader interface {
LoadTranslationSuggestionContext(context.Context, TranslationAssignment, string) (TranslationSuggestionAssignmentContext, error)
}
TranslationSuggestionContextLoader reloads assignment/editor state from trusted server-side storage.
func NewTranslationSuggestionContextLoader ¶ added in v0.110.0
func NewTranslationSuggestionContextLoader(adm *Admin) TranslationSuggestionContextLoader
NewTranslationSuggestionContextLoader returns the built-in server-side editor context loader used by the default translation suggestion service.
type TranslationSuggestionDecision ¶ added in v0.110.0
type TranslationSuggestionDecision struct {
Allowed bool `json:"allowed"`
ReasonCode string `json:"reason_code,omitempty"`
Reason string `json:"reason,omitempty"`
Diagnostics map[string]any `json:"diagnostics,omitempty"`
}
TranslationSuggestionDecision describes a safe allow/deny outcome from provider policy, tenant opt-out, quota, and rate-limit checks.
type TranslationSuggestionDependencyConfigurer ¶ added in v0.110.0
type TranslationSuggestionDependencyConfigurer interface {
ConfigureTranslationSuggestionServiceDependencies(TranslationSuggestionServiceDependencies)
}
TranslationSuggestionDependencyConfigurer is implemented by suggestion services that can receive admin/quickstart-owned dependencies after construction. Implementations should only fill unset dependencies.
type TranslationSuggestionEligibilityChecker ¶ added in v0.110.0
type TranslationSuggestionEligibilityChecker interface {
EvaluateTranslationSuggestion(context.Context, TranslationSuggestionInput, TranslationSuggestionAssignmentContext) (TranslationSuggestionDecision, error)
}
TranslationSuggestionEligibilityChecker enforces provider policy, tenant opt-out, data residency, quota, and rate-limit rules before provider calls.
type TranslationSuggestionGenerateCommand ¶ added in v0.110.0
type TranslationSuggestionGenerateCommand struct {
Service TranslationSuggestionService `json:"service"`
}
TranslationSuggestionGenerateCommand dispatches suggestion generation.
func (*TranslationSuggestionGenerateCommand) Execute ¶ added in v0.110.0
func (c *TranslationSuggestionGenerateCommand) Execute(ctx context.Context, msg TranslationSuggestionInput) error
type TranslationSuggestionInput ¶ added in v0.110.0
type TranslationSuggestionInput struct {
AssignmentID string `json:"assignment_id"`
FieldPath string `json:"field_path"`
ActorID string `json:"actor_id,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
Channel string `json:"channel,omitempty"`
Environment string `json:"environment,omitempty"`
RequestID string `json:"request_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
// SourceText is accepted only for compatibility/correlation diagnostics.
// The default service ignores it and reloads source text server-side.
SourceText string `json:"source_text,omitempty"`
Result *TranslationSuggestionResult `json:"-"`
}
TranslationSuggestionInput is the transport-neutral command/service payload for generating a suggestion for one assignment field.
func (TranslationSuggestionInput) Type ¶ added in v0.110.0
func (TranslationSuggestionInput) Type() string
func (TranslationSuggestionInput) Validate ¶ added in v0.110.0
func (m TranslationSuggestionInput) Validate() error
type TranslationSuggestionProvider ¶ added in v0.110.0
type TranslationSuggestionProvider interface {
SuggestTranslation(context.Context, TranslationSuggestionProviderInput) (TranslationSuggestionProviderResult, error)
}
TranslationSuggestionProvider generates suggested text from sanitized input.
type TranslationSuggestionProviderInput ¶ added in v0.110.0
type TranslationSuggestionProviderInput struct {
AssignmentID string `json:"assignment_id"`
FieldPath string `json:"field_path"`
EntityType string `json:"entity_type,omitempty"`
SourceLocale string `json:"source_locale,omitempty"`
TargetLocale string `json:"target_locale,omitempty"`
SourceText string `json:"source_text"`
TargetText string `json:"target_text,omitempty"`
AssistContext map[string]any `json:"assist_context,omitempty"`
ActorID string `json:"actor_id,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrgID string `json:"org_id,omitempty"`
Channel string `json:"channel,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
}
TranslationSuggestionProviderInput is the sanitized provider request built after assignment, scope, permission, policy, quota, and rate-limit checks.
type TranslationSuggestionProviderResult ¶ added in v0.110.0
type TranslationSuggestionProviderResult struct {
Text string `json:"text"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
Diagnostics map[string]any `json:"diagnostics,omitempty"`
}
TranslationSuggestionProviderResult is the provider-facing result before it is normalized into the command response.
type TranslationSuggestionResult ¶ added in v0.110.0
type TranslationSuggestionResult struct {
AssignmentID string `json:"assignment_id"`
FieldPath string `json:"field_path"`
SuggestedText string `json:"suggested_text"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
SourceLocale string `json:"source_locale,omitempty"`
TargetLocale string `json:"target_locale,omitempty"`
Diagnostics map[string]any `json:"diagnostics,omitempty"`
}
TranslationSuggestionResult is safe to return to browser/RPC callers.
type TranslationSuggestionService ¶ added in v0.110.0
type TranslationSuggestionService interface {
SuggestTranslation(context.Context, TranslationSuggestionInput) (TranslationSuggestionResult, error)
}
TranslationSuggestionService contains suggestion generation behavior used by commands and transports.
type TranslationSuggestionServiceDependencies ¶ added in v0.110.0
type TranslationSuggestionServiceDependencies struct {
Repository TranslationAssignmentRepository
ContextLoader TranslationSuggestionContextLoader
Authorizer Authorizer
Permission string
Resource string
Eligibility TranslationSuggestionEligibilityChecker
AssistContext TranslationSuggestionAssistContextExtractor
}
TranslationSuggestionServiceDependencies contains host-owned dependencies that complete a provider-backed suggestion service without duplicating editor context loading logic in each host application.
type TranslationSummaryWidgetPayload ¶ added in v0.25.0
type Translator ¶
type Translator = helpers.Translator
Translator resolves i18n keys into localized strings. Implementations can wrap go-i18n or any translation engine.
type TranslatorAware ¶
type TranslatorAware = modinternal.TranslatorAware
TranslatorAware is implemented by modules that want a translator injected before registration.
type URLConfig ¶ added in v0.21.0
type URLConfig struct {
Admin URLNamespaceConfig `json:"admin"`
Public URLNamespaceConfig `json:"public"`
URLKit *urlkit.Config `json:"url_kit"`
}
URLConfig controls admin URL generation defaults.
type URLNamespaceConfig ¶ added in v0.24.0
type URLNamespaceConfig struct {
BasePath string `json:"base_path"`
APIPrefix string `json:"api_prefix"`
APIVersion string `json:"api_version"`
URLTemplate string `json:"url_template"`
TemplateVars map[string]string `json:"template_vars"`
}
URLNamespaceConfig defines URL defaults for a namespace (admin or public).
type UUIDRoleAssignmentLookup ¶ added in v0.2.0
type UUIDRoleAssignmentLookup struct{}
UUIDRoleAssignmentLookup treats only UUID role IDs as assignable.
func (UUIDRoleAssignmentLookup) IsAssignable ¶ added in v0.2.0
type UserActivateMsg ¶ added in v0.12.0
type UserActivateMsg struct {
IDs []string `json:"i_ds"`
}
UserActivateMsg updates users to active state.
func (UserActivateMsg) Type ¶ added in v0.12.0
func (UserActivateMsg) Type() string
func (UserActivateMsg) Validate ¶ added in v0.12.0
func (m UserActivateMsg) Validate() error
type UserArchiveMsg ¶ added in v0.12.0
type UserArchiveMsg struct {
IDs []string `json:"i_ds"`
}
UserArchiveMsg updates users to archived state.
func (UserArchiveMsg) Type ¶ added in v0.12.0
func (UserArchiveMsg) Type() string
func (UserArchiveMsg) Validate ¶ added in v0.12.0
func (m UserArchiveMsg) Validate() error
type UserBulkAssignRoleMsg ¶ added in v0.25.0
type UserBulkAssignRoleMsg struct {
IDs []string `json:"i_ds"`
RoleID string `json:"role_id"`
Replace bool `json:"replace"`
}
UserBulkAssignRoleMsg assigns a role for multiple users.
func (UserBulkAssignRoleMsg) Type ¶ added in v0.25.0
func (UserBulkAssignRoleMsg) Type() string
func (UserBulkAssignRoleMsg) Validate ¶ added in v0.25.0
func (m UserBulkAssignRoleMsg) Validate() error
type UserBulkUnassignRoleMsg ¶ added in v0.25.0
UserBulkUnassignRoleMsg unassigns a role for multiple users.
func (UserBulkUnassignRoleMsg) Type ¶ added in v0.25.0
func (UserBulkUnassignRoleMsg) Type() string
func (UserBulkUnassignRoleMsg) Validate ¶ added in v0.25.0
func (m UserBulkUnassignRoleMsg) Validate() error
type UserDisableMsg ¶ added in v0.12.0
type UserDisableMsg struct {
IDs []string `json:"i_ds"`
}
UserDisableMsg updates users to disabled state.
func (UserDisableMsg) Type ¶ added in v0.12.0
func (UserDisableMsg) Type() string
func (UserDisableMsg) Validate ¶ added in v0.12.0
func (m UserDisableMsg) Validate() error
type UserManagementModule ¶
type UserManagementModule struct {
// contains filtered or unexported fields
}
UserManagementModule registers user and role management panels and navigation.
func NewUserManagementModule ¶
func NewUserManagementModule(opts ...UserManagementModuleOption) *UserManagementModule
NewUserManagementModule constructs the default user management module.
func (*UserManagementModule) Manifest ¶
func (m *UserManagementModule) Manifest() ModuleManifest
Manifest describes the module metadata.
func (*UserManagementModule) MenuItems ¶
func (m *UserManagementModule) MenuItems(locale string) []MenuItem
MenuItems contributes navigation for users and roles.
func (*UserManagementModule) Register ¶
func (m *UserManagementModule) Register(ctx ModuleContext) error
Register wires the users and roles panels, search adapter, and permissions.
func (*UserManagementModule) RouteContract ¶ added in v0.27.0
func (m *UserManagementModule) RouteContract() routing.ModuleContract
func (*UserManagementModule) WithMenuParent ¶
func (m *UserManagementModule) WithMenuParent(parent string) *UserManagementModule
WithMenuParent nests the module navigation under a parent menu item ID.
type UserManagementModuleOption ¶ added in v0.24.0
type UserManagementModuleOption func(*UserManagementModule)
UserManagementModuleOption configures a UserManagementModule.
func WithAdditionalRolePermissionMatrixResources ¶ added in v0.126.12
func WithAdditionalRolePermissionMatrixResources(resources ...string) UserManagementModuleOption
WithAdditionalRolePermissionMatrixResources appends application resources to the framework's main role permission matrix defaults.
func WithMenuPositions ¶ added in v0.24.0
func WithMenuPositions(usersPos, rolesPos *int) UserManagementModuleOption
WithMenuPositions overrides menu positions for users and roles.
func WithRolePermissionMatrixResources ¶ added in v0.126.12
func WithRolePermissionMatrixResources(resources ...string) UserManagementModuleOption
WithRolePermissionMatrixResources replaces the resources shown by the main role permission matrix. Applications can expose their own permission namespace without changing framework defaults.
func WithRolesPanelConfigurer ¶ added in v0.24.0
func WithRolesPanelConfigurer(fn func(*PanelBuilder) *PanelBuilder) UserManagementModuleOption
WithRolesPanelConfigurer customizes the roles panel builder after defaults are set.
func WithUserMenuParent ¶ added in v0.24.0
func WithUserMenuParent(parent string) UserManagementModuleOption
WithUserMenuParent nests menu items under the provided parent ID.
func WithUserPanelTabs ¶ added in v0.24.0
func WithUserPanelTabs(tabs ...PanelTab) UserManagementModuleOption
WithUserPanelTabs appends tabs to the users panel.
func WithUserProfilesPanel ¶ added in v0.24.0
func WithUserProfilesPanel() UserManagementModuleOption
WithUserProfilesPanel enables the managed user profiles panel.
func WithUserProfilesPanelConfigurer ¶ added in v0.24.0
func WithUserProfilesPanelConfigurer(fn func(*PanelBuilder) *PanelBuilder) UserManagementModuleOption
WithUserProfilesPanelConfigurer customizes the user profiles panel builder when enabled.
func WithUsersPanelConfigurer ¶ added in v0.24.0
func WithUsersPanelConfigurer(fn func(*PanelBuilder) *PanelBuilder) UserManagementModuleOption
WithUsersPanelConfigurer customizes the users panel builder after defaults are set.
type UserManagementService ¶
type UserManagementService struct {
// contains filtered or unexported fields
}
UserManagementService orchestrates user/role management and activity emission.
func NewUserManagementService ¶
func NewUserManagementService(users UserRepository, roles RoleRepository) *UserManagementService
NewUserManagementService constructs a service with the provided repositories or in-memory defaults.
func (*UserManagementService) AssignRole ¶ added in v0.22.0
func (s *UserManagementService) AssignRole(ctx context.Context, userID, roleID string) error
AssignRole assigns a role to a user.
func (*UserManagementService) BulkRoleChange ¶ added in v0.25.0
func (s *UserManagementService) BulkRoleChange(ctx context.Context, req BulkRoleChangeRequest) (BulkRoleChangeResponse, error)
BulkRoleChange applies assign/unassign role mutations for multiple users.
func (*UserManagementService) DeleteRole ¶
func (s *UserManagementService) DeleteRole(ctx context.Context, id string) error
DeleteRole removes a role and related assignments.
func (*UserManagementService) DeleteUser ¶
func (s *UserManagementService) DeleteUser(ctx context.Context, id string) error
DeleteUser removes a user and related assignments.
func (*UserManagementService) GetRole ¶ added in v0.22.0
func (s *UserManagementService) GetRole(ctx context.Context, id string) (RoleRecord, error)
GetRole fetches a role by ID.
func (*UserManagementService) GetUser ¶
func (s *UserManagementService) GetUser(ctx context.Context, id string) (UserRecord, error)
GetUser fetches a user and attached roles.
func (*UserManagementService) ListRoles ¶
func (s *UserManagementService) ListRoles(ctx context.Context, opts ListOptions) ([]RoleRecord, int, error)
ListRoles returns registered roles.
func (*UserManagementService) ListUsers ¶
func (s *UserManagementService) ListUsers(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
ListUsers returns users with role assignments populated.
func (*UserManagementService) RolesForUser ¶ added in v0.22.0
func (s *UserManagementService) RolesForUser(ctx context.Context, userID string) ([]RoleRecord, error)
RolesForUser returns assigned roles for the given user.
func (*UserManagementService) SaveRole ¶
func (s *UserManagementService) SaveRole(ctx context.Context, role RoleRecord) (RoleRecord, error)
SaveRole creates or updates a role.
func (*UserManagementService) SaveUser ¶
func (s *UserManagementService) SaveUser(ctx context.Context, user UserRecord) (UserRecord, error)
SaveUser creates or updates a user and syncs role assignments.
func (*UserManagementService) SearchUsers ¶
func (s *UserManagementService) SearchUsers(ctx context.Context, query string, limit int) ([]UserRecord, error)
SearchUsers performs a keyword search against users.
func (*UserManagementService) TransitionUser ¶
func (s *UserManagementService) TransitionUser(ctx context.Context, id string, status string) (UserRecord, error)
TransitionUser updates the lifecycle state for a user and records activity.
func (*UserManagementService) UnassignRole ¶ added in v0.22.0
func (s *UserManagementService) UnassignRole(ctx context.Context, userID, roleID string) error
UnassignRole removes a role assignment from a user.
func (*UserManagementService) WithActivitySink ¶
func (s *UserManagementService) WithActivitySink(sink ActivitySink)
WithActivitySink wires activity emission for user and role mutations.
func (*UserManagementService) WithRoleAssignmentLookup ¶ added in v0.2.0
func (s *UserManagementService) WithRoleAssignmentLookup(lookup RoleAssignmentLookup) *UserManagementService
WithRoleAssignmentLookup sets the lookup used to validate custom role assignments.
type UserPanelRepository ¶
type UserPanelRepository = genericPanelRepository[UserRecord]
UserPanelRepository adapts UserManagementService to the panel Repository contract.
func NewUserPanelRepository ¶
func NewUserPanelRepository(service *UserManagementService) *UserPanelRepository
NewUserPanelRepository constructs a new panel repository.
type UserPreferences ¶
type UserPreferences struct {
UserID string `json:"user_id,omitempty"`
Theme string `json:"theme,omitempty"`
ThemeVariant string `json:"theme_variant,omitempty"`
DashboardLayout []DashboardWidgetInstance `json:"dashboard_layout,omitempty"`
DashboardPrefs DashboardLayoutOverrides `json:"dashboard_overrides"`
Raw map[string]any `json:"raw,omitempty"`
}
UserPreferences captures persisted preferences along with derived defaults.
type UserProfile ¶
type UserProfile struct {
UserID string `json:"user_id"`
DisplayName string `json:"display_name"`
Email string `json:"email"`
AvatarURL string `json:"avatar_url"`
Locale string `json:"locale"`
Timezone string `json:"timezone"`
Bio string `json:"bio"`
Contact map[string]any `json:"contact"`
Metadata map[string]any `json:"metadata"`
Raw map[string]any `json:"raw"`
}
UserProfile mirrors the go-users profile model using string IDs for admin context.
type UserProfilesPanelRepository ¶ added in v0.24.0
type UserProfilesPanelRepository struct {
// contains filtered or unexported fields
}
UserProfilesPanelRepository adapts ProfileStore to managed user profile panels.
func NewUserProfilesPanelRepository ¶ added in v0.24.0
func NewUserProfilesPanelRepository(users *UserManagementService, profiles ProfileStore, defaultLocale string) *UserProfilesPanelRepository
NewUserProfilesPanelRepository constructs a repository backed by UserManagementService and ProfileStore.
func (*UserProfilesPanelRepository) Create ¶ added in v0.24.0
func (r *UserProfilesPanelRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create adds a user profile.
func (*UserProfilesPanelRepository) Delete ¶ added in v0.24.0
func (r *UserProfilesPanelRepository) Delete(ctx context.Context, id string) error
Delete removes a user profile if supported by the backing store.
func (*UserProfilesPanelRepository) List ¶ added in v0.24.0
func (r *UserProfilesPanelRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns user profiles for managed users.
type UserRecord ¶
type UserRecord struct {
ID string `json:"id"`
Email string `json:"email"`
Username string `json:"username"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Status string `json:"status"`
Role string `json:"role"`
Roles []string `json:"roles"`
RoleDisplay string `json:"role_display"`
RoleLabels []string `json:"role_labels"`
Permissions []string `json:"permissions"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
UserRecord captures the fields managed by the user administration module.
type UserRepository ¶
type UserRepository interface {
List(ctx context.Context, opts ListOptions) ([]UserRecord, int, error)
Get(ctx context.Context, id string) (UserRecord, error)
Create(ctx context.Context, user UserRecord) (UserRecord, error)
Update(ctx context.Context, user UserRecord) (UserRecord, error)
Delete(ctx context.Context, id string) error
Search(ctx context.Context, query string, limit int) ([]UserRecord, error)
}
UserRepository exposes CRUD operations for auth users.
type UserStatsWidgetPayload ¶ added in v0.25.0
type UserSuspendMsg ¶ added in v0.12.0
type UserSuspendMsg struct {
IDs []string `json:"i_ds"`
}
UserSuspendMsg updates users to suspended state.
func (UserSuspendMsg) Type ¶ added in v0.12.0
func (UserSuspendMsg) Type() string
func (UserSuspendMsg) Validate ¶ added in v0.12.0
func (m UserSuspendMsg) Validate() error
type WidgetAreaDefinition ¶
type WidgetAreaDefinition = cmsboot.WidgetAreaDefinition
WidgetAreaDefinition captures CMS widget area metadata.
type WidgetDefinition ¶
type WidgetDefinition = cmsboot.WidgetDefinition
WidgetDefinition captures admin widget metadata.
type WidgetDefinitionRepository ¶
type WidgetDefinitionRepository struct {
// contains filtered or unexported fields
}
WidgetDefinitionRepository manages widget definitions through CMSWidgetService.
func NewWidgetDefinitionRepository ¶
func NewWidgetDefinitionRepository(widgets CMSWidgetService) *WidgetDefinitionRepository
NewWidgetDefinitionRepository builds a widget definition repository.
func (*WidgetDefinitionRepository) Create ¶
func (r *WidgetDefinitionRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create registers a widget definition.
func (*WidgetDefinitionRepository) Delete ¶
func (r *WidgetDefinitionRepository) Delete(ctx context.Context, id string) error
Delete removes a widget definition.
func (*WidgetDefinitionRepository) List ¶
func (r *WidgetDefinitionRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns widget definitions.
type WidgetDefinitionSyncResult ¶ added in v0.52.0
type WidgetDefinitionSyncResult = cmsboot.WidgetDefinitionSyncResult
WidgetDefinitionSyncResult reports the synced definition and resulting status.
type WidgetDefinitionSyncStatus ¶ added in v0.52.0
type WidgetDefinitionSyncStatus = cmsboot.WidgetDefinitionSyncStatus
WidgetDefinitionSyncStatus describes how a definition sync changed persistent state.
type WidgetInstance ¶
type WidgetInstance = cmsboot.WidgetInstance
WidgetInstance links a widget definition to a specific area/page.
type WidgetInstanceFilter ¶
type WidgetInstanceFilter = cmsboot.WidgetInstanceFilter
WidgetInstanceFilter narrows widget instance queries.
type WidgetInstanceRepository ¶
type WidgetInstanceRepository struct {
// contains filtered or unexported fields
}
WidgetInstanceRepository manages widget instances.
func NewWidgetInstanceRepository ¶
func NewWidgetInstanceRepository(widgets CMSWidgetService) *WidgetInstanceRepository
NewWidgetInstanceRepository builds a widget instance repository.
func (*WidgetInstanceRepository) Create ¶
func (r *WidgetInstanceRepository) Create(ctx context.Context, record map[string]any) (map[string]any, error)
Create saves a widget instance.
func (*WidgetInstanceRepository) Delete ¶
func (r *WidgetInstanceRepository) Delete(ctx context.Context, id string) error
Delete removes a widget instance.
func (*WidgetInstanceRepository) List ¶
func (r *WidgetInstanceRepository) List(ctx context.Context, opts ListOptions) ([]map[string]any, int, error)
List returns widget instances filtered by area/page/locale.
type WidgetPayload ¶ added in v0.25.0
type WidgetPayload struct {
// contains filtered or unexported fields
}
WidgetPayload is the canonical widget payload container. Providers must return typed structs (or pointers to structs) wrapped in WidgetPayload.
func EmptyWidgetPayload ¶ added in v0.25.0
func EmptyWidgetPayload() WidgetPayload
EmptyWidgetPayload returns an empty payload object.
func WidgetPayloadOf ¶ added in v0.25.0
func WidgetPayloadOf[T any](value T) WidgetPayload
WidgetPayloadOf wraps a typed payload for dashboard providers.
func (WidgetPayload) Value ¶ added in v0.25.0
func (p WidgetPayload) Value() any
Value returns the wrapped payload value.
type WidgetProvider ¶
type WidgetProvider func(ctx AdminContext, cfg map[string]any) (WidgetPayload, error)
WidgetProvider produces data for a widget given viewer context/config. Providers must return a canonical WidgetPayload.
type WorkflowActionFunc ¶ added in v0.26.0
type WorkflowActionFunc func(context.Context, WorkflowMessage) error
WorkflowActionFunc executes a workflow action.
type WorkflowApplyEventRequest ¶ added in v0.26.0
type WorkflowApplyEventRequest = cmsboot.WorkflowApplyEventRequest
WorkflowApplyEventRequest is the canonical transition envelope.
type WorkflowApplyEventResponse ¶ added in v0.26.0
type WorkflowApplyEventResponse = cmsboot.WorkflowApplyEventResponse
WorkflowApplyEventResponse is the canonical transition response envelope.
type WorkflowAuthoringVersionStore ¶ added in v0.27.0
type WorkflowAuthoringVersionStore interface {
flow.AuthoringStore
ListVersions(ctx context.Context, machineID string, limit int, offset int) ([]*flow.AuthoringMachineRecord, bool, error)
LoadVersion(ctx context.Context, machineID string, version string) (*flow.AuthoringMachineRecord, error)
}
WorkflowAuthoringVersionStore extends flow.AuthoringStore with version-history lookup.
type WorkflowAuthorizer ¶ added in v0.22.0
type WorkflowAuthorizer interface {
CanApplyEvent(ctx context.Context, input WorkflowApplyEventRequest) bool
}
WorkflowAuthorizer optionally guards workflow transitions.
func NewRoleWorkflowAuthorizer ¶ added in v0.24.0
func NewRoleWorkflowAuthorizer(minRole string, opts ...RoleWorkflowAuthorizerOption) WorkflowAuthorizer
NewRoleWorkflowAuthorizer builds a WorkflowAuthorizer enforcing a minimum role with optional checks.
type WorkflowBinding ¶ added in v0.25.0
type WorkflowBinding = workflowcore.WorkflowBinding
type WorkflowBindingConflictError ¶ added in v0.25.0
type WorkflowBindingConflictError = workflowcore.WorkflowBindingConflictError
type WorkflowBindingListOptions ¶ added in v0.25.0
type WorkflowBindingListOptions = workflowcore.WorkflowBindingListOptions
type WorkflowBindingRepository ¶ added in v0.25.0
type WorkflowBindingRepository interface {
List(ctx context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
ListByScope(ctx context.Context, scopeType WorkflowBindingScopeType, scopeRef string, status WorkflowBindingStatus) ([]WorkflowBinding, error)
Get(ctx context.Context, id string) (WorkflowBinding, error)
Create(ctx context.Context, binding WorkflowBinding) (WorkflowBinding, error)
Update(ctx context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
Delete(ctx context.Context, id string) error
}
WorkflowBindingRepository stores workflow scope bindings.
type WorkflowBindingResolution ¶ added in v0.25.0
type WorkflowBindingResolution = workflowcore.WorkflowBindingResolution
type WorkflowBindingResolveInput ¶ added in v0.25.0
type WorkflowBindingResolveInput = workflowcore.WorkflowBindingResolveInput
type WorkflowBindingScopeType ¶ added in v0.25.0
type WorkflowBindingScopeType = workflowcore.WorkflowBindingScopeType
WorkflowBindingScopeType identifies where a binding applies.
type WorkflowBindingStatus ¶ added in v0.25.0
type WorkflowBindingStatus = workflowcore.WorkflowBindingStatus
WorkflowBindingStatus controls whether a binding participates in resolution.
type WorkflowBindingVersionConflictError ¶ added in v0.25.0
type WorkflowBindingVersionConflictError = workflowcore.WorkflowBindingVersionConflictError
type WorkflowDefinition ¶ added in v0.22.0
type WorkflowDefinition = workflowcore.WorkflowDefinition
WorkflowDefinition describes a state machine for a specific entity type.
type WorkflowDefinitionChecker ¶ added in v0.24.0
WorkflowDefinitionChecker reports whether a workflow exists for an entity type.
type WorkflowDefinitionProvider ¶ added in v0.26.0
type WorkflowDefinitionProvider interface {
WorkflowDefinition(entityType string) (WorkflowDefinition, bool)
}
WorkflowDefinitionProvider exposes registered workflow definitions for introspection.
type WorkflowDefinitionRepository ¶ added in v0.25.0
type WorkflowDefinitionRepository interface {
List(ctx context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
Get(ctx context.Context, id string) (PersistedWorkflow, error)
GetVersion(ctx context.Context, id string, version int) (PersistedWorkflow, error)
Create(ctx context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
Update(ctx context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
}
WorkflowDefinitionRepository stores persisted workflow definitions.
type WorkflowDynamicTargetResolver ¶ added in v0.26.0
type WorkflowDynamicTargetResolver = flow.DynamicTargetResolver[WorkflowMessage]
WorkflowDynamicTargetResolver resolves a workflow dynamic target.
type WorkflowEngine ¶ added in v0.22.0
type WorkflowEngine = cmsboot.WorkflowEngine
WorkflowEngine coordinates lifecycle transitions for domain entities.
type WorkflowExecutionContext ¶ added in v0.26.0
type WorkflowExecutionContext = cmsboot.WorkflowExecutionContext
WorkflowExecutionContext captures workflow actor/tenant context.
type WorkflowGuardFunc ¶ added in v0.26.0
type WorkflowGuardFunc = flow.Guard[WorkflowMessage]
WorkflowGuardFunc evaluates a workflow guard.
type WorkflowGuardRejection ¶ added in v0.26.0
type WorkflowGuardRejection = cmsboot.WorkflowGuardRejection
WorkflowGuardRejection captures blocked transition details.
type WorkflowMessage ¶ added in v0.26.0
type WorkflowMessage = cmsboot.WorkflowMessage
WorkflowMessage captures workflow event payload for guards/resolvers/hooks.
type WorkflowRegistrar ¶ added in v0.24.0
type WorkflowRegistrar interface {
RegisterWorkflow(entityType string, definition WorkflowDefinition) error
}
WorkflowRegistrar registers workflow definitions for entity types.
type WorkflowRuntime ¶ added in v0.25.0
type WorkflowRuntime interface {
ListWorkflows(ctx context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
CreateWorkflow(ctx context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
UpdateWorkflow(ctx context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
RollbackWorkflow(ctx context.Context, id string, targetVersion, expectedVersion int) (PersistedWorkflow, error)
ListBindings(ctx context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
CreateBinding(ctx context.Context, binding WorkflowBinding) (WorkflowBinding, error)
UpdateBinding(ctx context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
DeleteBinding(ctx context.Context, id string) error
ResolveBinding(ctx context.Context, input WorkflowBindingResolveInput) (WorkflowBindingResolution, error)
BindWorkflowEngine(engine WorkflowEngine) error
}
WorkflowRuntime exposes persisted workflow definition/binding operations.
type WorkflowRuntimeService ¶ added in v0.25.0
type WorkflowRuntimeService struct {
// contains filtered or unexported fields
}
WorkflowRuntimeService orchestrates persisted workflow definitions + bindings.
func NewWorkflowRuntimeService ¶ added in v0.25.0
func NewWorkflowRuntimeService(workflows WorkflowDefinitionRepository, bindings WorkflowBindingRepository) *WorkflowRuntimeService
NewWorkflowRuntimeService constructs a runtime service (in-memory when nil repos are passed).
func (*WorkflowRuntimeService) AuthoringStore ¶ added in v0.27.0
func (s *WorkflowRuntimeService) AuthoringStore() flow.AuthoringStore
AuthoringStore exposes the canonical authoring persistence backend used by RPC authoring APIs.
func (*WorkflowRuntimeService) BindWorkflowEngine ¶ added in v0.25.0
func (s *WorkflowRuntimeService) BindWorkflowEngine(engine WorkflowEngine) error
func (*WorkflowRuntimeService) CreateBinding ¶ added in v0.25.0
func (s *WorkflowRuntimeService) CreateBinding(ctx context.Context, binding WorkflowBinding) (WorkflowBinding, error)
func (*WorkflowRuntimeService) CreateWorkflow ¶ added in v0.25.0
func (s *WorkflowRuntimeService) CreateWorkflow(ctx context.Context, workflow PersistedWorkflow) (PersistedWorkflow, error)
func (*WorkflowRuntimeService) DeleteBinding ¶ added in v0.25.0
func (s *WorkflowRuntimeService) DeleteBinding(ctx context.Context, id string) error
func (*WorkflowRuntimeService) ListBindings ¶ added in v0.25.0
func (s *WorkflowRuntimeService) ListBindings(ctx context.Context, opts WorkflowBindingListOptions) ([]WorkflowBinding, int, error)
func (*WorkflowRuntimeService) ListWorkflows ¶ added in v0.25.0
func (s *WorkflowRuntimeService) ListWorkflows(ctx context.Context, opts PersistedWorkflowListOptions) ([]PersistedWorkflow, int, error)
func (*WorkflowRuntimeService) ResolveBinding ¶ added in v0.25.0
func (s *WorkflowRuntimeService) ResolveBinding(ctx context.Context, input WorkflowBindingResolveInput) (WorkflowBindingResolution, error)
func (*WorkflowRuntimeService) RollbackWorkflow ¶ added in v0.25.0
func (s *WorkflowRuntimeService) RollbackWorkflow(ctx context.Context, id string, targetVersion, expectedVersion int) (PersistedWorkflow, error)
func (*WorkflowRuntimeService) SetAuthoringStore ¶ added in v0.27.0
func (s *WorkflowRuntimeService) SetAuthoringStore(store flow.AuthoringStore)
SetAuthoringStore overrides the authoring store implementation.
func (*WorkflowRuntimeService) UpdateBinding ¶ added in v0.25.0
func (s *WorkflowRuntimeService) UpdateBinding(ctx context.Context, binding WorkflowBinding, expectedVersion int) (WorkflowBinding, error)
func (*WorkflowRuntimeService) UpdateWorkflow ¶ added in v0.25.0
func (s *WorkflowRuntimeService) UpdateWorkflow(ctx context.Context, workflow PersistedWorkflow, expectedVersion int) (PersistedWorkflow, error)
type WorkflowSnapshot ¶ added in v0.26.0
type WorkflowSnapshot = cmsboot.WorkflowSnapshot
WorkflowSnapshot reports current state and transition availability.
type WorkflowSnapshotRequest ¶ added in v0.26.0
type WorkflowSnapshotRequest = cmsboot.WorkflowSnapshotRequest
WorkflowSnapshotRequest requests workflow snapshot/transition availability.
type WorkflowTransition ¶ added in v0.22.0
type WorkflowTransition = cmsboot.WorkflowTransition
WorkflowTransition declares an allowed transition between two states.
type WorkflowTransitionInfo ¶ added in v0.26.0
type WorkflowTransitionInfo = cmsboot.WorkflowTransitionInfo
WorkflowTransitionInfo describes one transition in snapshot output.
type WorkflowTransitionResult ¶ added in v0.26.0
type WorkflowTransitionResult = cmsboot.WorkflowTransitionResult
WorkflowTransitionResult describes the transition mutation result.
type WorkflowUnregistrar ¶ added in v0.27.0
WorkflowUnregistrar removes workflow definitions for entity types.
type WorkflowValidationErrors ¶ added in v0.25.0
type WorkflowValidationErrors = workflowcore.WorkflowValidationErrors
type WorkflowVersionConflictError ¶ added in v0.25.0
type WorkflowVersionConflictError = workflowcore.WorkflowVersionConflictError
Source Files
¶
- action_contracts.go
- action_diagnostics.go
- action_diagnostics_debug_panel.go
- action_payload_validation.go
- action_response.go
- action_response_helpers.go
- action_state_payload.go
- action_state_reason_codes.go
- action_state_runtime.go
- activity.go
- activity_filter_options.go
- activity_fsm.go
- activity_module.go
- activity_page_enricher.go
- activity_read.go
- activity_resolvers.go
- admin.go
- admin_constructor_runtime.go
- admin_panel_tabs_runtime.go
- admin_schema_runtime.go
- autosave_conflict.go
- block_editor.go
- block_field_types.go
- block_library_picker.go
- boot_adapter.go
- boot_bindings.go
- boot_bindings_dashboard.go
- boot_bindings_icons.go
- boot_bindings_media_notifications_activity_jobs_settings.go
- boot_bindings_navigation_search_bulk.go
- boot_bindings_panel_bulk_preview.go
- boot_bindings_panel_translation_grouping.go
- boot_bindings_workflow_management.go
- bootstrap.go
- browser_csrf.go
- browser_csrf_recovery.go
- bulk.go
- bulk_action_state.go
- cli_config.go
- cli_helpers.go
- cms.go
- cms_adapter_actor_context.go
- cms_adapter_admin_read_mapping.go
- cms_adapter_content_read.go
- cms_adapter_content_runtime.go
- cms_adapter_content_write.go
- cms_adapter_translation_mapping.go
- cms_admin_block_read_service.go
- cms_admin_block_write_service.go
- cms_admin_content_read_service.go
- cms_admin_content_write_service.go
- cms_block_def_filters.go
- cms_blocks.go
- cms_capability_unwrap.go
- cms_channel_context.go
- cms_content_list_options.go
- cms_content_type_compat.go
- cms_demo.go
- cms_gocms_admin_read_adapter.go
- cms_gocms_container.go
- cms_gocms_content_adapter.go
- cms_gocms_contenttype_adapter.go
- cms_gocms_menu_adapter.go
- cms_gocms_translation_adapter.go
- cms_gocms_widget_adapter.go
- cms_memory.go
- cms_page_contract.go
- cms_schema_helpers.go
- cms_workflow.go
- command_bus.go
- command_bus_options.go
- command_catalog.go
- command_execution_policy.go
- command_launcher_debug_panel.go
- command_launcher_formgen.go
- command_messages.go
- command_registration_set.go
- command_run_admin.go
- command_run_compatibility.go
- command_run_diagnostics.go
- command_run_local_transport.go
- command_run_memory_store.go
- command_run_observer.go
- command_run_runtime.go
- command_run_store.go
- command_run_transport.go
- command_run_types.go
- command_runs_debug_panel.go
- config.go
- config_defaults.go
- console_access.go
- console_dashboard.go
- console_debug_access.go
- console_host.go
- console_page.go
- console_transport.go
- content_alias_routes.go
- content_channel_query.go
- content_navigation.go
- content_navigation_routes.go
- content_type_builder_module.go
- content_type_capabilities.go
- content_type_status.go
- context.go
- context_public.go
- dashboard.go
- dashboard_diagnostics.go
- dashboard_godash.go
- dashboard_page_helpers.go
- dashboard_payload.go
- dashboard_renderer.go
- dashboard_router_register.go
- dashboard_widget_payloads.go
- dashboard_widgets.go
- data_module.go
- data_panels.go
- data_registration.go
- debug_browser_state.go
- debug_capture_context.go
- debug_collector.go
- debug_config.go
- debug_integrations.go
- debug_log_bridge.go
- debug_log_normalizer.go
- debug_masker.go
- debug_module.go
- debug_nonce.go
- debug_panel_registry.go
- debug_query_hook.go
- debug_repl_access.go
- debug_repl_app.go
- debug_repl_commands.go
- debug_repl_config.go
- debug_repl_guard.go
- debug_repl_sessions.go
- debug_repl_shell.go
- debug_repl_strategy.go
- debug_response_writer.go
- debug_response_writer_legacy.go
- debug_session.go
- debug_session_activity.go
- debug_transport.go
- debug_user_sessions.go
- debug_view.go
- debug_websocket_reader.go
- deployment_debug_panel.go
- deployment_identity.go
- deployment_persona.go
- deps.go
- doctor.go
- doctor_debug_panel.go
- domain_errors.go
- dynamic_cms_lifecycle.go
- dynamic_panel_factory.go
- enhanced_family_fragments.go
- enhanced_mutation.go
- entity_activity_support.go
- error_codes.go
- error_config.go
- error_context.go
- error_mapping.go
- error_presenter.go
- error_response.go
- error_source.go
- export_integration.go
- export_registrar_binding.go
- feature_catalog.go
- feature_flag_keys.go
- feature_flags_module.go
- feature_gate.go
- feature_gate_accessors.go
- feature_overrides_binding.go
- featuregate_preferences_adapter.go
- features.go
- formgen_helpers.go
- graphql_bootstrap.go
- graphql_delivery_services.go
- graphql_management_services.go
- graphql_service_helpers.go
- http_helpers.go
- icon_renderer.go
- icon_security.go
- icon_service.go
- icons.go
- icons_builtin.go
- icons_contributor.go
- in_memory_entity_ops.go
- in_memory_store_helpers.go
- jobs.go
- layout_view_context.go
- layout_view_context_api.go
- list_predicates.go
- list_records.go
- locale_path_migration.go
- logging.go
- media.go
- media_activity.go
- media_delivery.go
- media_delivery_adapters.go
- media_delivery_range.go
- media_field_types.go
- media_module.go
- media_schema_hints.go
- menu_builder_contracts.go
- menu_builder_errors.go
- menu_builder_routes.go
- menu_builder_service.go
- menu_errors.go
- menu_helpers.go
- menu_integrity.go
- menu_localization.go
- menu_scaffolder.go
- menu_slug.go
- module.go
- modules.go
- modules_staging_router.go
- navigation_doctor.go
- navigation_facade.go
- navigation_lifecycle.go
- normalization_helpers.go
- notification_commands.go
- notification_scope.go
- notifications.go
- notifications_bun.go
- notifications_gonotifications.go
- notifications_runtime.go
- notifications_storage.go
- organizations.go
- page_application_service.go
- panel.go
- panel_action_execution_runtime.go
- panel_action_schema_runtime.go
- panel_action_wiring.go
- panel_crud_runtime.go
- panel_form_adapter.go
- panel_list_capabilities.go
- panel_repository_generic.go
- path_helpers.go
- permission_error.go
- permission_matrix.go
- permission_policy.go
- permission_registry.go
- permissions.go
- permissions_debug_panel.go
- placeholders.go
- preferences.go
- preferences_formgen.go
- preferences_module.go
- preferences_query.go
- preferences_scope.go
- preferences_ui.go
- preview.go
- profile.go
- profile_module.go
- profile_record_codec.go
- public_api.go
- registry.go
- repository_adapter_baseline.go
- repository_adapter_list_query.go
- repository_bun.go
- repository_cms.go
- repository_cms_block_conflicts.go
- repository_cms_blocks.go
- repository_cms_content.go
- repository_cms_content_types.go
- repository_cms_menus_widgets.go
- repository_cms_pages.go
- repository_cms_shared.go
- repository_crud.go
- repository_memory.go
- repository_workflow.go
- repository_workflow_authoring_bun.go
- repository_workflow_bun.go
- ring_buffer.go
- role_assignment_lookup.go
- roles_formgen.go
- route_key_form_support.go
- route_paths.go
- router_iface.go
- router_protection.go
- routing_integration.go
- rpc_command_policy.go
- rpc_transport.go
- rpc_workflow_transport.go
- schema_editor.go
- schema_guardrails.go
- schema_registry.go
- scope_policy.go
- search.go
- search_gosearch.go
- settings.go
- settings_bun_adapter.go
- settings_command.go
- settings_form.go
- settings_options_adapter.go
- site_api_contracts.go
- site_search_contracts.go
- site_url_resolver.go
- sync_request_identity.go
- sync_transport_adapter.go
- tabs.go
- tenants.go
- tenants_module.go
- theme.go
- theme_adapter.go
- theme_manifest.go
- theme_semantic.go
- theme_structural.go
- translation_assignment.go
- translation_assignment_errors.go
- translation_assignment_migrations.go
- translation_assignment_repository.go
- translation_assignment_repository_bun.go
- translation_capabilities.go
- translation_contracts.go
- translation_create_capability.go
- translation_dashboard_binding.go
- translation_dashboard_contracts.go
- translation_datagrid_contracts.go
- translation_draft_sync_store.go
- translation_draft_sync_transport.go
- translation_editor_binding.go
- translation_editor_memory.go
- translation_errors.go
- translation_exchange_async_jobs.go
- translation_exchange_binding.go
- translation_exchange_commands.go
- translation_exchange_contracts.go
- translation_exchange_errors.go
- translation_exchange_factories.go
- translation_exchange_history.go
- translation_exchange_messages.go
- translation_exchange_observability.go
- translation_exchange_runtime.go
- translation_exchange_runtime_store.go
- translation_exchange_runtime_store_bun.go
- translation_exchange_service.go
- translation_exchange_triggers.go
- translation_exchange_types.go
- translation_exchange_ui_config.go
- translation_family_assignment_command.go
- translation_family_binding.go
- translation_family_list_modes.go
- translation_family_store_bun.go
- translation_family_sync.go
- translation_flow_migrations.go
- translation_helpers.go
- translation_matrix_binding.go
- translation_matrix_contracts.go
- translation_observability.go
- translation_permissions.go
- translation_policy.go
- translation_queue_auto_create.go
- translation_queue_binding.go
- translation_queue_commands.go
- translation_queue_contracts.go
- translation_queue_dashboard.go
- translation_queue_factories.go
- translation_queue_messages.go
- translation_queue_panel.go
- translation_queue_service.go
- translation_queue_tabs.go
- translation_readiness.go
- translation_review_qa.go
- translation_runtime_helpers.go
- translation_ssr_presenter.go
- translation_suggestion.go
- translation_suggestion_commands.go
- translation_suggestion_factories.go
- translation_suggestion_service.go
- translation_transport.go
- translation_transport_observability.go
- translator.go
- url_manager.go
- user_commands.go
- users.go
- users_import.go
- users_module.go
- value_helpers.go
- widget_codes.go
- workflow_authorizer.go
- workflow_errors.go
- workflow_fsm.go
- workflow_helpers.go
- workflow_migrations.go
- workflow_persistence_helpers.go
- workflow_runtime_service.go
- workflow_types.go
Directories
¶
| Path | Synopsis |
|---|---|
|
cms
|
|
|
Package commandruntest provides transport-neutral contract tests for go-admin command-run transport implementations.
|
Package commandruntest provides transport-neutral contract tests for go-admin command-run transport implementations. |
|
internal
|
|
|
cmsadapter
Package cmsadapter contains internal CMS adapter helper families that can live outside the top-level admin package without pulling receiver-bound adapter types or admin-only orchestration state with them.
|
Package cmsadapter contains internal CMS adapter helper families that can live outside the top-level admin package without pulling receiver-bound adapter types or admin-only orchestration state with them. |
|
Package txoutbox provides reusable transaction hook and outbox dispatch helpers.
|
Package txoutbox provides reusable transaction hook and outbox dispatch helpers. |