core

package
v0.12.9 Latest Latest
Warning

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

Go to latest
Published: May 13, 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) CSPCollector

func (c Core) CSPCollector() common.CSPCollector

func (Core) Call added in v0.10.0

func (c Core) Call(ctx context.Context, check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)

func (Core) Cinema

func (c Core) Cinema() beam.Cinema

func (Core) Clean added in v0.12.1

func (c Core) Clean(f func())

func (Core) Conf

func (c Core) Conf() *common.Conf

func (Core) Door

func (c Core) Door() Door

func (Core) DoorID

func (c Core) DoorID() uint64

func (Core) Instance

func (c Core) Instance() Instance

func (Core) InstanceEnd

func (c Core) InstanceEnd()

func (Core) InstanceID

func (c Core) InstanceID() string

func (Core) Location added in v0.12.1

func (c Core) Location() beam.Source[path.Location]

func (Core) ModuleRegistry

func (c Core) ModuleRegistry() ModuleRegistry

func (Core) NewID

func (c Core) NewID() uint64

func (Core) PathMaker

func (c Core) PathMaker() path.PathMaker

func (Core) RegisterHook

func (c Core) RegisterHook(onTrigger func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, onCancel func(ctx context.Context)) (Hook, bool)

func (Core) Reload added in v0.9.0

func (c Core) Reload(ctx context.Context)

func (Core) ResourceRegistry

func (c Core) ResourceRegistry() resources.Registry

func (Core) RootCore

func (c Core) RootCore() Core

func (Core) RootID

func (c Core) RootID() uint64

func (Core) Runtime

func (c Core) Runtime() shredder.Runtime

func (Core) SessionEnd

func (c Core) SessionEnd()

func (Core) SessionExpire

func (c Core) SessionExpire(d time.Duration)

func (Core) SessionID

func (c Core) SessionID() string

func (Core) SetStatus

func (c Core) SetStatus(status int)

func (Core) TitleMeta added in v0.12.1

func (c Core) TitleMeta() TitleMeta

func (Core) XReload added in v0.9.0

func (c Core) XReload(ctx context.Context) <-chan error

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
	Store() ctex.Store
	ID() string
	Expire(time.Duration)
	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