diff --git a/aufs/README.md b/aufs/README.md index 432a9e6..10e63e0 100644 --- a/aufs/README.md +++ b/aufs/README.md @@ -20,3 +20,5 @@ 3、作为客户端的时候,需要登录。登录密码可以重置默认密码。 4、选定文件对比的时候,展示左右两列 +进入proto的目录执行命令,更新proto.go +protoc --go_out=. scinfo.proto \ No newline at end of file diff --git a/aufs/proto/pb/scinfo.pb.go b/aufs/proto/pb/scinfo.pb.go index 2d09bc4..4880f7c 100644 --- a/aufs/proto/pb/scinfo.pb.go +++ b/aufs/proto/pb/scinfo.pb.go @@ -24,9 +24,12 @@ const ( // 服务信息 type ServiceInfo struct { state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Scname string `protobuf:"bytes,2,opt,name=scname,proto3" json:"scname,omitempty"` Addr string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"` + Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` + Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -61,16 +64,16 @@ func (*ServiceInfo) Descriptor() ([]byte, []int) { return file_scinfo_proto_rawDescGZIP(), []int{0} } -func (x *ServiceInfo) GetName() string { +func (x *ServiceInfo) GetId() string { if x != nil { - return x.Name + return x.Id } return "" } -func (x *ServiceInfo) GetVersion() string { +func (x *ServiceInfo) GetScname() string { if x != nil { - return x.Version + return x.Scname } return "" } @@ -82,6 +85,27 @@ func (x *ServiceInfo) GetAddr() string { return "" } +func (x *ServiceInfo) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *ServiceInfo) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *ServiceInfo) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + // 目录下的文件信息 type FileInfo struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -277,11 +301,14 @@ var File_scinfo_proto protoreflect.FileDescriptor const file_scinfo_proto_rawDesc = "" + "\n" + - "\fscinfo.proto\"O\n" + - "\vServiceInfo\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + - "\aversion\x18\x02 \x01(\tR\aversion\x12\x12\n" + - "\x04addr\x18\x03 \x01(\tR\x04addr\"L\n" + + "\fscinfo.proto\"\x8b\x01\n" + + "\vServiceInfo\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06scname\x18\x02 \x01(\tR\x06scname\x12\x12\n" + + "\x04addr\x18\x03 \x01(\tR\x04addr\x12\x12\n" + + "\x04port\x18\x04 \x01(\tR\x04port\x12\x14\n" + + "\x05token\x18\x05 \x01(\tR\x05token\x12\x16\n" + + "\x06status\x18\x06 \x01(\x05R\x06status\"L\n" + "\bFileInfo\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + "\x04size\x18\x02 \x01(\tR\x04size\x12\x18\n" + diff --git a/aufs/proto/scinfo.proto b/aufs/proto/scinfo.proto index d84745a..a2fcc2e 100644 --- a/aufs/proto/scinfo.proto +++ b/aufs/proto/scinfo.proto @@ -3,9 +3,12 @@ option go_package = "./pb"; // 服务信息 message ServiceInfo { - string name = 1; - string version = 2; + string id = 1; + string scname = 2; string addr = 3; + string port = 4; + string token = 5; + int32 status=6; } // 目录下的文件信息