Versions in this module Expand all Collapse all v1 v1.0.0 Feb 10, 2024 Changes in this version + func CatchFatalErrors() + func ConfigRegisterScriptEngineBuilder(engineName string, builder ScriptEngineBuilder) + func DeclareBackgroundTaskEnded() + func DeclareBackgroundTaskStarted() + func DynamicCallFunction(toCall any, callArgs []reflect.Value) (result []reflect.Value, errorMsg string) + func EndOfAllBackgroundTasks() + func ExecuteScriptContent(scriptContent, scriptOrigin string, scriptEngine ScriptEngine) + func ForEachScriptEngine(f func(engine ScriptEngine)) + func ForceExitingVM() + func GoStringToQuotedString2(value string) string + func LogScriptError(error *ScriptErrorMessage) + func OnUnCatchScriptError(error *ScriptErrorMessage) + func PauseMs(timeInMs int) + func ReflectValueToAny(resV reflect.Value) any + func SafeGoRoutine(f func()) + func SetErrorTranslator(handler ErrorTranslatorF) + type DisposeSharedResourceF func(value any) + type EmbeddedFile struct + FS embed.FS + InnerPath string + func (m *EmbeddedFile) Read() ([]byte, error) + type ErrorTranslatorF func(error *ScriptErrorMessage) + type FunctionGroup struct + func (m *FunctionGroup) AddAsyncFunction(jsName string, goFunctionName string, jsFunction any) + func (m *FunctionGroup) AddFunction(javascriptName string, goFunctionName string, goFunctionRef any) + type FunctionModule struct + func (m *FunctionModule) AddAsyncFunction(jsName string, goFunctionName string, jsFunction any) + func (m *FunctionModule) AddFunction(javascriptName string, goFunctionName string, goFunctionRef any) + func (m *FunctionModule) DeclareNodeModule(embedded embed.FS, embeddedDirPath string, modName string) + func (m *FunctionModule) GetFunctionRegistry() *FunctionRegistry + func (m *FunctionModule) ModName() string + func (m *FunctionModule) UseCustomGroup(jsGroupName string) *FunctionGroup + func (m *FunctionModule) UseGroupGlobal() *FunctionGroup + type FunctionRegistry struct + func GetFunctionRegistry() *FunctionRegistry + func (m *FunctionRegistry) EnableDynamicMode(enabled bool) + func (m *FunctionRegistry) GetAllFunctions(sortList bool) []*RegisteredFunction + func (m *FunctionRegistry) GetEmbeddedModulesTSX() map[string]EmbeddedFile + func (m *FunctionRegistry) GetNamespaces() map[string]bool + func (m *FunctionRegistry) GetRefToFunction(jsFunctionName string) *RegisteredFunction + func (m *FunctionRegistry) IsUsingDynamicMode() bool + func (m *FunctionRegistry) UseGoNamespace(goNamespace string) *FunctionModule + type ParsedGoFunction struct + CallParamNamespaces []string + GeneratorUniqName string + GoFunctionName string + JsFunctionName string + JsGroupName string + ParamTypeRefs []reflect.Type + ParamTypes []string + ReturnErrorOffset int + ReturnType string + func ParseGoFunction(fct *RegisteredFunction) (ParsedGoFunction, error) + func (m *ParsedGoFunction) GetGoFunctionName() string + func (m *ParsedGoFunction) GetJsFunctionName() string + type RegisteredFunction struct + GoFunctionFullName string + GoFunctionInfos ParsedGoFunction + GoFunctionName string + GoFunctionRef any + Group string + IsAsync bool + JsFunctionName string + type ScriptCallback func(error *ScriptErrorMessage) + type ScriptEngine interface + DisarmError func(error *ScriptErrorMessage) + ExecuteScript func(scriptContent string, compiledFilePath string) *ScriptErrorMessage + GetEngineLanguage func() string + GetEngineName func() string + GetInternalEngineVersion func() string + Shutdown func() + Start func() + WaitDebuggerReady func() + func GetScriptEngine(engineName string) ScriptEngine + type ScriptEngineBuilder = func() ScriptEngine + type ScriptErrorMessage struct + EndColumn int + EndPosition int + Error string + ErrorLevel int + ScriptEngine ScriptEngine + ScriptPath string + SourceMapUrl string + StackTraceFrameCount int + StackTraceFrames []StackTraceFrame + StartColumn int + StartPosition int + func (m *ScriptErrorMessage) DisarmError() + func (m *ScriptErrorMessage) Print() + func (m *ScriptErrorMessage) StackTrace() string + func (m *ScriptErrorMessage) Translate() + type ScriptExecResult struct + GoError error + ScriptError *ScriptErrorMessage + func (m *ScriptExecResult) HasError() bool + func (m *ScriptExecResult) PrintError() bool + type ScriptFunction interface + CallWithArrayBuffer func(buffer []byte) + CallWithBool func(value bool) + CallWithDouble func(value float64) + CallWithError func(err error) + CallWithResource func(value *SharedResource) + CallWithString func(value string) + CallWithStringBuffer func(value []byte) + CallWithUndefined func() + KeepAlive func() + type SharedResource struct + Value any + func GetSharedResource(id int) *SharedResource + func NewSharedResource(value any, onDispose DisposeSharedResourceF) *SharedResource + func (m *SharedResource) Dispose() + func (m *SharedResource) GetId() int + type StackTraceFrame struct + Column int + Function string + Line int + Source string + type StringBuffer []byte + type TaskQueue struct + func NewTaskQueue() *TaskQueue + func (m *TaskQueue) Dispose() + func (m *TaskQueue) IsDisposed() bool + func (m *TaskQueue) Push(f func()) + type V8ScriptCallback func(result ScriptExecResult) Other modules containing this package github.com/progpjs/progpAPI/v2