Documentation ¶
Index ¶
- Variables
- func AddStdlibFunc(pkg string, name string, funcObj util.ECALFunction) error
- func AddStdlibPkg(pkg string, docstring string) error
- func AddStdlibPluginFunc(pkg string, name string, path string, symName string) error
- func GetPkgDocString(name string) (string, bool)
- func GetStdlibConst(name string) (interface{}, bool)
- func GetStdlibFunc(name string) (util.ECALFunction, bool)
- func GetStdlibSymbols() ([]string, []string, []string)
- func LoadStdlibPlugin(jsonObj map[string]interface{}) error
- func LoadStdlibPlugins(jsonObj []interface{}) []error
- type ECALFunctionAdapter
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 ¶
AddStdlibPkg adds a package to stdlib. A package needs to be added before functions can be added.
func AddStdlibPluginFunc ¶ added in v1.1.0
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 ¶
GetPkgDocString returns the docstring of a stdlib package.
func GetStdlibConst ¶
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 ¶
GetStdlibSymbols returns all available packages of stdlib and their constant and function symbols.
func LoadStdlibPlugin ¶ added in v1.1.0
LoadStdlibPlugin attempts to load a stdlib function from a given definition.
func LoadStdlibPlugins ¶ added in v1.1.0
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.