Skip to content

Commit

Permalink
Merge pull request #53 from WeBankFinTech/feature/endpoint-doc
Browse files Browse the repository at this point in the history
Fix multiple format issues
  • Loading branch information
chaoxinhu committed Aug 14, 2019
2 parents 4750058 + 888c2ed commit 750102c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/zh_CN/docs/weidentity-endpoint-deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WeIdentity Endpoint Service部署指引

Endpoint Service在代理端依托于RestService,环境要求也与其一致,请见 \ `Endpoint Service 部署文档 <./weidentity-endpoint-deploy.html>`_\。

随后,在``dist/conf``目录下,修改``application.properties``文件中的主机端口列表这一项。您需要在此处以逗号分隔所有需要连接的远程服务端,指明其主机IP及端口。这样,Endpoint Service就会在后台以您配置的时间间隔(此处的``fetch.period.seconds``)去远程拉取注册在服务端的Endpoint。
随后,在 ``dist/conf`` 目录下,修改 ``application.properties`` 文件中的主机端口列表这一项。您需要在此处以逗号分隔所有需要连接的远程服务端,指明其主机IP及端口。这样,Endpoint Service就会在后台以您配置的时间间隔(此处的 ``fetch.period.seconds`` )去远程拉取注册在服务端的Endpoint。

.. code-block:: bash
Expand All @@ -26,7 +26,7 @@ Endpoint Service在代理端依托于RestService,环境要求也与其一致

Endpoint Service在服务端依托于WeIdentity-Java-SDK,环境要求也与其一致,请见 `Java-SDK 部署环境要求 <https://weidentity.readthedocs.io/projects/javasdk/zh_CN/latest/docs/weidentity-installation.html>`_。

在``src/main/resources``目录下,修改``weidentity.properties``文件中的``rpc.listener.port``这一项内容,以具体确定在哪个端口上进行监听。
``src/main/resources`` 目录下,修改 ``weidentity.properties`` 文件中的 ``rpc.listener.port`` 这一项内容,以具体确定在哪个端口上进行监听。

.. code-block:: bash
Expand Down Expand Up @@ -74,7 +74,7 @@ Endpoint Service在服务端依托于WeIdentity-Java-SDK,环境要求也与其
3. 在服务端注册或注销您的Endpoint
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

为了注册您的Endpoint以调用所需的Java方法,您需要在服务端集成时,为您需要注册的每个Endpoint,实现一个对应的``EndpointFunctor``接口。此接口包括两个方法:``execute()````getDescription()``,其中前者界定了具体当代理端的RPC请求发送过来时需要进行的操作,后者则需要提供一段对此接口功能的描述。在实现完成之后,还需要调用``EndpointHandler``类的``registerEndpoint()``方法进行注册。
为了注册您的Endpoint以调用所需的Java方法,您需要在服务端集成时,为您需要注册的每个Endpoint,实现一个对应的 ``EndpointFunctor`` 接口。此接口包括两个方法: ``execute()````getDescription()`` ,其中前者界定了具体当代理端的RPC请求发送过来时需要进行的操作,后者则需要提供一段对此接口功能的描述。在实现完成之后,还需要调用 ``EndpointHandler`` 类的 ``registerEndpoint()`` 方法进行注册。

您可以参考SampleEndpointFunctor.java的相关实现。

Expand Down
10 changes: 5 additions & 5 deletions docs/zh_CN/docs/weidentity-rest-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -903,16 +903,16 @@ WeIdentity Endpoint Service API
{
"requestName": "create-passphrase",
"inAddr": [
"127.0.0.1:10090",
"127.0.0.1:10091"
"127.0.0.1:6090",
"127.0.0.1:6190"
],
"description": "Create a valid random passphrase"
},
{
"requestName": "verify-passphrase",
"inAddr": [
"127.0.0.1:20090",
"127.0.0.1:20091"
"127.0.0.1:6290",
"127.0.0.1:6390"
],
"description": "Verify a passphrase"
}
Expand Down Expand Up @@ -952,7 +952,7 @@ WeIdentity Endpoint Service API
- 在API路径中标明的API名,String
- Y
* - body
- 以``“```”``分隔的多个传入服务端用于执行API的参数
- 以```分隔的多个传入服务端用于执行API的参数
- Y

接口入参:
Expand Down
6 changes: 3 additions & 3 deletions docs/zh_CN/docs/weidentity-rest-deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ Server 的环境要求与 WeIdentity-Java-SDK 的 `环境要求 <https://weident
* 拷贝您 WeIdentity 合约部署者的私钥到 ``dist/conf`` 目录下,并重命名为``ecdsa_key``。如果您使用部署工具部署了 WeIdentity 合约,这个文件在 ``output/admin/`` 目录。如果您使用源码部署,这个文件在源代码根目录下。

* 修改 ``dist/conf/application.properties`` ,填入需要打开的监听端口地址(用于 RestServer 监听外来的 HTTP/HTTPS RESTful 请求,默认为 20190/20191,不可被其他程序占用)。同时,请确认用来调用默认合约部署者私钥的暗语;由于此暗语可直接调用 WeIdentity 合约部署者的私钥,权限较高(详见 \ `RestService API 说明文档 <./weidentity-rest-api.html>`_\ ),因此请您务必对其进行修改。
* 修改 ``dist/conf/application.properties`` ,填入需要打开的监听端口地址(用于 RestServer 监听外来的 HTTP/HTTPS RESTful 请求,默认为 6090/6091,不可被其他程序占用)。同时,请确认用来调用默认合约部署者私钥的暗语;由于此暗语可直接调用 WeIdentity 合约部署者的私钥,权限较高(详见 \ `RestService API 说明文档 <./weidentity-rest-api.html>`_\ ),因此请您务必对其进行修改。

.. code-block:: bash
# Server监听端口地址
server.port=20191
server.port=6091
# HTTP重定向地址
server.http.port=20190
server.http.port=6090
# 合约部署者私钥暗语
default.passphrase=ecdsa_key
Expand Down

0 comments on commit 750102c

Please sign in to comment.