chain_admin.proto 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. syntax = "proto3";
  2. option go_package = "./pb";
  3. package pb;
  4. import "common.proto";
  5. service ServiceChain {
  6. rpc RegisterChain(pb.Request) returns (pb.Response) ;
  7. rpc GetAllChains(GetAllChainsReq) returns (pb.Response) ;
  8. rpc GetChain(GetChainReq) returns (pb.Response) ;
  9. rpc EditChain(pb.Request) returns (pb.Response) ;
  10. }
  11. message Body {
  12. //子链唯一标识
  13. string chain_id = 1;
  14. //子链名称
  15. string chain_name =2;
  16. //子链介绍
  17. string chain_intro = 3;
  18. //子链状态
  19. pb.Status status = 4;
  20. }
  21. message GetAllChainsReq {
  22. //页数,默认为1
  23. int64 page = 1;
  24. //分页大小
  25. int64 size = 2;
  26. //排序字段
  27. string sort = 3;
  28. //排序类型
  29. pb.OrderType order = 4;
  30. }
  31. message ChainsList {
  32. repeated Chain data = 1;
  33. }
  34. message Chain {
  35. //子链id
  36. string chain_id = 1;
  37. //子链名称
  38. string chain_name = 2;
  39. //子链介绍
  40. string chain_intro = 3;
  41. //子链状态
  42. pb.Status status = 4;
  43. //子链创建时间
  44. string created_at = 5;
  45. //子链最后修改时间
  46. string updated_at = 6;
  47. }
  48. message GetChainReq {
  49. //请求查询的子链id
  50. string chain_id = 1;
  51. }