Documentation ¶
Index ¶
- Constants
- Variables
- func GetInvokeJsonProxyPtr() uint64
- func Invoke(method string, args []interface{}, kwargs map[string]interface{}) (result_json string)
- func InvokeJson(method, args_json, kwargs_json string) (result_json string)
- func JSONError(err error) string
- func RegisterPlugin(plugin Plugin)
- func ResetPlugin()
- type BacktraceFrame
- type MethodArgs
- func (p *MethodArgs) Arg(i int) interface{}
- func (p *MethodArgs) BoolArg(i int) bool
- func (p *MethodArgs) BoolKwArg(name string) bool
- func (p *MethodArgs) FloatArg(i int) float64
- func (p *MethodArgs) FloatKwArg(name string) float64
- func (p *MethodArgs) IntArg(i int) int64
- func (p *MethodArgs) IntKwArg(name string) int64
- func (p *MethodArgs) KwArg(name string) interface{}
- func (p *MethodArgs) ListArg(i int) []any
- func (p *MethodArgs) ListKwArg(name string) []any
- func (p *MethodArgs) MapArg(i int) map[string]any
- func (p *MethodArgs) MapKwArg(name string) map[string]any
- func (p *MethodArgs) StrArg(i int) string
- func (p *MethodArgs) StrKwArg(name string) string
- type MethodResult
- type MethodSpec
- type MethodType
- type PanicInfo
- type Plugin
Constants ¶
View Source
const CgoEnabled = true
Variables ¶
View Source
var DebugMode = false
Debug flag for kcl-plugin
Functions ¶
func GetInvokeJsonProxyPtr ¶
func GetInvokeJsonProxyPtr() uint64
func InvokeJson ¶
Types ¶
type BacktraceFrame ¶
type MethodArgs ¶
type MethodArgs struct { Args []interface{} KwArgs map[string]interface{} }
plugin method args
func ParseMethodArgs ¶
func ParseMethodArgs(args_json, kwargs_json string) (*MethodArgs, error)
func (*MethodArgs) Arg ¶
func (p *MethodArgs) Arg(i int) interface{}
func (*MethodArgs) BoolArg ¶ added in v0.9.0
func (p *MethodArgs) BoolArg(i int) bool
func (*MethodArgs) BoolKwArg ¶ added in v0.9.0
func (p *MethodArgs) BoolKwArg(name string) bool
func (*MethodArgs) FloatArg ¶
func (p *MethodArgs) FloatArg(i int) float64
func (*MethodArgs) FloatKwArg ¶
func (p *MethodArgs) FloatKwArg(name string) float64
func (*MethodArgs) IntArg ¶
func (p *MethodArgs) IntArg(i int) int64
func (*MethodArgs) IntKwArg ¶
func (p *MethodArgs) IntKwArg(name string) int64
func (*MethodArgs) KwArg ¶
func (p *MethodArgs) KwArg(name string) interface{}
func (*MethodArgs) ListArg ¶ added in v0.9.0
func (p *MethodArgs) ListArg(i int) []any
func (*MethodArgs) ListKwArg ¶ added in v0.9.0
func (p *MethodArgs) ListKwArg(name string) []any
func (*MethodArgs) MapKwArg ¶ added in v0.9.0
func (p *MethodArgs) MapKwArg(name string) map[string]any
func (*MethodArgs) StrArg ¶
func (p *MethodArgs) StrArg(i int) string
func (*MethodArgs) StrKwArg ¶
func (p *MethodArgs) StrKwArg(name string) string
type MethodSpec ¶
type MethodSpec struct { Type *MethodType Body func(args *MethodArgs) (*MethodResult, error) }
KCL Plugin method spec
func GetMethodSpec ¶
func GetMethodSpec(methodName string) (method MethodSpec, ok bool)
GetMethodSpec get plugin method by name.
type MethodType ¶
KCL Plugin method type
Click to show internal directories.
Click to hide internal directories.