Documentation ¶
Index ¶
- Variables
- type Call
- type CallOptions
- type CallRequest
- type Callback
- type Fiber
- type FiberRequest
- type Function
- type FunctionRequest
- type Named
- type Params
- type PartialCallback
- type Renamable
- type Request
- type ResolveRequest
- type Result
- type Table
- type UnlockRequest
- type VM
- func (v *VM) Callback(name string, callback interface{}) error
- func (v *VM) Execute(ctx context.Context, code string) error
- func (v *VM) ExecuteCall(ctx context.Context, user interface{}, call Call) error
- func (v *VM) ExecuteFile(ctx context.Context, path string) error
- func (v *VM) Module(name string, module interface{}) error
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_CALL_OPTIONS = CallOptions{ UpdateEnv: true, }
View Source
var ERROR_FREED = fmt.Errorf("cannot use freed value")
View Source
var GO_BOOT_FILE []byte
View Source
var JANET_TYPE_TO_STRING map[C.JanetType]string = map[C.JanetType]string{ C.JANET_NUMBER: "number", C.JANET_NIL: "nil", C.JANET_BOOLEAN: "boolean", C.JANET_FIBER: "fiber", C.JANET_STRING: "string", C.JANET_SYMBOL: "symbol", C.JANET_KEYWORD: "keyword", C.JANET_ARRAY: "array", C.JANET_TUPLE: "tuple", C.JANET_TABLE: "table", C.JANET_STRUCT: "struct", C.JANET_BUFFER: "buffer", C.JANET_FUNCTION: "function", C.JANET_CFUNCTION: "cfunction", C.JANET_ABSTRACT: "abstract", C.JANET_POINTER: "pointer", }
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct { Code []byte SourcePath string Options CallOptions }
func CallString ¶
type CallOptions ¶
type CallOptions struct { // Whether to allow the code to mutate the current environment. UpdateEnv bool }
type CallRequest ¶
type FiberRequest ¶
type FunctionRequest ¶
type Named ¶
type Named[T any] struct { // contains filtered or unexported fields }
func (*Named[T]) WithDefault ¶
func (n *Named[T]) WithDefault(defaults T) T
type PartialCallback ¶
func (*PartialCallback) Call ¶
func (p *PartialCallback) Call() []reflect.Value
type ResolveRequest ¶
type ResolveRequest struct { Params Fiber Fiber // The type signature of the callback Type reflect.Type // The results of the function call Out []reflect.Value }
A request to receive the result of a callback.
type UnlockRequest ¶
type UnlockRequest struct {
Value *Value
}
type VM ¶
type VM struct { deadlock.RWMutex // contains filtered or unexported fields }
func (*VM) ExecuteCall ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.