rpc: remove godoc comments in favor of swagger docs (#4126)

No need to duplicate information in this case. It a) requires extra
efforts to keep both in sync b) nobody reads godoc documentation
anyways.
This commit is contained in:
Anton Kaliaev
2019-11-11 17:33:02 +04:00
committed by GitHub
parent 2c81f68bb1
commit 1fc4ab7234
11 changed files with 54 additions and 1475 deletions

View File

@@ -8,54 +8,8 @@ import (
rpctypes "github.com/tendermint/tendermint/rpc/lib/types"
)
// Query the application for some information.
//
// ```shell
// curl 'localhost:26657/abci_query?path=""&data="abcd"&prove=false'
// ```
//
// ```go
// client := client.NewHTTP("tcp://0.0.0.0:26657", "/websocket")
// err := client.Start()
// if err != nil {
// // handle error
// }
// defer client.Stop()
// result, err := client.ABCIQuery("", "abcd", true)
// ```
//
// > The above command returns JSON structured like this:
//
// ```json
// {
// "error": "",
// "result": {
// "response": {
// "log": "exists",
// "height": "0",
// "proof": "010114FED0DAD959F36091AD761C922ABA3CBF1" +
// "D8349990101020103011406AA2262E2F448242D" +
// "F2C2607C3CDC705313EE3B0001149D16177BC71" +
// "E445476174622EA559715C293740C",
// "value": "61626364",
// "key": "61626364",
// "index": "-1",
// "code": "0"
// }
// },
// "id": "",
// "jsonrpc": "2.0"
// }
// ```
//
// ### Query Parameters
//
// | Parameter | Type | Default | Required | Description |
// |-----------+--------+---------+----------+------------------------------------------------|
// | path | string | false | false | Path to the data ("/a/b/c") |
// | data | []byte | false | true | Data |
// | height | int64 | 0 | false | Height (0 means latest) |
// | prove | bool | false | false | Includes proof if true |
// ABCIQuery queries the application for some information.
// More: https://tendermint.com/rpc/#/ABCI/abci_query
func ABCIQuery(
ctx *rpctypes.Context,
path string,
@@ -76,36 +30,8 @@ func ABCIQuery(
return &ctypes.ResultABCIQuery{Response: *resQuery}, nil
}
// Get some info about the application.
//
// ```shell
// curl 'localhost:26657/abci_info'
// ```
//
// ```go
// client := client.NewHTTP("tcp://0.0.0.0:26657", "/websocket")
// err := client.Start()
// if err != nil {
// // handle error
// }
// defer client.Stop()
// info, err := client.ABCIInfo()
// ```
//
// > The above command returns JSON structured like this:
//
// ```json
// {
// "error": "",
// "result": {
// "response": {
// "data": "{\"size\":3}"
// }
// },
// "id": "",
// "jsonrpc": "2.0"
// }
// ```
// ABCIInfo gets some info about the application.
// More: https://tendermint.com/rpc/#/ABCI/abci_info
func ABCIInfo(ctx *rpctypes.Context) (*ctypes.ResultABCIInfo, error) {
resInfo, err := proxyAppQuery.InfoSync(proxy.RequestInfo)
if err != nil {