server

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashContent

func HashContent(content string) string

Types

type DevServer

type DevServer struct {
	Router             *router.Router
	RootDir            string
	PagesDir           string
	PublicDir          string
	Port               int
	Bundler            *assets.Bundler
	Compiler           *compiler.ComponentCompiler
	EndpointCompiler   *endpoints.EndpointCompiler
	Verbose            bool
	Lifecycle          *lifecycle.Lifecycle
	MiddlewareCompiler *middleware.MiddlewareCompiler
	LoadedMiddleware   *middleware.LoadedMiddleware
	MiddlewareChain    *middleware.Chain
	HasMiddleware      bool
	UseCodegen         bool
	PageCache          *PageCache
	PluginCompiler     *PluginCompiler
	PluginManager      *plugins.Manager

	HMRServer        *hmr.Server
	ChangeTracker    *hmr.ChangeTracker
	ComponentTracker *hmr.ComponentTracker
	// contains filtered or unexported fields
}

func NewDevServer

func NewDevServer(cfg *config.Config, rootDir, pagesDir, publicDir string, port int, verbose bool) *DevServer

func (*DevServer) ReloadMiddleware

func (s *DevServer) ReloadMiddleware() error

func (*DevServer) ReloadRoutes

func (s *DevServer) ReloadRoutes() error

func (*DevServer) ScheduleCodegenRebuild

func (s *DevServer) ScheduleCodegenRebuild(filePath string)

func (*DevServer) ScheduleCodegenRebuildWithType

func (s *DevServer) ScheduleCodegenRebuildWithType(filePath string, changeType string)

func (*DevServer) Shutdown

func (s *DevServer) Shutdown()

func (*DevServer) Start

func (s *DevServer) Start() error

type PageCache

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

func NewPageCache

func NewPageCache() *PageCache

func (*PageCache) Get

func (c *PageCache) Get(pattern string) (*PagePlugin, bool)

func (*PageCache) Invalidate

func (c *PageCache) Invalidate(pattern string)

func (*PageCache) Set

func (c *PageCache) Set(pattern string, plugin *PagePlugin)

type PagePlugin

type PagePlugin struct {
	Handler         func(http.ResponseWriter, *http.Request, map[string]string, map[string]interface{})
	Template        string
	FrontmatterHash string
	TemplateHash    string
	PluginPath      string
}

type PluginCompiler

type PluginCompiler struct {
	CacheDir    string
	ModuleName  string
	GalaxyPath  string
	ProjectRoot string
}

func NewPluginCompiler

func NewPluginCompiler(cacheDir, moduleName, galaxyPath, projectRoot string) *PluginCompiler

func (*PluginCompiler) CompilePage

func (pc *PluginCompiler) CompilePage(route *router.Route, comp *parser.Component, fmHash string) (*PagePlugin, error)

Jump to

Keyboard shortcuts

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