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 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 SearchStep(ctx BootCtx) error
- func SettingsRouteStep(ctx BootCtx) error
- func SettingsWidgetStep(ctx BootCtx) error
- func WidgetAreasStep(ctx BootCtx) error
- func WidgetDefinitionsStep(ctx BootCtx) error
- type ActivityBinding
- type BootCtx
- type BulkBinding
- type DashboardBinding
- type ExportRegistrar
- type ExportRouteOptions
- type FeatureGates
- type FeatureOverridesBinding
- type HandlerWrapper
- type JobsBinding
- type ListOptions
- type MediaBinding
- type NavigationBinding
- type NotificationsBinding
- type PanelBinding
- type Responder
- type RouteSpec
- type Router
- type SearchBinding
- type SettingsBinding
- type Step
Constants ¶
const ( FeatureDashboard = "dashboard" FeatureSearch = "search" FeatureExport = "export" FeatureBulk = "bulk" FeatureMedia = "media" FeatureNotifications = "notifications" FeatureJobs = "jobs" FeatureSettings = "settings" FeatureCMS = "cms" )
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 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 SettingsRouteStep ¶
SettingsRouteStep registers settings routes.
func SettingsWidgetStep ¶
SettingsWidgetStep registers dashboard providers tied to settings.
func WidgetAreasStep ¶
WidgetAreasStep registers default dashboard widget areas.
func WidgetDefinitionsStep ¶
WidgetDefinitionsStep registers default widget definitions.
Types ¶
type ActivityBinding ¶
ActivityBinding exposes activity operations.
type BootCtx ¶
type BootCtx interface {
Router() Router
AuthWrapper() HandlerWrapper
BasePath() 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
BootNotifications() NotificationsBinding
BootActivity() ActivityBinding
BootJobs() JobsBinding
BootSettings() SettingsBinding
BootFeatureOverrides() FeatureOverridesBinding
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)
}
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 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
Search string
}
ListOptions holds pagination and filtering input for 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) error
Bulk(router.Context, string, string, map[string]any) error
}
PanelBinding exposes panel CRUD/action handlers for routes.
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 SearchBinding ¶
SearchBinding exposes search queries.
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_jobs.go
- step_media.go
- step_navigation.go
- step_notifications_routes.go
- step_notifications_widget.go
- step_panels.go
- step_prepare.go
- step_search.go
- step_settings_routes.go
- step_settings_widget.go
- step_widget_areas.go
- step_widget_definitions.go
- types.go