Plugins

Plugins wrap around the products/resources a user may want to use within Kaholo for their map execution.

Each plugin allows you to utilize the methods (and its own parameters) locally, and can be executed along the automation process.

In order to use a plugin, simply drag and drop the desired plugin into the Kaholo Designer, and draw the process forward.

The following section describes how you, the developer, can develop your own custom plugin. Plugins can be written in any language; this documentation clarifies specifically how to write a plugin using Javascript or Python.

config.json

Each plugin must have its own configuration file which connects it from the Kaholo server (UI) to the plugin itself.

It’s important that this file be structured as a. json
Parameters can be hard coded as follows:

{
	"name": "yourName",
	"type": "executer",
	"execProgram": "node",
	"main": "index.js",
	"version": "1.0.0",
	"exposeRoute": true,
	"imgUrl":"logo.png",
	"settings": [
	{
	  "name": "SETTINGS_A",
	  "viewName": "Settings a",
	  "type": "vault"
	},
	{
	  "name": "SETTINGS_B",
	  "viewName": "Settings B",
	  "type": "vault"
	}
	],
	"methods": [
	  {
		"name":"your_method_name",
		"viewName":"method_A",
		"params":[
		  {
			"name":"PARAM_A",
			"viewName":"parameter view name in the UI",
			"type":"parameter_type",
			"required":true
		  },
		  {
			"name":"PARAM_B",
			"viewName":"parameter view name in the UI",
			"required":true
			"type":"options",
			"options":[
				{
					"id":"A",
					"name":"value_A"
				},
				{
					"id":"B",
					"name":"value_B"
				}
			 ]
		  }
	  ]
	  },
}

How to structure your config.json:

Key Type Description
name string The name of the plugin
type string executer or trigger
execProgram string node , python or any
main string The name of the main script
version string Plugin version number
exposeRoute boolean Should the plugin expose a route. By default it is false if not set to true
imgUrl string The link to the logo file
settings[] plugin parameters array read more at Plugin Parameters
methods[]
Key Type Description
name string method name for the code
viewName string method name as appear in the UI
route string Declare route for activating the method. http_method path http_method: (GET,HEAD,POST,PUT,DELETE,CONNECT,OPTIONS,TRACE,PATCH) and the path which the developer choose
params plugin parameters array read more at Plugin Parameters
Close Menu