Updated on 2023-07-13 GMT+08:00

JSON Description Statement

Example:

{
 "name": "random",
 "plugin": "random.so",
 "desc": "",
 "funcs": [{
        "name": "RandomNum",
        "type": "func",
        "desc": "",
        "params": [{
               "name": "min",
               "default": "0",
               "range": [],
               "desc": "this is a min",
               "required": true
        },
        {
               "name": "max",
               "default": "10",
               "range": [],
               "desc": "this is a max",
               "required": true
        }]
 }]
}
Table 1 JSON example description

Name

Description

Remarks

name

Key alias

Aliases are used for grouping.

plugin

Add-on name

Same as the name of the uploaded plug-in.

desc

Plug-in description

-

funcs

Function list

See Table 2.

Table 2 Function table

Name

Description

Remarks

name

Function name

Must be exportable.

desc

Function description

-

type

Function type

req: request

func: function

check: checkpoint

params

Parameters

See Table 3.

Table 3 Parameters

Name

Description

Remarks

name

Parameter name

Key to be used as an input parameter.

default

Default value

-

range

Value range

Example: ["on","off"]

desc

Description

-

required

Mandatory

-