handlers

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTMLHandler

type HTMLHandler struct {
	// contains filtered or unexported fields
}

func NewHTMLHandler

func NewHTMLHandler(fs filesystem.FileSystem) *HTMLHandler

func (*HTMLHandler) Handle

func (hh *HTMLHandler) Handle(route Route) http.HandlerFunc

type JavaScriptHandler

type JavaScriptHandler struct {
	// contains filtered or unexported fields
}

func NewJavaScriptHandler

func NewJavaScriptHandler(fs filesystem.FileSystem) *JavaScriptHandler

func NewJavaScriptHandlerWithVersion

func NewJavaScriptHandlerWithVersion(fs filesystem.FileSystem, version string) *JavaScriptHandler

func (*JavaScriptHandler) Handle

func (jh *JavaScriptHandler) Handle(route Route) http.HandlerFunc

type MarkdownHandler

type MarkdownHandler struct {
	// contains filtered or unexported fields
}

func NewMarkdownHandler

func NewMarkdownHandler(fs filesystem.FileSystem) *MarkdownHandler

func (*MarkdownHandler) Handle

func (mh *MarkdownHandler) Handle(route Route) http.HandlerFunc

type ResponseObject

type ResponseObject struct {
	StatusCode int
	Headers    map[string]string
	Body       interface{}
}

type Route

type Route struct {
	Path      string
	FilePath  string
	FileType  string
	IsDynamic bool
	ParamName string
}

Route represents a single route in the application

type VMManager added in v0.2.0

type VMManager struct {
	// contains filtered or unexported fields
}

VMManager manages JavaScript VM creation and module initialization

func NewVMManager added in v0.2.0

func NewVMManager(fs filesystem.FileSystem, version string) *VMManager

NewVMManager creates a new VM manager

func (*VMManager) SetupRegistry added in v0.2.0

func (vm *VMManager) SetupRegistry(loop *eventloop.EventLoop, jsVM *js.Runtime, basePath string) (*require.Registry, error)

SetupRegistry creates and configures a require registry with all modules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL