core

package
v0.12.13 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App added in v0.12.1

type App interface {
	PathMaker() path.PathMaker
	ResourceRegistry() resources.Registry
	Conf() *common.Conf
}

type Core

type Core = *core

func NewCore

func NewCore(door Door) Core

func (Core) App added in v0.12.13

func (c Core) App() App

func (Core) Cinema

func (c Core) Cinema() beam.Cinema

func (Core) Door

func (c Core) Door() Door

func (Core) Instance

func (c Core) Instance() Instance

type Door

type Door interface {
	Instance() Instance
	Cinema() beam.Cinema
	ID() uint64
	RegisterHook(onTrigger func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, onCancel func(ctx context.Context)) (Hook, bool)
	Reload(ctx context.Context)
	XReload(ctx context.Context) <-chan error
	RootCore() Core
	UserCall(ctx context.Context, check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)
	Clean(func())
}

type Hook

type Hook struct {
	HookID uint64
	Cancel context.CancelFunc
}

type Instance

type Instance interface {
	Session() Session
	Store() ctex.Store
	UserCall(ctx context.Context, check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)
	CSPCollector() common.CSPCollector
	ModuleRegistry() ModuleRegistry
	ID() string
	RootID() uint64
	NewID() uint64
	Runtime() shredder.Runtime
	SetStatus(int)
	Location() beam.Source[path.Location]
	Kill()
	TitleMeta() TitleMeta
}

type ModuleRegistry

type ModuleRegistry interface {
	Add(specifier string, path string)
}

type Session added in v0.12.1

type Session interface {
	App() App
	ID() string
	Expire(time.Duration)
	Context() context.Context
	Store() ctex.Store
	Kill()
}

type TitleMeta added in v0.12.1

type TitleMeta interface {
	gox.Editor
	UpdateTitle(value string, attrs gox.Attrs) context.CancelFunc
	UpdateMeta(prop bool, name string, attrs gox.Attrs) context.CancelFunc
}

Jump to

Keyboard shortcuts

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