| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- syntax = "proto3";
- option go_package = "./pb";
- package pb;
- service ConsoleService{
- rpc GetProjectInfo(Request) returns (Response) ;
- rpc GetUserAmount(Request) returns (Response) ;
- rpc EditUserAmount(Request) returns (Response) ;
- rpc GetChainConfig(Request) returns (Response) ;
- }
- message Request {
- // 请求信息
- google.protobuf.Any body = 1;
- }
- message Response {
- // 结果码
- string code = 1;
- // 结果消息
- string msg = 2;
- // 结果详情
- google.protobuf.Any data = 3;
- }
- message GetProjectInfoReq {
- string api_key = 1;
- }
- message GetProjectInfoResp {
- int64 project_id = 1; //项目id
- string api_key = 2; //api_key
- stiring api_secret = 3; //api_secret
- int64 chain_id = 4; //链id
- int64 user_id =5; //用户id
- }
- message GetUserAmountReq {
- int64 user_id = 1; //用户id
- }
- message GetUserAmountResp {
- int64 user_id = 1; //用户id
- string amount = 2; //账户余额
- }
- message EditUserAmountReq {
- int64 user_id = 1; //用户id
- string tx_hash = 2; //交易对应的hash
- string used = 3; //交易的花费情况
- uint32 tx_flow = 4; //交易流向,1为流入,2为流出
- string operation = 5; //交易具体操作描述
- }
- message GetChainConfigReq {
- int64 chain_id = 1; //链id
- }
- message GetChainConfigResp {
- int64 chain_id = 1; //链id
- string code = 2; //链code
- string name = 3; //链名称
- string module = 4; //链模块
- uint32 status = 5; //链状态,0为正常
- }
|