This is an automated email from the ASF dual-hosted git repository.

kevinclair pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 752c2bf  add local model and ext plugin (#295)
752c2bf is described below

commit 752c2bf7ab303e20ea46ca2a2ac154f242aae30f
Author: xiaoyu <[email protected]>
AuthorDate: Mon Sep 27 17:54:05 2021 +0800

    add local model and ext plugin (#295)
    
    * add local model and ext plugin
    
    * add local model and ext plugin
    
    * add local model and ext plugin
    
    * add local model and ext plugin
---
 docs/developer/custom-plugin.md                    |  24 +
 docs/developer/local-model.md                      | 543 +++++++++++++++++++++
 .../current/developer/custom-plugin.md             |  24 +
 .../current/developer/local-model.md               | 542 ++++++++++++++++++++
 4 files changed, 1133 insertions(+)

diff --git a/docs/developer/custom-plugin.md b/docs/developer/custom-plugin.md
index a5ed304..d0a1eb9 100644
--- a/docs/developer/custom-plugin.md
+++ b/docs/developer/custom-plugin.md
@@ -277,3 +277,27 @@ public interface PluginDataHandler {
         return new PluginDataHandler();
     }
 ```
+
+## Dynamic loading
+
+* When using this feature, the above extensions `ShenyuPlugin`, 
`PluginDataHandler`, do not need to be `spring bean`. You just need to build 
the jar package of the extension project.
+
+* Config in Yaml:
+
+```yaml
+shenyu:
+  extPlugin:
+    path:  //Load the extension plugin jar package path
+    enabled: true //Whether to turn on 
+    threads: 1  //Number of loading plug-in threads
+    scheduleTime: 300  //Cycle time (in seconds)
+    scheduleDelay: 30 //How long the shenyu gateway is delayed to load after 
it starts (in seconds)
+```
+
+#### Plugin loading path details
+
+* This path is for the directory where the extended plugin jar package is 
stored。
+
+* Used `-Dplugin-ext=xxxx`, Also used `shenyu.extPlugin.path` in yaml,If 
neither is configured, the `ext-lib` directory in the apache shenyu gateway 
boot path will be loaded by default.
+
+* Priority :`-Dplugin-ext=xxxx` > `shenyu.extPlugin.path` > `ext-lib(default)`
diff --git a/docs/developer/local-model.md b/docs/developer/local-model.md
new file mode 100644
index 0000000..1b1a2a9
--- /dev/null
+++ b/docs/developer/local-model.md
@@ -0,0 +1,543 @@
+---
+title: Local Model
+keywords: ["Local Model"]
+description: Local Model
+---
+
+## Description
+
+* Standalone environment, then use the local `API` to update the apache shenyu 
gateway data。
+
+* Common result:
+
+```
+success
+```
+
+* Common preFix : `localhost:9095/shenyu`
+
+## Plugin
+
+### saveOrUpdate
+
+save or update plugin data
+
+##### Request Method
+
+POST
+
+##### Path
+
+/plugin/saveOrUpdate
+
+##### Request Parameters
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**PluginData**|[PluginData](#PluginData)|True| |Plugin data object (pass Json 
object inside Body)|
+
+##### <div id="PluginData">PluginData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**id**|String|False| plugin id|
+|**name**|String|True| |plugin name|
+|**config**|String|False| |plugin configuration (Json format)|
+|**role**|String|False| |plugin role |
+|**enabled**|Boolean|False| |whether to turn on|
+
+##### Example
+
+POST body
+
+```
+{"id":3,"name":"divide","enabled":"true"}
+
+```
+
+### CleanAll
+
+Clear all data (plugins, selectors, rules)
+
+##### Request Method
+
+GET
+
+##### Path
+
+/cleanAll
+
+### Clean Plugin
+
+Clear plugin data(selector, rule)
+
+##### Request Method
+
+GET
+
+##### Path
+
+/cleanPlugin?name = xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**name**|String|true| |plugin name |
+
+### Delete plugin
+
+Remove plugin data (not included, the selectors and rules data)
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/delete?name = xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**name**|String|true| |plugin name |
+
+### Delete All Plugin
+
+Remove all plugin data (not included, the selectors and rules data)
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/deleteAll
+
+### Find plugin by name
+
+Find plugin by name
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/findByName?name=xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**name**|String|true| |plugin name |
+
+### Save or Update Selector
+
+Save or Update Selector
+
+##### Request Method
+
+POST
+
+##### Path
+
+/plugin/selector/saveOrUpdate
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**SelectorData**|[SelectorData](#SelectorData)|True| |Selector object (pass 
Json object inside Body)|
+
+##### <div id="SelectorData">SelectorData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**id**|String|False| selector id|
+|**pluginName**|String|True| |plugin name|
+|**name**|String|False| |Selector name (default is plugin:selector+random 
number if not filled)|
+|**matchMode**|Integer|False| |Matching mode (0:and;1:or), not filled with the 
default generation And mode|
+|**type**|Integer|False| |Traffic type(0: full traffic; 1: custom traffic) do 
not fill in the default generation of full traffic|
+|**sort**|Integer|False| |Sort by, not filled by default generate 10|
+|**enabled**|Boolean|False| |Whether to turn on, not fill in the default 
generation true|
+|**logged**|Boolean|False| |Whether or not to print the log, do not fill in 
the default generated into false|
+|**handle**|String|False| |Selector handler (Json objects, depending on each 
plug-in, different objects are passed)|
+|**conditionList**|[Condition](#Condition)|False| |Conditional collection, 
custom traffic needs to be passed, full traffic does not need to be passed 
(Json List object)|
+
+##### <div id="Condition">Condition</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**paramType**|String|True| param 
type(post,uri,query,host,header,cookie,req_method,domain)|
+|**operator**|String|True| |operator 
(match,=,regex,>,<,contains,SpEL,Groovy,TimeBefore,TimeAfter)|
+|**paramName**|String|False| |param mame(The uri parameter type can be passed 
without)|
+|**paramValue**|Integer|False| |param value|
+
+
+##### Example
+
+POST body
+
+```
+{
+       "pluginName": "divide",
+       "type": 1,
+       "handle": "[{\"upstreamUrl\":\"127.0.0.1:8089\"}]",
+       "conditionDataList": [{
+               "paramType": "uri",
+               "operator": "match",
+               "paramName": null,
+               "paramValue": "/**"
+       }]
+}
+
+```
+
+##### Result
+
+Is selector id
+
+```
+xxxxx
+```
+
+### Add Selector And Rules
+
+Add a selector with multiple rules
+
+##### Request Method
+
+POST
+
+##### Path
+
+/plugin/selectorAndRules
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**SelectorRulesData**|[SelectorRulesData](#SelectorRulesData)|True| |Selector 
rule object (Body inside pass Json object)|
+
+##### <div id="SelectorRulesData">SelectorRulesData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**pluginName**|String|True| |plugin name|
+|**selectorName**|String|False| |Selector name (if not filled in, it is 
generated by default plugin:selector+random number)|
+|**matchMode**|Integer|False| |Matching mode (0:and;1:or), not filled with the 
default generation And mode|
+|**selectorHandler**|String|False| |Selector handler (Json objects, depending 
on each plug-in, different objects are passed)|
+|**conditionList**|[ConditionData](#ConditionData)|True| |Selector condition 
collection (Json List object)|
+|**ruleDataList**|[RuleLocalData](#RuleLocalData)|True| |Rule condition 
collection (Json List object)|
+
+##### <div id="RuleLocalData">RuleLocalData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**ruleName**|String|False| rule name|
+|**ruleHandler**|String|True| |Rule handler (different plugins pass different 
values))|
+|**matchMode**|Integer|False| |Matching pattern (0:and;1:or)|
+|**conditionList**|[ConditionData](#ConditionData)|True| |Rule condition 
collection (Json List object)|
+
+##### <div id="ConditionData">ConditionData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**paramType**|String|True| param 
type(post,uri,query,host,header,cookie,req_method,domain)|
+|**operator**|String|True| |operator 
(match,=,regex,>,<,contains,SpEL,Groovy,TimeBefore,TimeAfter)|
+|**paramName**|String|False| |param mame(The uri parameter type can be passed 
without)|
+|**paramValue**|Integer|False| |param value|
+
+##### Example
+
+POST body
+
+```
+{
+       "pluginName": "divide",
+       "selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8089\"}]",
+       "conditionDataList": [{
+               "paramType": "uri",
+               "operator": "match",
+               "paramValue": "/http/**"
+       }],
+       "ruleDataList": [{
+               "ruleHandler": "{\"loadBalance\":\"random\"}",
+               "conditionDataList": [{
+                       "paramType": "uri",
+                       "operator": "=",
+                       "paramValue": "/http/test/payment"
+               }]
+       }, {
+               "ruleHandler": "{\"loadBalance\":\"random\"}",
+               "conditionDataList": [{
+                       "paramType": "uri",
+                       "operator": "=",
+                       "paramValue": "/http/order/save"
+               }]
+       }]
+}
+
+```
+
+### Delete Selector
+
+Delete selectors based on selector id and plugin name
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/selector/delete?pluginName=xxxx&&id=xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**pluginName**|String|true| |plugin name |
+|**id**|String|true| |selector id |
+
+### Find All Selector
+
+Get all selectors by plugin name
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/selector/findList?pluginName=xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**pluginName**|String|true| |plugin name |
+
+### Save or Update Rule Data
+
+Save or Update Rule Data
+
+##### Request Method
+
+POST
+
+##### Path
+
+/plugin/rule/saveOrUpdate
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**RuleData**|[RuleData](#RuleData)|True| |Rule object (pass Json object 
inside Body)|
+
+##### <div id="RuleData">RuleData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**id**|String|False| rule id|
+|**pluginName**|String|True| |plugin name|
+|**name**|String|False| |Rule name (default generation if not filled 
plugin:rule+random number)|
+|**selectorId**|String|True| |Selector id|
+|**matchMode**|Integer|False| |Matching mode (0:and;1:or), not filled with the 
default generation And mode|
+|**sort**|Integer|False| |Sort by , not filled by default generate 10|
+|**enabled**|Boolean|False| |Whether to turn on, not fill in the default 
generation true|
+|**logged**|Boolean|False| |Whether or not to print the log, do not fill in 
the default generated into false|
+|**handle**|String|False| |Rule handler (Json objects, depending on each 
plug-in, different objects are passed)|
+|**conditionList**|[ConditionData](#ConditionData)|False| |Conditional 
collections (Json List objects)|
+
+##### <div id="conditionList">conditionList</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**paramType**|String|True| param 
type(post,uri,query,host,header,cookie,req_method,domain)|
+|**operator**|String|True| |operator 
(match,=,regex,>,<,contains,SpEL,Groovy,TimeBefore,TimeAfter)|
+|**paramName**|String|False| |param mame(The uri parameter type can be passed 
without)|
+|**paramValue**|Integer|False| |param value|
+
+##### Example
+
+POST body
+
+```
+{
+       "pluginName": "divide",
+       "selectorId": 123456,
+       "handle": "{\"loadBalance\":\"random\"}",
+       "conditionDataList": [{
+               "paramType": "uri",
+               "operator": "=",
+               "paramValue": "/test"
+       }]
+}
+
+```
+
+##### Result
+
+Is rule id
+
+```
+xxxxx
+```
+
+### Delete rule data
+
+Delete rules based on selector id and rule id
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/rule/delete?selectorId=xxxx&&id=xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**selectorId**|String|true| |selector ID |
+|**id**|String|true| |rule ID |
+
+### Find Rule data List
+
+Get all rules by selector ID
+
+##### Request Method
+
+GET
+
+##### Path
+
+/plugin/rule/findList?selectorId=xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**selectorId**|String|true| |selector id |
+
+## Meta data
+
+### Save Or Update
+
+Save Or Update Meta data
+
+##### Request Method
+
+POST
+
+##### Path
+
+/meta/saveOrUpdate
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**MetaData**|[MetaData](#MetaData)|True| |Metadata object (pass Json object 
inside Body)|
+
+##### <div id="MetaData">MetaData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**id**|String|False| ID|
+|**appName**|String|True| |app name|
+|**contextPath**|String|True| |contextPath|
+|**path**|String|True| |path|
+|**rpcType**|String|True| |rpc type(dubbo,sofa,tars,springCloud,motan,grpc)|
+|**serviceName**|String|True| |service name|
+|**methodName**|String|True| |method name|
+|**parameterTypes**|String|True| |parameter types|
+|**rpcExt**|String|False| |rpc extension parameters (json objects)|
+|**enabled**|Boolean|False| Whether to turn on|
+
+### Delete
+
+Delete Meta data
+
+##### Request Method
+
+GET
+
+##### Path
+
+/meta/delete?rpcType=xxxx&&path=xxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**rpcType**|String|true| |rpc type(dubbo,sofa,tars,springCloud,motan,grpc) |
+|**path**|String|true| |path |
+
+## App Sign Data
+
+### Save Or Update
+
+Save Or Update App Sign Data
+
+##### Request Method
+
+POST
+
+##### Path
+
+/auth/saveOrUpdate
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**AppAuthData**|[AppAuthData](#AppAuthData)|True| |Signature object (Json 
object passed inside the Body)|
+
+##### <div id="AppAuthData">AppAuthData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**appKey**|String|True| |app key|
+|**appSecret**|String|True| |app secret|
+|**enabled**|Boolean|False| Whether to turn on|
+|**open**|Boolean|False| is open|
+|**paramDataList**|[AuthParamData](#AuthParamData)|false| |Parameter set, open 
is true when you need to pass (Json list object)|
+|**AuthPathData**|[AuthPathData](#AuthPathData)|false| |Path collection, open 
is true when you need to pass (Json list object)|
+
+##### <div id="AuthParamData">AuthParamData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**appName**|String|True| |app name|
+|**appParam**|String|True| |app param|
+
+##### <div id="AuthPathData">AuthPathData</div>
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**appName**|String|True| |app name|
+|**path**|String|True| |path|
+|**enabled**|Boolean|False| Whether to turn on|
+
+### Delete
+
+Delete App Sign Data
+
+##### Request Method
+
+GET
+
+##### Path
+
+/auth/delete?appKey=xxxx
+
+##### RequestParam
+
+|Name|Type|Required|Default|Description|
+|---|---|---|---|---|
+|**appKey**|String|true| |app key |
diff --git 
a/i18n/zh/docusaurus-plugin-content-docs/current/developer/custom-plugin.md 
b/i18n/zh/docusaurus-plugin-content-docs/current/developer/custom-plugin.md
index e1f869e..6ac46ac 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/current/developer/custom-plugin.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/current/developer/custom-plugin.md
@@ -283,3 +283,27 @@ public PluginDataHandler pluginDataHandler() {
         return new PluginDataHandler();
         }
 ```
+
+## 动态加载自定义插件
+
+* 当使用此功能时候,上述扩展 `ShenyuPlugin`, `PluginDataHandler`, 不用成为 `spring 
bean`。只需要构建出扩展项目的jar包即可。
+
+* 使用以下配置:
+
+```yaml
+shenyu:
+  extPlugin:
+    path:  //加载扩展插件jar包路径
+    enabled: true //是否开启
+    threads: 1  //加载插件线程数量
+    scheduleTime: 300 //间隔时间(单位:秒)
+    scheduleDelay: 30 //网关启动后延迟多久加载(单位:秒)
+```
+
+#### 插件加载路径详解
+
+* 此路径是为存放扩展插件jar包的目录。
+
+* 可以使用 `-Dplugin-ext=xxxx` 指定,也可以使用 
`shenyu.extPlugin.path`配置文件指定,如果都没配置,默认会加载网关启动路径下的 `ext-lib`目录。
+
+* 优先级 :`-Dplugin-ext=xxxx` > `shenyu.extPlugin.path` > `ext-lib(default)`
diff --git 
a/i18n/zh/docusaurus-plugin-content-docs/current/developer/local-model.md 
b/i18n/zh/docusaurus-plugin-content-docs/current/developer/local-model.md
new file mode 100644
index 0000000..4cc04d1
--- /dev/null
+++ b/i18n/zh/docusaurus-plugin-content-docs/current/developer/local-model.md
@@ -0,0 +1,542 @@
+---
+title: 本地模式
+keywords: ["本地模式"]
+description: 本地模式
+---
+
+## 说明
+
+* 主要介绍在单机环境下,然后使用本地 `API` 更新网关数据。
+
+* 统一返回结果:
+
+```
+success
+```
+
+* 统一请求前缀 : `localhost:9095/shenyu`
+
+## 插件数据
+
+### 新增或者更新插件
+
+新增或者更新插件
+
+##### 请求方式
+
+POST
+
+##### 请求路径
+
+/plugin/saveOrUpdate
+
+##### 请求参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**PluginData**|[PluginData](#PluginData)|True| |插件对象(Body里面传Json对象)|
+
+##### <div id="PluginData">PluginData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**id**|String|False| 插件ID|
+|**name**|String|True| |插件名称|
+|**config**|String|False| |插件配置(Json格式)|
+|**role**|String|False| |插件角色|
+|**enabled**|Boolean|False| |是否开启|
+
+##### 请求示例
+
+POST body
+
+```
+{"id":3,"name":"divide","enabled":"true"}
+
+```
+
+### 清空所有数据
+
+清空所有插件,选择器,规则数据
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/cleanAll
+
+### 清空插件数据
+
+清空单个插件,选择器,规则数据
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/cleanPlugin?name = xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**name**|String|true| |插件名称 |
+
+### 删除插件
+
+删除单个插件(不包含,插件里面的选择器与规则)
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/delete?name = xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**name**|String|true| |插件名称 |
+
+### 删除所有插件
+
+删除所有插件(不包含,插件里面的选择器与规则)
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/deleteAll
+
+### 获取插件
+
+根据名称获取插件数据
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/findByName?name=xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**name**|String|true| |插件名称 |
+
+### 新增或更新选择器
+
+新增或者更新插件
+
+##### 请求方式
+
+POST
+
+##### 请求路径
+
+/plugin/selector/saveOrUpdate
+
+##### 请求参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**SelectorData**|[SelectorData](#SelectorData)|True| |选择器对象(Body里面传Json对象)|
+
+##### <div id="SelectorData">SelectorData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**id**|String|False| 选择器ID|
+|**pluginName**|String|True| |插件名称|
+|**name**|String|False| |选择器名称(不填则默认生成 plugin:selector+随机数字)|
+|**matchMode**|Integer|False| |匹配模式(0:and;1:or),不填默认生成 And模式|
+|**type**|Integer|False| |流量类型0:全流量;1:自定义流量)不填默认生成全流量|
+|**sort**|Integer|False| |排序 ,不填默认生成 10|
+|**enabled**|Boolean|False| |是否开启,不填默认生成 true|
+|**logged**|Boolean|False| |是否打印日志,不填默认生成为false|
+|**handle**|String|False| |选择器处理(Json对象,根据每个插件不同,传的对象不同)|
+|**conditionList**|[conditionList](#conditionList)|False| 
|条件集合,自定义流量需要传,全流量不用传(Json List对象)|
+
+##### <div id="conditionList">conditionList</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**paramType**|String|True| 
参数类型(post,uri,query,host,header,cookie,req_method,domain)|
+|**operator**|String|True| 
|匹配方式(match,=,regex,>,<,contains,SpEL,Groovy,TimeBefore,TimeAfter)|
+|**paramName**|String|False| |参数名称(uri 参数类型时候,可以不传)|
+|**paramValue**|Integer|False| |匹配值|
+
+##### 请求示例
+
+POST body
+
+```
+{
+       "pluginName": "divide",
+       "type": 1,
+       "handle": "[{\"upstreamUrl\":\"127.0.0.1:8089\"}]",
+       "conditionDataList": [{
+               "paramType": "uri",
+               "operator": "match",
+               "paramName": null,
+               "paramValue": "/**"
+       }]
+}
+
+```
+
+##### 返回数据
+
+选择器ID
+
+```
+xxxxx
+```
+
+### 新增选择器与规则
+
+新增一条选择器与多条规则
+
+##### 请求方式
+
+POST
+
+##### 请求路径
+
+/plugin/selectorAndRules
+
+##### 请求参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**SelectorRulesData**|[SelectorRulesData](#SelectorRulesData)|True| 
|选择器规则对象(Body里面传Json对象)|
+
+##### <div id="SelectorRulesData">SelectorRulesData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**pluginName**|String|True| |插件名称|
+|**selectorName**|String|False| |选择器名称(不填则默认生成 plugin:selector+随机数字)|
+|**matchMode**|Integer|False| |匹配模式(0:and;1:or),不填默认生成 And模式|
+|**selectorHandler**|String|False| |选择器处理(Json对象,根据每个插件不同,传的对象不同)|
+|**conditionList**|[ConditionData](#ConditionData)|True| |选择器条件集合(Json List对象)|
+|**ruleDataList**|[RuleLocalData](#RuleLocalData)|True| |规则对象集合(Json List对象)|
+
+##### <div id="RuleLocalData">RuleLocalData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**ruleName**|String|False| 规则名称|
+|**ruleHandler**|String|True| |规则处理(不同的插件传不同的值)|
+|**matchMode**|Integer|False| |匹配模式(0:and;1:or)|
+|**conditionList**|[ConditionData](#ConditionData)|True| |规则条件集合(Json List对象)|
+
+##### <div id="ConditionData">ConditionData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**paramType**|String|True| 
参数类型(post,uri,query,host,header,cookie,req_method,domain)|
+|**operator**|String|True| 
|匹配方式(match,=,regex,>,<,contains,SpEL,Groovy,TimeBefore,TimeAfter)|
+|**paramName**|String|False| |参数名称(uri 参数类型时候,可以不传)|
+|**paramValue**|Integer|False| |匹配值|
+
+##### 请求示例
+
+POST body
+
+```
+{
+       "pluginName": "divide",
+       "selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8089\"}]",
+       "conditionDataList": [{
+               "paramType": "uri",
+               "operator": "match",
+               "paramValue": "/http/**"
+       }],
+       "ruleDataList": [{
+               "ruleHandler": "{\"loadBalance\":\"random\"}",
+               "conditionDataList": [{
+                       "paramType": "uri",
+                       "operator": "=",
+                       "paramValue": "/http/test/payment"
+               }]
+       }, {
+               "ruleHandler": "{\"loadBalance\":\"random\"}",
+               "conditionDataList": [{
+                       "paramType": "uri",
+                       "operator": "=",
+                       "paramValue": "/http/order/save"
+               }]
+       }]
+}
+
+```
+
+### 删除选择器
+
+根据选择器id与插件名称删除选择器
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/selector/delete?pluginName=xxxx&&id=xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**pluginName**|String|true| |插件名称 |
+|**id**|String|true| |选择器id |
+
+### 获取插件下的所有选择器
+
+根据插件名称获取所有选择器
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/selector/findList?pluginName=xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**pluginName**|String|true| |插件名称 |
+
+### 新增或更新规则
+
+新增或者更新规则数据
+
+##### 请求方式
+
+POST
+
+##### 请求路径
+
+/plugin/rule/saveOrUpdate
+
+##### 请求参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**RuleData**|[RuleData](#RuleData)|True| |规则对象(Body里面传Json对象)|
+
+##### <div id="RuleData">RuleData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**id**|String|False| 规则ID|
+|**pluginName**|String|True| |插件名称|
+|**name**|String|False| |规则名称(不填则默认生成 plugin:rule+随机数字)|
+|**selectorId**|String|True| |选择器ID(不填则默认生成 plugin:rule+随机数字)|
+|**matchMode**|Integer|False| |匹配模式(0:and;1:or),不填默认生成 And模式|
+|**sort**|Integer|False| |排序 ,不填默认生成 10|
+|**enabled**|Boolean|False| |是否开启,不填默认生成 true|
+|**logged**|Boolean|False| |是否打印日志,不填默认生成为false|
+|**handle**|String|False| |规则处理(Json对象,根据每个插件不同,传的对象不同)|
+|**conditionList**|[ConditionData](#ConditionData)|False| |条件集合(Json List对象)|
+
+##### <div id="conditionList">conditionList</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**paramType**|String|True| 
参数类型(post,uri,query,host,header,cookie,req_method,domain)|
+|**operator**|String|True| 
|匹配方式(match,=,regex,>,<,contains,SpEL,Groovy,TimeBefore,TimeAfter)|
+|**paramName**|String|False| |参数名称(uri 参数类型时候,可以不传)|
+|**paramValue**|Integer|False| |匹配值|
+
+##### 请求示例
+
+POST body
+
+```
+{
+       "pluginName": "divide",
+       "selectorId": 123456,
+       "handle": "{\"loadBalance\":\"random\"}",
+       "conditionDataList": [{
+               "paramType": "uri",
+               "operator": "=",
+               "paramValue": "/test"
+       }]
+}
+
+```
+
+##### 返回数据
+
+规则ID
+
+```
+xxxxx
+```
+
+### 删除规则
+
+根据选择器id与规则id删除规则
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/rule/delete?selectorId=xxxx&&id=xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**selectorId**|String|true| |选择器ID |
+|**id**|String|true| |规则ID |
+
+### 获取规则集合
+
+根据选择器ID获取所有规则
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/plugin/rule/findList?selectorId=xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**selectorId**|String|true| |选择器ID |
+
+## 元数据
+
+### 新增或者更新元数据
+
+新增或者更新元数据
+
+##### 请求方式
+
+POST
+
+##### 请求路径
+
+/meta/saveOrUpdate
+
+##### 请求参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**MetaData**|[MetaData](#MetaData)|True| |元数据对象(Body里面传Json对象)|
+
+##### <div id="MetaData">MetaData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**id**|String|False| 元数据ID|
+|**appName**|String|True| |应用名称|
+|**contextPath**|String|True| |contextPath|
+|**path**|String|True| |请求路径|
+|**rpcType**|String|True| |rpc类型(dubbo,sofa,tars,springCloud,motan,grpc)|
+|**serviceName**|String|True| |接口名称|
+|**methodName**|String|True| |方法名称|
+|**parameterTypes**|String|True| |参数类型|
+|**rpcExt**|String|False| |rpc扩展参数(json对象)|
+|**enabled**|Boolean|False| 是否开启|
+
+### 删除元数据
+
+删除元数据
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/meta/delete?rpcType=xxxx&&path=xxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**rpcType**|String|true| |rpc类型(dubbo,sofa,tars,springCloud,motan,grpc) |
+|**path**|String|true| |路径 |
+
+## 签名数据
+
+### 新增或者更新
+
+新增或者更新签名数据
+
+##### 请求方式
+
+POST
+
+##### 请求路径
+
+/auth/saveOrUpdate
+
+##### 请求参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**AppAuthData**|[AppAuthData](#AppAuthData)|True| |签名对象(Body里面传Json对象)|
+
+##### <div id="AppAuthData">AppAuthData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**appKey**|String|True| |app key|
+|**appSecret**|String|True| |app secret|
+|**enabled**|Boolean|False| 是否开启|
+|**open**|Boolean|False| 是否是开放平台|
+|**paramDataList**|[AuthParamData](#AuthParamData)|false| 
|参数集合,open为true时候需要传(Json list对象)|
+|**AuthPathData**|[AuthPathData](#AuthPathData)|false| 
|路径集合,open为true时候需要传(Json list对象)|
+
+##### <div id="AuthParamData">AuthParamData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**appName**|String|True| |应用名称|
+|**appParam**|String|True| |应用参数|
+
+##### <div id="AuthPathData">AuthPathData</div>
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**appName**|String|True| |应用名称|
+|**path**|String|True| |路径|
+|**enabled**|Boolean|False| 是否开启|
+
+### 删除
+
+删除签名数据
+
+##### 请求方式
+
+GET
+
+##### 请求路径
+
+/auth/delete?appKey=xxxx
+
+##### Request参数
+
+|名称|类型|是否必需|默认值|描述|
+|---|---|---|---|---|
+|**appKey**|String|true| |app key |

Reply via email to