Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSupportedLanguages ¶
func GetSupportedLanguages() []string
GetSupportedLanguages returns a list of all supported languages
Types ¶
type Executor ¶
type Executor interface {
// Execute runs the script in the given runtime context
Execute(ctx context.Context, script string, runtime *runtime.Context) error
// Language returns the language identifier for this executor
Language() string
// ValidateScript performs static validation of the script
ValidateScript(script string) error
}
Executor defines the interface for all script language executors
func NewExecutor ¶
NewExecutor creates a new executor for the specified language
type JavaScriptExecutor ¶
type JavaScriptExecutor struct{}
JavaScriptExecutor executes JavaScript code using the goja engine
func NewJavaScriptExecutor ¶
func NewJavaScriptExecutor() *JavaScriptExecutor
NewJavaScriptExecutor creates a new JavaScript executor
func (*JavaScriptExecutor) Execute ¶
func (e *JavaScriptExecutor) Execute(ctx context.Context, script string, rtCtx *runtime.Context) error
Execute runs the JavaScript code in the provided runtime context
func (*JavaScriptExecutor) Language ¶
func (e *JavaScriptExecutor) Language() string
Language returns the language identifier
func (*JavaScriptExecutor) ValidateScript ¶
func (e *JavaScriptExecutor) ValidateScript(script string) error
ValidateScript performs static validation of JavaScript code
type ShellExecutor ¶
type ShellExecutor struct{}
ShellExecutor executes shell scripts using bash/sh
func NewShellExecutor ¶
func NewShellExecutor() *ShellExecutor
NewShellExecutor creates a new shell executor
func (*ShellExecutor) Language ¶
func (s *ShellExecutor) Language() string
Language returns the language identifier
func (*ShellExecutor) ValidateScript ¶
func (s *ShellExecutor) ValidateScript(script string) error
ValidateScript performs basic validation on the shell script