core

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v0.1.3"

Variables

This section is empty.

Functions

func LoadComponentTemplate

func LoadComponentTemplate(templateFs []byte) (string, error)

func RegisterPlugin

func RegisterPlugin(p Plugin)

func SetLogger

func SetLogger(l Logger)

SetLogger allows applications to replace the default logger.

func TriggerMount

func TriggerMount(c Component)

func TriggerRouter

func TriggerRouter(path string)

func TriggerStore

func TriggerStore(module, store, key string, value interface{})

func TriggerTemplate

func TriggerTemplate(componentID, html string)

func TriggerUnmount

func TriggerUnmount(c Component)

Types

type App

type App struct{}

App is a stub holder for callbacks.

func (*App) RegisterLifecycle

func (a *App) RegisterLifecycle(mount, unmount func(Component))

func (*App) RegisterRouter

func (a *App) RegisterRouter(fn func(string))

func (*App) RegisterStore

func (a *App) RegisterStore(fn func(module, store, key string, value interface{}))

func (*App) RegisterTemplate

func (a *App) RegisterTemplate(fn func(componentID, html string))

type Component

type Component interface{}

type Logger

type Logger interface {
	Debug(format string, v ...interface{})
	Info(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Error(format string, v ...interface{})
}

Logger defines logging interface used by the framework.

func Log

func Log() Logger

Log returns the active logger implementation.

type Plugin

type Plugin interface{ Install(*App) }

Plugin is a no-op stub for non-WASM builds.

Jump to

Keyboard shortcuts

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