Documentation
¶
Index ¶
- func AdminLogsHandler(logger *engine.RequestLogger) http.HandlerFunc
- func DocsAPIHandler() http.HandlerFunc
- func DocsHandler() http.HandlerFunc
- func DynamicRouteHandler(jsEngine *engine.Engine) http.HandlerFunc
- func ExecuteREPLHandler(jsEngine *engine.Engine) http.HandlerFunc
- func GetStaticFS() embed.FS
- func HandleDynamicRoute(jsEngine *engine.Engine, w http.ResponseWriter, r *http.Request)
- func HistoryHandler(jsEngine *engine.Engine) http.HandlerFunc
- func HomeHandler() http.HandlerFunc
- func PlaygroundHandler() http.HandlerFunc
- func PresetHandler() http.HandlerFunc
- func REPLHandler() http.HandlerFunc
- func ResetVMHandler(jsEngine *engine.Engine) http.HandlerFunc
- func ScriptsHandler(jsEngine *engine.Engine) http.HandlerFunc
- func SetupAdminRoutes(r *mux.Router, jsEngine *engine.Engine)
- func SetupAdminServerRoutes(jsEngine *engine.Engine) *mux.Router
- func SetupDynamicRoutes(r *mux.Router, jsEngine *engine.Engine)
- func SetupFullServer(jsEngine *engine.Engine) *mux.Router
- func SetupJSRoutes(jsEngine *engine.Engine) *mux.Router
- func SetupRoutes(jsEngine *engine.Engine) *mux.Router
- func SetupRoutesWithAPI(jsEngine *engine.Engine, executeHandler http.HandlerFunc) *mux.Router
- func StaticHandler() http.Handler
- type AdminHandler
- type CodeExample
- type DocInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminLogsHandler ¶
func AdminLogsHandler(logger *engine.RequestLogger) http.HandlerFunc
AdminLogsHandler serves the admin logs page using templ
func DocsAPIHandler ¶
func DocsAPIHandler() http.HandlerFunc
DocsAPIHandler handles requests for documentation and code examples
func DocsHandler ¶
func DocsHandler() http.HandlerFunc
DocsHandler handles documentation page requests
func DynamicRouteHandler ¶
func DynamicRouteHandler(jsEngine *engine.Engine) http.HandlerFunc
DynamicRouteHandler wraps the existing HandleDynamicRoute function
func ExecuteREPLHandler ¶
func ExecuteREPLHandler(jsEngine *engine.Engine) http.HandlerFunc
ExecuteREPLHandler handles REPL execution (non-persistent)
func GetStaticFS ¶
GetStaticFS returns the embedded static filesystem for debugging
func HandleDynamicRoute ¶
HandleDynamicRoute processes requests for JavaScript-registered handlers
func HistoryHandler ¶
func HistoryHandler(jsEngine *engine.Engine) http.HandlerFunc
HistoryHandler serves the execution history page
func PlaygroundHandler ¶
func PlaygroundHandler() http.HandlerFunc
PlaygroundHandler serves the JavaScript playground page
func PresetHandler ¶
func PresetHandler() http.HandlerFunc
PresetHandler returns preset examples as JSON
func ResetVMHandler ¶
func ResetVMHandler(jsEngine *engine.Engine) http.HandlerFunc
ResetVMHandler resets the JavaScript VM state
func ScriptsHandler ¶
func ScriptsHandler(jsEngine *engine.Engine) http.HandlerFunc
ScriptsHandler creates a handler for the script viewer page
func SetupAdminRoutes ¶
SetupAdminRoutes configures all admin routes on the given router
func SetupAdminServerRoutes ¶
SetupAdminServerRoutes sets up routes for the admin/system interface
func SetupDynamicRoutes ¶
SetupDynamicRoutes configures the dynamic JavaScript-handled routes with request logging
func SetupFullServer ¶
SetupFullServer configures a complete server with all routes
func SetupJSRoutes ¶
SetupJSRoutes sets up routes for the JavaScript web server (user-facing)
func SetupRoutes ¶
SetupRoutes sets up the web routes (legacy compatibility)
func SetupRoutesWithAPI ¶
SetupRoutesWithAPI sets up admin routes including the execute API handler
func StaticHandler ¶
StaticHandler serves static files with correct MIME types
Types ¶
type AdminHandler ¶
type AdminHandler struct {
// contains filtered or unexported fields
}
AdminHandler provides admin endpoints for managing the server
func NewAdminHandler ¶
func NewAdminHandler(logger *engine.RequestLogger, repos repository.RepositoryManager, jsEngine *engine.Engine) *AdminHandler
NewAdminHandler creates a new admin handler
func (*AdminHandler) HandleAdminLogs ¶
func (ah *AdminHandler) HandleAdminLogs(w http.ResponseWriter, r *http.Request)
HandleAdminLogs serves the admin logs interface
func (*AdminHandler) HandleGlobalState ¶
func (ah *AdminHandler) HandleGlobalState(w http.ResponseWriter, r *http.Request)
HandleGlobalState serves the globalState interface and API
func (*AdminHandler) HandleStaticFiles ¶
func (ah *AdminHandler) HandleStaticFiles(w http.ResponseWriter, r *http.Request)
HandleStaticFiles serves admin static files
type CodeExample ¶
type CodeExample struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Code string `json:"code"`
Source string `json:"source"` // Which file it came from
Category string `json:"category"` // Type of example
}
CodeExample represents a JavaScript code example extracted from docs