Documentation
¶
Index ¶
- Constants
- func ActivityRouteStep(ctx BootCtx) error
- func ActivityWidgetStep(ctx BootCtx) error
- func BulkStep(ctx BootCtx) error
- func DashboardProvidersStep(ctx BootCtx) error
- func DashboardStep(ctx BootCtx) error
- func ExportRegistrarStep(ctx BootCtx) error
- func FeatureOverridesRouteStep(ctx BootCtx) error
- func HealthStep(ctx BootCtx) error
- func IconsRouteStep(ctx BootCtx) error
- func JobsStep(ctx BootCtx) error
- func MediaStep(ctx BootCtx) error
- func NavigationStep(ctx BootCtx) error
- func NotificationsRouteStep(ctx BootCtx) error
- func NotificationsWidgetStep(ctx BootCtx) error
- func PanelStep(ctx BootCtx) error
- func PrepareStep(ctx BootCtx) error
- func Run(ctx BootCtx, steps ...Step) error
- func SchemaRegistryStep(ctx BootCtx) error
- func SearchStep(ctx BootCtx) error
- func SettingsRouteStep(ctx BootCtx) error
- func SettingsWidgetStep(ctx BootCtx) error
- func TranslationExchangeRouteStep(ctx BootCtx) error
- func TranslationQueueRouteStep(ctx BootCtx) error
- func UserImportRouteStep(ctx BootCtx) error
- func WidgetAreasStep(ctx BootCtx) error
- func WidgetDefinitionsStep(ctx BootCtx) error
- func WorkflowRouteStep(ctx BootCtx) error
- type ActivityBinding
- type BootCtx
- type BulkBinding
- type DashboardBinding
- type ExportRegistrar
- type ExportRouteOptions
- type FeatureGates
- type FeatureOverridesBinding
- type HandlerWrapper
- type IconsBinding
- type JobsBinding
- type ListOptions
- type ListPredicate
- type MediaBinding
- type NavigationBinding
- type NotificationsBinding
- type PanelBinding
- type PanelSubresourceSpec
- type Responder
- type RouteSpec
- type Router
- type SchemaRegistryBinding
- type SearchBinding
- type SettingsBinding
- type Step
- type TranslationExchangeBinding
- type TranslationQueueBinding
- type UserImportBinding
- type WorkflowManagementBinding
Constants ¶
const ( FeatureDashboard = "dashboard" FeatureUsers = "users" FeatureSearch = "search" FeatureExport = "export" FeatureBulk = "bulk" FeatureMedia = "media" FeatureNotifications = "notifications" FeatureJobs = "jobs" FeatureSettings = "settings" FeatureCMS = "cms" FeatureTranslationExchange = "translations.exchange" FeatureTranslationQueue = "translations.queue" )
Variables ¶
This section is empty.
Functions ¶
func ActivityRouteStep ¶
ActivityRouteStep registers activity routes.
func ActivityWidgetStep ¶
ActivityWidgetStep registers the activity dashboard provider.
func DashboardProvidersStep ¶
DashboardProvidersStep registers built-in dashboard providers.
func DashboardStep ¶
DashboardStep registers dashboard routes.
func ExportRegistrarStep ¶
ExportRegistrarStep registers export routes provided by the host registrar.
func FeatureOverridesRouteStep ¶ added in v0.20.0
FeatureOverridesRouteStep registers runtime feature override routes.
func IconsRouteStep ¶ added in v0.25.0
IconsRouteStep registers icon discovery and rendering routes.
func NavigationStep ¶
NavigationStep registers navigation routes.
func NotificationsRouteStep ¶
NotificationsRouteStep registers notifications routes.
func NotificationsWidgetStep ¶
NotificationsWidgetStep registers the notifications dashboard provider.
func PrepareStep ¶
PrepareStep runs any host-provided pre-route initialization.
func SchemaRegistryStep ¶ added in v0.23.0
SchemaRegistryStep registers schema registry routes.
func SettingsRouteStep ¶
SettingsRouteStep registers settings routes.
func SettingsWidgetStep ¶
SettingsWidgetStep registers dashboard providers tied to settings.
func TranslationExchangeRouteStep ¶ added in v0.25.0
TranslationExchangeRouteStep registers translation exchange HTTP routes.
func TranslationQueueRouteStep ¶ added in v0.25.0
TranslationQueueRouteStep registers translation queue aggregate HTTP routes.
func UserImportRouteStep ¶ added in v0.22.0
UserImportRouteStep registers the user import endpoints.
func WidgetAreasStep ¶
WidgetAreasStep registers default dashboard widget areas.
func WidgetDefinitionsStep ¶
WidgetDefinitionsStep registers default widget definitions.
func WorkflowRouteStep ¶ added in v0.25.0
WorkflowRouteStep registers persisted workflow management routes.
Types ¶
type ActivityBinding ¶
ActivityBinding exposes activity operations.
type BootCtx ¶
type BootCtx interface {
Router() Router
AuthWrapper() HandlerWrapper
BasePath() string
AdminAPIGroup() string
URLs() urlkit.Resolver
DefaultLocale() string
Gates() FeatureGates
Responder() Responder
ParseBody(router.Context) (map[string]any, error)
Panels() []PanelBinding
BootDashboard() DashboardBinding
BootSearch() SearchBinding
ExportRegistrar() ExportRegistrar
BootBulk() BulkBinding
BootMedia() MediaBinding
BootUserImport() UserImportBinding
BootTranslationExchange() TranslationExchangeBinding
BootTranslationQueue() TranslationQueueBinding
BootNotifications() NotificationsBinding
BootActivity() ActivityBinding
BootJobs() JobsBinding
BootSettings() SettingsBinding
BootWorkflows() WorkflowManagementBinding
BootSchemaRegistry() SchemaRegistryBinding
BootFeatureOverrides() FeatureOverridesBinding
BootIcons() IconsBinding
SettingsWidget() error
ActivityWidget() error
NotificationsWidget() error
RegisterWidgetAreas() error
RegisterWidgetDefinitions() error
RegisterDashboardProviders() error
}
BootCtx exposes the surface needed by boot steps.
type BulkBinding ¶
type BulkBinding interface {
List(router.Context) (map[string]any, error)
Start(router.Context, map[string]any) (map[string]any, error)
Rollback(router.Context, string, map[string]any) (map[string]any, error)
}
BulkBinding exposes bulk operations.
type DashboardBinding ¶
type DashboardBinding interface {
Enabled() bool
HasRenderer() bool
RenderHTML(router.Context, string) (string, error)
Widgets(router.Context, string) (map[string]any, error)
Preferences(router.Context, string) (map[string]any, error)
SavePreferences(router.Context, map[string]any) (map[string]any, error)
Diagnostics(router.Context, string) (map[string]any, error)
}
DashboardBinding exposes dashboard handlers.
type ExportRegistrar ¶
type ExportRegistrar interface {
Register(Router, ExportRouteOptions) error
}
ExportRegistrar registers export HTTP endpoints on the router.
type ExportRouteOptions ¶
type ExportRouteOptions struct {
BasePath string
Wrap HandlerWrapper
}
ExportRouteOptions configures export route registration.
type FeatureGates ¶
FeatureGates exposes feature checks.
type FeatureOverridesBinding ¶ added in v0.20.0
type FeatureOverridesBinding interface {
List(router.Context) (map[string]any, error)
Set(router.Context, map[string]any) (map[string]any, error)
Unset(router.Context, map[string]any) (map[string]any, error)
}
FeatureOverridesBinding exposes feature override mutations.
type HandlerWrapper ¶
type HandlerWrapper func(router.HandlerFunc) router.HandlerFunc
HandlerWrapper wraps router handlers with auth or middleware.
type IconsBinding ¶ added in v0.25.0
type IconsBinding interface {
// Libraries returns all registered icon libraries.
Libraries(router.Context) (map[string]any, error)
// Library returns a single icon library by ID.
Library(router.Context, string) (map[string]any, error)
// LibraryIcons returns icons from a library, optionally filtered by category.
LibraryIcons(router.Context, string, string) ([]map[string]any, error)
// Search searches icons across libraries.
Search(router.Context, string, int) ([]map[string]any, error)
// Resolve resolves an icon reference to its definition.
Resolve(router.Context, string) (map[string]any, error)
// Render renders an icon to HTML.
Render(router.Context, string, string) (map[string]any, error)
}
IconsBinding exposes icon library and icon operations.
type JobsBinding ¶
type JobsBinding interface {
List(router.Context) (map[string]any, error)
Trigger(router.Context, map[string]any) error
}
JobsBinding exposes job operations.
type ListOptions ¶
type ListOptions struct {
Page int
PerPage int
SortBy string
SortDesc bool
Filters map[string]any
Predicates []ListPredicate
Search string
}
ListOptions holds pagination and filtering input for bindings.
type ListPredicate ¶ added in v0.24.0
ListPredicate defines an operator-aware list filter predicate for boot bindings.
type MediaBinding ¶
type MediaBinding interface {
List(router.Context) (map[string]any, error)
Add(router.Context, map[string]any) (any, error)
}
MediaBinding exposes media operations.
type NavigationBinding ¶
type NavigationBinding interface {
}
NavigationBinding exposes navigation resolution.
type NotificationsBinding ¶
type NotificationsBinding interface {
List(router.Context) (map[string]any, error)
Mark(router.Context, map[string]any) error
}
NotificationsBinding exposes notifications operations.
type PanelBinding ¶
type PanelBinding interface {
Name() string
List(router.Context, string, ListOptions) ([]map[string]any, int, any, any, error)
Detail(router.Context, string, string) (map[string]any, error)
Create(router.Context, string, map[string]any) (map[string]any, error)
Update(router.Context, string, string, map[string]any) (map[string]any, error)
Delete(router.Context, string, string) error
Action(router.Context, string, string, map[string]any) (map[string]any, error)
Bulk(router.Context, string, string, map[string]any) (map[string]any, error)
Preview(router.Context, string, string) (map[string]any, error)
Subresources() []PanelSubresourceSpec
HandleSubresource(router.Context, string, string, string, string) error
}
PanelBinding exposes panel CRUD/action handlers for routes.
type PanelSubresourceSpec ¶ added in v0.25.0
PanelSubresourceSpec declares an additional panel-owned route.
type Responder ¶
type Responder interface {
WriteJSON(router.Context, any) error
WriteHTML(router.Context, string) error
WriteError(router.Context, error) error
}
Responder centralizes response helpers.
type RouteSpec ¶
type RouteSpec struct {
Method string
Path string
Handler router.HandlerFunc
}
RouteSpec describes a route to register.
type Router ¶
type Router interface {
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
}
Router is the minimal router surface needed for boot steps.
type SchemaRegistryBinding ¶ added in v0.23.0
type SchemaRegistryBinding interface {
List(router.Context) (any, error)
Get(router.Context, string) (any, error)
}
SchemaRegistryBinding exposes schema registry payloads for UI consumers.
type SearchBinding ¶
SearchBinding exposes search queries.
type SettingsBinding ¶
type SettingsBinding interface {
Values(router.Context) (map[string]any, error)
Form(router.Context) (any, error)
Save(router.Context, map[string]any) (map[string]any, error)
}
SettingsBinding exposes settings operations.
type Step ¶
Step is a boot step executed during admin initialization.
func DefaultBootSteps ¶
func DefaultBootSteps() []Step
DefaultBootSteps returns the built-in boot pipeline in registration order.
type TranslationExchangeBinding ¶ added in v0.25.0
type TranslationExchangeBinding interface {
Export(router.Context) (any, error)
Template(router.Context) error
ImportValidate(router.Context) (any, error)
ImportApply(router.Context) (any, error)
JobStatus(router.Context, string) (any, error)
}
TranslationExchangeBinding exposes translation exchange transport operations.
type TranslationQueueBinding ¶ added in v0.25.0
type TranslationQueueBinding interface {
MyWork(router.Context) (any, error)
Queue(router.Context) (any, error)
EntityTypesOptions(router.Context) (any, error)
SourceRecordsOptions(router.Context) (any, error)
LocalesOptions(router.Context) (any, error)
TranslationGroupsOptions(router.Context) (any, error)
AssigneesOptions(router.Context) (any, error)
}
TranslationQueueBinding exposes translation queue aggregate transport operations.
type UserImportBinding ¶ added in v0.22.0
type UserImportBinding interface {
ImportUsers(router.Context) error
ImportTemplate(router.Context) error
}
UserImportBinding exposes user import operations.
type WorkflowManagementBinding ¶ added in v0.25.0
type WorkflowManagementBinding interface {
ListWorkflows(router.Context) (map[string]any, error)
CreateWorkflow(router.Context, map[string]any) (map[string]any, error)
UpdateWorkflow(router.Context, string, map[string]any) (map[string]any, error)
ListBindings(router.Context) (map[string]any, error)
CreateBinding(router.Context, map[string]any) (map[string]any, error)
UpdateBinding(router.Context, string, map[string]any) (map[string]any, error)
DeleteBinding(router.Context, string) error
}
WorkflowManagementBinding exposes persisted workflow + binding management operations.
Source Files
¶
- default_steps.go
- route_helpers.go
- run.go
- step_activity_routes.go
- step_activity_widget.go
- step_bulk.go
- step_dashboard.go
- step_dashboard_providers.go
- step_export_registrar.go
- step_feature_overrides.go
- step_health.go
- step_icons_routes.go
- step_jobs.go
- step_media.go
- step_navigation.go
- step_notifications_routes.go
- step_notifications_widget.go
- step_panels.go
- step_prepare.go
- step_schema_registry.go
- step_search.go
- step_settings_routes.go
- step_settings_widget.go
- step_translation_exchange.go
- step_translation_queue.go
- step_user_import.go
- step_widget_areas.go
- step_widget_definitions.go
- step_workflows.go
- types.go