core

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core = *core

func NewCore

func NewCore(inst Instance, door Door) Core

func (Core) Adapters

func (c Core) Adapters() path.Adapters

func (Core) CSPCollector

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

func (Core) CallCheck

func (c Core) CallCheck(check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)

func (Core) CallCtx

func (c Core) CallCtx(ctx context.Context, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams) context.CancelFunc

func (Core) Cinema

func (c Core) Cinema() beam.Cinema

func (Core) Conf

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

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) License

func (c Core) License() string

func (Core) ModuleRegistry

func (c Core) ModuleRegistry() ModuleRegistry

func (Core) NewID

func (c Core) NewID() uint64
func (c Core) NewLink(m any) (Link, error)

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) Done, onCancel func(ctx context.Context)) (Hook, bool)

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) UpdateMeta

func (c Core) UpdateMeta(name string, property bool, attrs gox.Attrs)

func (Core) UpdateTitle

func (c Core) UpdateTitle(content string, attrs gox.Attrs)

type Done

type Done = bool

type Door

type Door interface {
	Cinema() beam.Cinema
	RegisterHook(onTrigger func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, onCancel func(ctx context.Context)) (Hook, bool)
	ID() uint64
	RootCore() Core
}

type Hook

type Hook struct {
	DoorID uint64
	HookID uint64
	Cancel context.CancelFunc
}

type Instance

type Instance interface {
	CallCtx(ctx context.Context, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams) context.CancelFunc
	CallCheck(check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)
	CSPCollector() *common.CSPCollector
	ModuleRegistry() ModuleRegistry
	ResourceRegistry() *resources.Registry
	ID() string
	RootID() uint64
	Conf() *common.SystemConf
	NewID() uint64
	NewLink(any) (Link, error)
	Runtime() shredder.Runtime
	License() string
	SetStatus(int)
	SessionExpire(time.Duration)
	SessionEnd()
	InstanceEnd()
	SessionID() string
	Adapters() path.Adapters
	PathMaker() path.PathMaker
	UpdateTitle(content string, attrs gox.Attrs)
	UpdateMeta(name string, property bool, attrs gox.Attrs)
}
type Link struct {
	Location path.Location
	On       func(context.Context)
}

type ModuleRegistry

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

Jump to

Keyboard shortcuts

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