import "github.com/evilsocket/islazy"
Defines is a map containing the predefined objects and functions for each vm of each plugin.
type Plugin struct { sync.Mutex // The basename of the plugin. Name string // The actual javascript code. Code string // The full path of the plugin. Path string // contains filtered or unexported fields }
Plugin is an object representing a javascript file exporting functions and variables that your project can use to extend its functionalities.
Load loads and compiles a plugin given its path.
Parse parsesand compiles a plugin given its source code.
Call executes one of the declared callbacks of the plugin by its name.
Clone returns a new instance identical to the plugin.
GetObject returns an interface containing the value of the object by its name
GetTypeObject returns the type of the object by its name
HasFunc returns true if the function with `name` has been declared in the plugin code.
IsArrayObject returns true if the object with a given name is a javascript array object, false otherwise
IsBooleanObject returns true if the object with a given name is a javascript boolean object, false otherwise
IsBooleanPrimitive returns true if the object with a given name is a javascript primitive boolean, false otherwise
IsDateObject returns true if the object with a given name is a javascript Date object, false otherwise
IsErrorObject returns true if the object with a given name is a javascript error object, false otherwise
IsNumberObject returns true if the object with a given name is a javascript Number object, false otherwise
IsNumberPrimitive returns true if the object with a given name is a javascript primitive number, false otherwise
IsRegExpObject returns true if the object with a given name is a javascript RegExp object, false otherwise
IsStringObject returns true if the object with a given name is a javascript string object, false otherwise
IsStringPrimitive returns true if the object with a given name is a javascript primitive string
Methods returns a list of methods exported from the javascript
Objects returns a list of object exported by the javascript
Set sets a variable into the VM of this plugin instance.
Path | Synopsis |
---|---|
async | Package async contains a set of helper objects for async tasks and job queues. |
data | Package data contains basic threadsafe data structures with filesystem persistance and configurable flushing policies. |
examples | |
fs | Package fs contains helper functions for file system access and enumeration. |
log | Package log provides access to log functions. |
ops | Package ops contains helper operators. |
plugin | Package plugin contains objects and functions to load and use javascript plugins in order to extend the functionalities of your projects. |
str | Package str contains utilities for string manipulation. |
tui | Package tui contains a set of helper objects and functions for terminal based user interfaces. |
version | Package version contains information about the library version. |
zip | Package zip contains zip and unzip utilities. |
Package plugin imports 6 packages (graph). Updated 2019-11-07. Refresh now. Tools for package owners.