Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RunnerFactories = map[string]RunnerFactory{ "golang": NewGolangRunner, "python": NewPythonRunner, "java": NewJavaRunner, }
Functions ¶
This section is empty.
Types ¶
type GolangRunner ¶
type GolangRunner struct { }
func (*GolangRunner) CheckRuntime ¶
func (r *GolangRunner) CheckRuntime() error
CheckRuntime checks if the Go runtime environment is installed and accessible
type JavaRunner ¶
type JavaRunner struct { }
func (*JavaRunner) CheckRuntime ¶
func (r *JavaRunner) CheckRuntime() error
CheckRuntime checks if the Java runtime environment is installed and accessible
type PythonRunner ¶
type PythonRunner struct { }
func (*PythonRunner) CheckRuntime ¶
func (r *PythonRunner) CheckRuntime() error
CheckRuntime checks if the Python runtime environment is installed and accessible
type Runner ¶
type Runner interface { // CheckRuntime check program language runtime CheckRuntime() error // Run execute code // for example: go run code 1 2 3 Run(code string, args []string) (string, error) }
func NewGolangRunner ¶
func NewGolangRunner() Runner
NewGolangRunner creates a new instance of GolangRunner
func NewPythonRunner ¶
func NewPythonRunner() Runner
NewPythonRunner creates a new instance of PythonRunner
type RunnerFactory ¶
type RunnerFactory func() Runner
type Tool ¶
type Tool struct { ProgramLangType string // contains filtered or unexported fields }
func (*Tool) Description ¶
Description returns the description of the tool
func (*Tool) Schema ¶
func (t *Tool) Schema() *tool.PropertiesSchema
Click to show internal directories.
Click to hide internal directories.