You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/07/18 02:59:35 UTC

[shardingsphere] branch master updated: Update documents about Proxy dev manual (#19307)

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

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new dd92cdd0229 Update documents about Proxy dev manual (#19307)
dd92cdd0229 is described below

commit dd92cdd0229a46f687d57c2bd18b1d84fd43e6ad
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Mon Jul 18 10:59:29 2022 +0800

    Update documents about Proxy dev manual (#19307)
---
 docs/document/content/dev-manual/proxy.cn.md | 45 ++++++++++++++--------------
 docs/document/content/dev-manual/proxy.en.md | 45 ++++++++++++++--------------
 2 files changed, 44 insertions(+), 46 deletions(-)

diff --git a/docs/document/content/dev-manual/proxy.cn.md b/docs/document/content/dev-manual/proxy.cn.md
index 2efed0ed8de..62b8384836b 100644
--- a/docs/document/content/dev-manual/proxy.cn.md
+++ b/docs/document/content/dev-manual/proxy.cn.md
@@ -5,38 +5,37 @@ weight = 6
 chapter = true
 +++
 
-## SPI 接口
+## DatabaseProtocolFrontendEngine
 
-### DatabaseProtocolFrontendEngine
+### 全限定类名
 
-全限定类名:[`org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine`](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/spi/DatabaseProtocolFrontendEngine.java)
+[`org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/spi/DatabaseProtocolFrontendEngine.java)
 
-| *SPI 名称*                       | *详细说明*                                      |
-| ------------------------------- | ---------------------------------------------- |
-| DatabaseProtocolFrontendEngine  | 用于 ShardingSphere-Proxy 解析与适配访问数据库的协议 |
+### 定义
 
-### AuthorityProvideAlgorithm
+用于 ShardingSphere-Proxy 解析与适配访问数据库的协议
 
-全限定类名:[`org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java)
+### 已知实现
 
-| *SPI 名称*                       | *详细说明*                    |
-| ------------------------------- | ---------------------------- |
-| AuthorityProviderAlgorithm      | 用户权限加载逻辑                |
+| *配置标识*     | *详细说明*          | *全限定类名*                                                                                                                                                                                                                                                                                                                            |
+|------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| MySQL      | MySQL 协议实现      | [`org.apache.shardingsphere.proxy.frontend.mysql.MySQLFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java)                          |
+| PostgreSQL | PostgreSQL 协议实现 | [`org.apache.shardingsphere.proxy.frontend.postgresql.PostgreSQLFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java) |
+| openGauss  | openGauss 协议实现  | [`org.apache.shardingsphere.proxy.frontend.opengauss.OpenGaussFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java)      |
 
+## AuthorityProvideAlgorithm
 
-## 示例
+### 全限定类名
 
-### DatabaseProtocolFrontendEngine
+[`org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java)
 
-| *已知实现类*               | *详细说明*                      |
-| ------------------------ | ---------------------------- |
-| [MySQLFrontendEngine](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java)      | 基于 MySQL 的数据库协议实现      |
-| [PostgreSQLFrontendEngine](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java) | 基于 PostgreSQL 的数据库协议实现 |
-| [OpenGaussFrontendEngine](https://github.com/apache/shardingsphere/blob/dec5581af372e1e7daa487800867265ef99bb07c/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java)  | 基于 openGauss 的数据库协议实现   |
+### 定义
 
-### AuthorityProvideAlgorithm
+用户权限加载逻辑
 
-| *已知实现类*                                          | *Type*            | *详细说明*                                                                          |
-|-----------------------------------------------------| ----------------  |----------------------------------------------------------------------------------- |
-| [AllPermittedPrivilegesProviderAlgorithm](https://github.com/apache/shardingsphere/blob/dec5581af372e1e7daa487800867265ef99bb07c/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPermittedPrivilegesProviderAlgorithm.java)             | ALL_PERMITTED     | 默认授予所有权限(不鉴权),不会与实际数据库交互                                            |
-| [DatabasePermittedPrivilegesProviderAlgorithm](https://github.com/apache/shardingsphere/blob/dec5581af372e1e7daa487800867265ef99bb07c/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/database/DatabasePermittedPrivilegesProviderAlgorithm.java)          | DATABASE_PERMITTED| 通过属性 user-database-mappings 配置的权限                                               |
+### 已知实现
+
+| *配置标识*             | *详细说明*                            | *全限定类名*                                                                                                                                                                                                                                                                                                                                                         |
+|--------------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ALL_PERMITTED      | 默认授予所有权限(不鉴权)                     | [`org.apache.shardingsphere.authority.provider.simple.AllPermittedPrivilegesProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPermittedPrivilegesProviderAlgorithm.java)               |
+| DATABASE_PERMITTED | 通过属性 user-database-mappings 配置的权限 | [`org.apache.shardingsphere.authority.provider.database.DatabasePermittedPrivilegesProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/database/DatabasePermittedPrivilegesProviderAlgorithm.java) |
diff --git a/docs/document/content/dev-manual/proxy.en.md b/docs/document/content/dev-manual/proxy.en.md
index 7f07f7f68d3..721d0bb15d6 100644
--- a/docs/document/content/dev-manual/proxy.en.md
+++ b/docs/document/content/dev-manual/proxy.en.md
@@ -5,38 +5,37 @@ weight = 6
 chapter = true
 +++
 
-## SPI Interface
+## DatabaseProtocolFrontendEngine
 
-### DatabaseProtocolFrontendEngine
+### Fully-qualified class name
 
-Fully-qualified class name: [`org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine`](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/spi/DatabaseProtocolFrontendEngine.java)
+[`org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/spi/DatabaseProtocolFrontendEngine.java)
 
-| *SPI Name*                       | *Description*                                      |
-| ------------------------------- | ---------------------------------------------- |
-| DatabaseProtocolFrontendEngine  | Protocols for ShardingSphere-Proxy to parse and adapt for accessing databases |
+### Definition
 
-### AuthorityProvideAlgorithm
+Protocols for ShardingSphere-Proxy to parse and adapt for accessing databases.
 
-Fully-qualified class name: [`org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java)
+### Implementation classes
 
-| *SPI Name*                       | *Description*                    |
-| ------------------------------- | ---------------------------- |
-| AuthorityProviderAlgorithm      | Loading logic for user permission|
+| *Configuration Type* | *Description*                          | *Fully-qualified class name*                                                                                                                                                                                                                                                                                                       |
+|----------------------|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| MySQL                | Protocol implementation for MySQL      | [`org.apache.shardingsphere.proxy.frontend.mysql.MySQLFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java)                          |
+| PostgreSQL           | Protocol implementation for PostgreSQL | [`org.apache.shardingsphere.proxy.frontend.postgresql.PostgreSQLFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java) |
+| openGauss            | Protocol implementation for openGauss  | [`org.apache.shardingsphere.proxy.frontend.opengauss.OpenGaussFrontendEngine`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java)      |
 
+## AuthorityProvideAlgorithm
 
-## Example
+### Fully-qualified class name
 
-### DatabaseProtocolFrontendEngine
+[`org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java)
 
-| *Known implementation class*               | *Description*                      |
-| ------------------------ | ---------------------------- |
-| [MySQLFrontendEngine](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java)      | implementation based on database protocols of MySQL |
-| [PostgreSQLFrontendEngine](https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java) |  implementation based on database protocols of PostgreSQL |
-| [OpenGaussFrontendEngine](https://github.com/apache/shardingsphere/blob/dec5581af372e1e7daa487800867265ef99bb07c/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/OpenGaussFrontendEngine.java)  |  implementation based on database protocols of openGauss|
+### Definition
 
-### AuthorityProvideAlgorithm
+Loading logic for user permission.
 
-| *Known implementation class*                                          | *Type*            | *Description*                                                                          |
-|-----------------------------------------------------| ----------------  |----------------------------------------------------------------------------------- |
-| [AllPermittedPrivilegesProviderAlgorithm](https://github.com/apache/shardingsphere/blob/dec5581af372e1e7daa487800867265ef99bb07c/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPermittedPrivilegesProviderAlgorithm.java)             | ALL_PERMITTED     | Grant all permissions by default (no forensics), no interaction with the actual database |
-| [DatabasePermittedPrivilegesProviderAlgorithm](https://github.com/apache/shardingsphere/blob/dec5581af372e1e7daa487800867265ef99bb07c/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/database/DatabasePermittedPrivilegesProviderAlgorithm.java)          | DATABASE_PERMITTED| Permissions configured by user-database-mappings |
+### Implementation classes
+
+| *Configuration Type* | *Description*                                    | *Fully-qualified class name*                                                                                                                                                                                                                                                                                                                                    |
+|----------------------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ALL_PERMITTED        | Grant all permissions by default (no forensics)  | [`org.apache.shardingsphere.authority.provider.simple.AllPermittedPrivilegesProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPermittedPrivilegesProviderAlgorithm.java)               |
+| DATABASE_PERMITTED   | Permissions configured by user-database-mappings | [`org.apache.shardingsphere.authority.provider.database.DatabasePermittedPrivilegesProviderAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/database/DatabasePermittedPrivilegesProviderAlgorithm.java) |