stdlib

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Dummy statement to prevent declared and not used errors

Functions

func AddStdlibFunc

func AddStdlibFunc(pkg string, name string, funcObj util.ECALFunction) error

AddStdlibFunc adds a function to stdlib.

func AddStdlibPkg

func AddStdlibPkg(pkg string, docstring string) error

AddStdlibPkg adds a package to stdlib. A package needs to be added before functions can be added.

func AddStdlibPluginFunc

func AddStdlibPluginFunc(pkg string, name string, path string, symName string) error

AddStdlibPluginFunc adds a function to stdlib via a loaded plugin. The plugin needs to be build as a Go plugin (https://golang.org/pkg/plugin):

go build -buildmode=plugin -o myfunc.so myfunc.go

And have an exported variable (passed here as symName) which conforms to util.ECALPluginFunction.

func GetPkgDocString

func GetPkgDocString(name string) (string, bool)

GetPkgDocString returns the docstring of a stdlib package.

func GetStdlibConst

func GetStdlibConst(name string) (interface{}, bool)

GetStdlibConst looks up a constant from stdlib.

func GetStdlibFunc

func GetStdlibFunc(name string) (util.ECALFunction, bool)

GetStdlibFunc looks up a function from stdlib.

func GetStdlibSymbols

func GetStdlibSymbols() ([]string, []string, []string)

GetStdlibSymbols returns all available packages of stdlib and their constant and function symbols.

func LoadStdlibPlugin

func LoadStdlibPlugin(jsonObj map[string]interface{}) error

LoadStdlibPlugin attempts to load a stdlib function from a given definition.

func LoadStdlibPlugins

func LoadStdlibPlugins(jsonObj []interface{}) []error

LoadStdlibPlugins attempts to load stdlib functions from a given list of definitions.

Types

type ECALFunctionAdapter

type ECALFunctionAdapter struct {
	// contains filtered or unexported fields
}

ECALFunctionAdapter models a bridge adapter between an ECAL function to a Go function.

func NewECALFunctionAdapter

func NewECALFunctionAdapter(funcval reflect.Value, docstring string) *ECALFunctionAdapter

NewECALFunctionAdapter creates a new ECALFunctionAdapter.

func (*ECALFunctionAdapter) DocString

func (ea *ECALFunctionAdapter) DocString() (string, error)

DocString returns the docstring of the wrapped function.

func (*ECALFunctionAdapter) Run

func (ea *ECALFunctionAdapter) Run(instanceID string, vs parser.Scope,
	is map[string]interface{}, tid uint64, args []interface{}) (ret interface{}, err error)

Run executes this function.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL