syntax = "proto3"; option go_package = "./pb"; package pb; import "common.proto"; service ServiceChain { rpc RegisterChain(pb.Request) returns (pb.Response) ; rpc GetAllChains(GetAllChainsReq) returns (pb.Response) ; rpc GetChain(GetChainReq) returns (pb.Response) ; rpc EditChain(pb.Request) returns (pb.Response) ; } message Body { //子链唯一标识 string chain_id = 1; //子链名称 string chain_name =2; //子链介绍 string chain_intro = 3; //子链状态 pb.Status status = 4; } message GetAllChainsReq { //页数,默认为1 int64 page = 1; //分页大小 int64 size = 2; //排序字段 string sort = 3; //排序类型 pb.OrderType order = 4; } message ChainsList { repeated Chain data = 1; } message Chain { //子链id string chain_id = 1; //子链名称 string chain_name = 2; //子链介绍 string chain_intro = 3; //子链状态 pb.Status status = 4; //子链创建时间 string created_at = 5; //子链最后修改时间 string updated_at = 6; } message GetChainReq { //请求查询的子链id string chain_id = 1; }