Versions in this module Expand all Collapse all v1 v1.0.0 Sep 19, 2024 Changes in this version + const KernelVfsAppsPath + const KernelVfsCachePath + const KernelVfsTypesPath + const KernelVfsWritablePath + func IsKernelFile(filesystem afero.Fs, name string) bool + type Any interface + type ApiProviderBinder func(kernel Bundle, bundle Bundle, builder ObjectCreator) + type Bundle interface + DeepFreezeObject func(object Object) + Export func(value Value, target interface{}) error + Filesystem func() afero.Fs + FreezeObject func(object Object) + ID func() string + Name func() string + NewException func(err error) Object + NewObject func() Object + NewObjectBuilder func(objectName string) ObjectCreator + NewTypeError func(args ...interface{}) Value + Null func() Value + Privileged func() bool + Privileges func() []string + Sandbox func() Sandbox + SecurityInterceptor func() SecurityInterceptor + Status func() BundleStatus + ToValue func(value interface{}) Value + Undefined func() Value + type BundleFilesystemConfig struct + NewModuleFilesystem func() (afero.Fs, error) + type BundleStatus int + const BundleStatusDownloading + const BundleStatusFailed + const BundleStatusInstalled + const BundleStatusStarted + const BundleStatusStarting + const BundleStatusStopped + const BundleStatusStopping + const BundleStatusUpdating + func (b BundleStatus) String() string + type Callable func(this Value, arguments ...Value) (Value, error) + type CompositeFs struct + func NewCompositeFs(base afero.Fs) *CompositeFs + func (c *CompositeFs) Chmod(name string, mode os.FileMode) error + func (c *CompositeFs) Chown(name string, uid int, gid int) error + func (c *CompositeFs) Chtimes(name string, atime time.Time, mtime time.Time) error + func (c *CompositeFs) Create(name string) (afero.File, error) + func (c *CompositeFs) Mkdir(name string, perm os.FileMode) error + func (c *CompositeFs) MkdirAll(path string, perm os.FileMode) error + func (c *CompositeFs) Mount(mount afero.Fs, path string) error + func (c *CompositeFs) Name() string + func (c *CompositeFs) Open(name string) (afero.File, error) + func (c *CompositeFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) + func (c *CompositeFs) Remove(name string) error + func (c *CompositeFs) RemoveAll(path string) error + func (c *CompositeFs) Rename(oldname, newname string) error + func (c *CompositeFs) Stat(name string) (os.FileInfo, error) + type FunctionCall struct + Arguments []Value + Bundle Bundle + This Value + func (f FunctionCall) Argument(idx int) Value + type Getter func() (value interface{}) + type GoFunction interface + type Kernel interface + Start func(entryPoint string) error + Stop func() error + func New(kernelConfig KernelConfig) (Kernel, error) + type KernelConfig struct + BundleApiProviders []ApiProviderBinder + KernelModules []KernelModule + NewBundleFilesystem func(bundleFilesystemConfig BundleFilesystemConfig) (afero.Fs, error) + NewKernelFilesystem func(baseFilesystem afero.Fs) (afero.Fs, error) + NewSandbox func(bundle Bundle) Sandbox + type KernelModule interface + ID func() string + KernelModuleBinder func() KernelModuleBinder + Name func() string + SecurityInterceptor func() SecurityInterceptor + type KernelModuleBinder func(bundle Bundle, builder ObjectBuilder) + type KernelSyscall func(caller Bundle) interface + type KeyManager interface + GetKey func(fingerprint string) ([]byte, error) + type Module interface + Bundle func() Bundle + ID func() string + IsAccessible func(caller Bundle) error + Name func() string + Origin func() Origin + type NativeFunction func(call FunctionCall) Value + type Object interface + DeepFreeze func() Object + DefineAccessorProperty func(propertyName string, getter Getter, setter Setter) Object + DefineConstant func(constantName string, value interface{}) Object + DefineFunction func(functionName, propertyName string, function NativeFunction) Object + DefineGoFunction func(functionName, propertyName string, function GoFunction) Object + DefineObjectProperty func(objectName string, objectBinder ObjectBinder) Object + DefineSimpleProperty func(propertyName string, value interface{}) Object + Freeze func() Object + Get func(name string) Value + PropertyDescriptor func(name string) PropertyDescriptor + type ObjectBinder func(builder ObjectBuilder) + type ObjectBuilder interface + DefineAccessorProperty func(propertyName string, getter Getter, setter Setter) ObjectBuilder + DefineConstant func(constantName string, value interface{}) ObjectBuilder + DefineFunction func(functionName, propertyName string, function NativeFunction) ObjectBuilder + DefineGoFunction func(functionName, propertyName string, function GoFunction) ObjectBuilder + DefineObjectProperty func(objectName string, objectBinder ObjectBinder) ObjectBuilder + DefineSimpleProperty func(propertyName string, value interface{}) ObjectBuilder + type ObjectCreator interface + Build func() Object + BuildInto func(objectName string, parent Object) + type Origin interface + Filename func() string + FullPath func() string + Path func() string + type Position struct + Col int + Line int + type PropertyDescriptor struct + Configurable PropertyFlag + Enumerable PropertyFlag + Getter Getter + Original interface{} + Setter Setter + Value Value + Writable PropertyFlag + type PropertyFlag uint8 + const Flag_False + const Flag_NotSet + const Flag_True + type ResourceLoader interface + LoadResource func(kernel *kernel, filesystem afero.Fs, filename string) ([]byte, error) + type Sandbox interface + CaptureCallStack func(maxStackFrames int) []StackFrame + Compile func(filename, source string) (script Script, cacheable bool, err error) + Execute func(script Script) (Value, error) + Export func(value Value, target interface{}) error + Global func() Object + IsAccessible func(module Module, caller Bundle) error + NewDebugger func() (interface{}, error) + NewError func(err error) Object + NewModuleProxy func(object Object, objectName string, caller Bundle) (Object, error) + NewNamedNativeFunction func(functionName string, function GoFunction) Value + NewObject func() Object + NewObjectCreator func(objectName string) ObjectCreator + NewTypeError func(args ...interface{}) Object + NullValue func() Value + ToValue func(value interface{}) Value + UndefinedValue func() Value + type Script interface + type SecurityInterceptor func(caller Bundle, property string) (accessGranted bool) + type Setter func(value interface{}) + type StackFrame interface + FuncName func() string + Position func() Position + SrcName func() string + String func() string + type Value interface + Equals func(other Value) bool + Export func() interface{} + ExportType func() reflect.Type + IsArray func() bool + IsDefined func() bool + IsObject func() bool + SameAs func(other Value) bool + StrictEquals func(other Value) bool + String func() string + ToBoolean func() bool + ToFloat func() float64 + ToInteger func() int64 + ToNumber func() Value + ToObject func() Object + ToString func() Value + Unwrap func() interface{}