core

package
v0.8.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: AGPL-3.0 Imports: 11 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) 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) Detached

func (c Core) Detached() bool

func (Core) DoorID

func (c Core) DoorID() uint64

func (Core) InstanceEnd

func (c Core) InstanceEnd()

func (Core) InstanceID

func (c Core) InstanceID() string

func (Core) License

func (c Core) License() license.License

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

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
}

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
	Detached() bool
	NewID() uint64
	NewLink(any) (Link, error)
	Runtime() shredder.Runtime
	License() license.License
	SetStatus(int)
	SessionExpire(time.Duration)
	SessionEnd()
	InstanceEnd()
	SessionID() string
}
type Link struct {
	Location *path.Location
	On       func(context.Context)
}

func (*Link) ClickHandler

func (h *Link) ClickHandler() (func(context.Context), bool)

func (*Link) Path

func (h *Link) Path() (string, bool)

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