diff --git a/build/rpc.json b/build/rpc.json index 5f85b1d..e0faaf7 100644 --- a/build/rpc.json +++ b/build/rpc.json @@ -4170,17 +4170,6 @@ { "name": "LoginSessionService", "methods": [ - { - "name": "createLoginSession", - "requestMessageName": "CreateLoginSessionRequest", - "responseMessageName": "RPCSuccess", - "code": "rpc createLoginSession(CreateLoginSessionRequest) returns (RPCSuccess);", - "doc": "创建SESSION", - "roles": [ - "admin" - ], - "isDeprecated": false - }, { "name": "writeLoginSessionValue", "requestMessageName": "WriteLoginSessionValueRequest", @@ -14542,11 +14531,6 @@ "code": "message CreateLogResponse {\n\n}", "doc": "" }, - { - "name": "CreateLoginSessionRequest", - "code": "message CreateLoginSessionRequest {\n\tstring sid = 1; // SESSION ID\n\tstring ip = 2; // 登录IP\n\tint64 expiresAt = 3; // 过期时间\n}", - "doc": "创建SESSION" - }, { "name": "CreateMessageMediaInstanceRequest", "code": "message CreateMessageMediaInstanceRequest {\n\tstring name = 1;\n\tstring mediaType = 2;\n\tbytes paramsJSON = 3;\n\trepeated int64 groupIds = 4;\n\tstring description = 5;\n\tbytes rateJSON = 6;\n\tint32 hashLife = 7;\n}", diff --git a/pkg/rpc/pb/service_login_session.pb.go b/pkg/rpc/pb/service_login_session.pb.go index ac630ca..73ab642 100644 --- a/pkg/rpc/pb/service_login_session.pb.go +++ b/pkg/rpc/pb/service_login_session.pb.go @@ -29,70 +29,6 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -// 创建SESSION -type CreateLoginSessionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"` // SESSION ID - Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` // 登录IP - ExpiresAt int64 `protobuf:"varint,3,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // 过期时间 -} - -func (x *CreateLoginSessionRequest) Reset() { - *x = CreateLoginSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_service_login_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateLoginSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateLoginSessionRequest) ProtoMessage() {} - -func (x *CreateLoginSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_login_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateLoginSessionRequest.ProtoReflect.Descriptor instead. -func (*CreateLoginSessionRequest) Descriptor() ([]byte, []int) { - return file_service_login_session_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateLoginSessionRequest) GetSid() string { - if x != nil { - return x.Sid - } - return "" -} - -func (x *CreateLoginSessionRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *CreateLoginSessionRequest) GetExpiresAt() int64 { - if x != nil { - return x.ExpiresAt - } - return 0 -} - // 写入SESSION数据 type WriteLoginSessionValueRequest struct { state protoimpl.MessageState @@ -107,7 +43,7 @@ type WriteLoginSessionValueRequest struct { func (x *WriteLoginSessionValueRequest) Reset() { *x = WriteLoginSessionValueRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_login_session_proto_msgTypes[1] + mi := &file_service_login_session_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -120,7 +56,7 @@ func (x *WriteLoginSessionValueRequest) String() string { func (*WriteLoginSessionValueRequest) ProtoMessage() {} func (x *WriteLoginSessionValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_login_session_proto_msgTypes[1] + mi := &file_service_login_session_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -133,7 +69,7 @@ func (x *WriteLoginSessionValueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteLoginSessionValueRequest.ProtoReflect.Descriptor instead. func (*WriteLoginSessionValueRequest) Descriptor() ([]byte, []int) { - return file_service_login_session_proto_rawDescGZIP(), []int{1} + return file_service_login_session_proto_rawDescGZIP(), []int{0} } func (x *WriteLoginSessionValueRequest) GetSid() string { @@ -169,7 +105,7 @@ type DeleteLoginSessionRequest struct { func (x *DeleteLoginSessionRequest) Reset() { *x = DeleteLoginSessionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_login_session_proto_msgTypes[2] + mi := &file_service_login_session_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -182,7 +118,7 @@ func (x *DeleteLoginSessionRequest) String() string { func (*DeleteLoginSessionRequest) ProtoMessage() {} func (x *DeleteLoginSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_login_session_proto_msgTypes[2] + mi := &file_service_login_session_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -195,7 +131,7 @@ func (x *DeleteLoginSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteLoginSessionRequest.ProtoReflect.Descriptor instead. func (*DeleteLoginSessionRequest) Descriptor() ([]byte, []int) { - return file_service_login_session_proto_rawDescGZIP(), []int{2} + return file_service_login_session_proto_rawDescGZIP(), []int{1} } func (x *DeleteLoginSessionRequest) GetSid() string { @@ -217,7 +153,7 @@ type FindLoginSessionRequest struct { func (x *FindLoginSessionRequest) Reset() { *x = FindLoginSessionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_login_session_proto_msgTypes[3] + mi := &file_service_login_session_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -230,7 +166,7 @@ func (x *FindLoginSessionRequest) String() string { func (*FindLoginSessionRequest) ProtoMessage() {} func (x *FindLoginSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_login_session_proto_msgTypes[3] + mi := &file_service_login_session_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -243,7 +179,7 @@ func (x *FindLoginSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindLoginSessionRequest.ProtoReflect.Descriptor instead. func (*FindLoginSessionRequest) Descriptor() ([]byte, []int) { - return file_service_login_session_proto_rawDescGZIP(), []int{3} + return file_service_login_session_proto_rawDescGZIP(), []int{2} } func (x *FindLoginSessionRequest) GetSid() string { @@ -264,7 +200,7 @@ type FindLoginSessionResponse struct { func (x *FindLoginSessionResponse) Reset() { *x = FindLoginSessionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_login_session_proto_msgTypes[4] + mi := &file_service_login_session_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -277,7 +213,7 @@ func (x *FindLoginSessionResponse) String() string { func (*FindLoginSessionResponse) ProtoMessage() {} func (x *FindLoginSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_login_session_proto_msgTypes[4] + mi := &file_service_login_session_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -290,7 +226,7 @@ func (x *FindLoginSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FindLoginSessionResponse.ProtoReflect.Descriptor instead. func (*FindLoginSessionResponse) Descriptor() ([]byte, []int) { - return file_service_login_session_proto_rawDescGZIP(), []int{4} + return file_service_login_session_proto_rawDescGZIP(), []int{3} } func (x *FindLoginSessionResponse) GetLoginSession() *LoginSession { @@ -308,51 +244,40 @@ var file_service_login_session_proto_rawDesc = []byte{ 0x62, 0x1a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, - 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1c, 0x0a, - 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x59, 0x0a, 0x1d, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2d, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, + 0x0a, 0x1d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2d, 0x0a, 0x19, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, - 0x69, 0x64, 0x22, 0x50, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xbb, 0x02, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x12, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, + 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xf6, 0x01, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x4b, 0x0a, 0x16, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x12, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x4b, 0x0a, 0x16, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x70, 0x62, - 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, - 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -367,28 +292,25 @@ func file_service_login_session_proto_rawDescGZIP() []byte { return file_service_login_session_proto_rawDescData } -var file_service_login_session_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_service_login_session_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_service_login_session_proto_goTypes = []interface{}{ - (*CreateLoginSessionRequest)(nil), // 0: pb.CreateLoginSessionRequest - (*WriteLoginSessionValueRequest)(nil), // 1: pb.WriteLoginSessionValueRequest - (*DeleteLoginSessionRequest)(nil), // 2: pb.DeleteLoginSessionRequest - (*FindLoginSessionRequest)(nil), // 3: pb.FindLoginSessionRequest - (*FindLoginSessionResponse)(nil), // 4: pb.FindLoginSessionResponse - (*LoginSession)(nil), // 5: pb.LoginSession - (*RPCSuccess)(nil), // 6: pb.RPCSuccess + (*WriteLoginSessionValueRequest)(nil), // 0: pb.WriteLoginSessionValueRequest + (*DeleteLoginSessionRequest)(nil), // 1: pb.DeleteLoginSessionRequest + (*FindLoginSessionRequest)(nil), // 2: pb.FindLoginSessionRequest + (*FindLoginSessionResponse)(nil), // 3: pb.FindLoginSessionResponse + (*LoginSession)(nil), // 4: pb.LoginSession + (*RPCSuccess)(nil), // 5: pb.RPCSuccess } var file_service_login_session_proto_depIdxs = []int32{ - 5, // 0: pb.FindLoginSessionResponse.loginSession:type_name -> pb.LoginSession - 0, // 1: pb.LoginSessionService.createLoginSession:input_type -> pb.CreateLoginSessionRequest - 1, // 2: pb.LoginSessionService.writeLoginSessionValue:input_type -> pb.WriteLoginSessionValueRequest - 2, // 3: pb.LoginSessionService.deleteLoginSession:input_type -> pb.DeleteLoginSessionRequest - 3, // 4: pb.LoginSessionService.findLoginSession:input_type -> pb.FindLoginSessionRequest - 6, // 5: pb.LoginSessionService.createLoginSession:output_type -> pb.RPCSuccess - 6, // 6: pb.LoginSessionService.writeLoginSessionValue:output_type -> pb.RPCSuccess - 6, // 7: pb.LoginSessionService.deleteLoginSession:output_type -> pb.RPCSuccess - 4, // 8: pb.LoginSessionService.findLoginSession:output_type -> pb.FindLoginSessionResponse - 5, // [5:9] is the sub-list for method output_type - 1, // [1:5] is the sub-list for method input_type + 4, // 0: pb.FindLoginSessionResponse.loginSession:type_name -> pb.LoginSession + 0, // 1: pb.LoginSessionService.writeLoginSessionValue:input_type -> pb.WriteLoginSessionValueRequest + 1, // 2: pb.LoginSessionService.deleteLoginSession:input_type -> pb.DeleteLoginSessionRequest + 2, // 3: pb.LoginSessionService.findLoginSession:input_type -> pb.FindLoginSessionRequest + 5, // 4: pb.LoginSessionService.writeLoginSessionValue:output_type -> pb.RPCSuccess + 5, // 5: pb.LoginSessionService.deleteLoginSession:output_type -> pb.RPCSuccess + 3, // 6: pb.LoginSessionService.findLoginSession:output_type -> pb.FindLoginSessionResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -403,18 +325,6 @@ func file_service_login_session_proto_init() { file_models_rpc_messages_proto_init() if !protoimpl.UnsafeEnabled { file_service_login_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateLoginSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_login_session_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteLoginSessionValueRequest); i { case 0: return &v.state @@ -426,7 +336,7 @@ func file_service_login_session_proto_init() { return nil } } - file_service_login_session_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_service_login_session_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteLoginSessionRequest); i { case 0: return &v.state @@ -438,7 +348,7 @@ func file_service_login_session_proto_init() { return nil } } - file_service_login_session_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_service_login_session_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindLoginSessionRequest); i { case 0: return &v.state @@ -450,7 +360,7 @@ func file_service_login_session_proto_init() { return nil } } - file_service_login_session_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_service_login_session_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindLoginSessionResponse); i { case 0: return &v.state @@ -469,7 +379,7 @@ func file_service_login_session_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_login_session_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, @@ -495,8 +405,6 @@ const _ = grpc.SupportPackageIsVersion6 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type LoginSessionServiceClient interface { - // 创建SESSION - CreateLoginSession(ctx context.Context, in *CreateLoginSessionRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 写入SESSION数据 WriteLoginSessionValue(ctx context.Context, in *WriteLoginSessionValueRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 删除SESSION @@ -513,15 +421,6 @@ func NewLoginSessionServiceClient(cc grpc.ClientConnInterface) LoginSessionServi return &loginSessionServiceClient{cc} } -func (c *loginSessionServiceClient) CreateLoginSession(ctx context.Context, in *CreateLoginSessionRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { - out := new(RPCSuccess) - err := c.cc.Invoke(ctx, "/pb.LoginSessionService/createLoginSession", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *loginSessionServiceClient) WriteLoginSessionValue(ctx context.Context, in *WriteLoginSessionValueRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { out := new(RPCSuccess) err := c.cc.Invoke(ctx, "/pb.LoginSessionService/writeLoginSessionValue", in, out, opts...) @@ -551,8 +450,6 @@ func (c *loginSessionServiceClient) FindLoginSession(ctx context.Context, in *Fi // LoginSessionServiceServer is the server API for LoginSessionService service. type LoginSessionServiceServer interface { - // 创建SESSION - CreateLoginSession(context.Context, *CreateLoginSessionRequest) (*RPCSuccess, error) // 写入SESSION数据 WriteLoginSessionValue(context.Context, *WriteLoginSessionValueRequest) (*RPCSuccess, error) // 删除SESSION @@ -565,9 +462,6 @@ type LoginSessionServiceServer interface { type UnimplementedLoginSessionServiceServer struct { } -func (*UnimplementedLoginSessionServiceServer) CreateLoginSession(context.Context, *CreateLoginSessionRequest) (*RPCSuccess, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateLoginSession not implemented") -} func (*UnimplementedLoginSessionServiceServer) WriteLoginSessionValue(context.Context, *WriteLoginSessionValueRequest) (*RPCSuccess, error) { return nil, status.Errorf(codes.Unimplemented, "method WriteLoginSessionValue not implemented") } @@ -582,24 +476,6 @@ func RegisterLoginSessionServiceServer(s *grpc.Server, srv LoginSessionServiceSe s.RegisterService(&_LoginSessionService_serviceDesc, srv) } -func _LoginSessionService_CreateLoginSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateLoginSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoginSessionServiceServer).CreateLoginSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.LoginSessionService/CreateLoginSession", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoginSessionServiceServer).CreateLoginSession(ctx, req.(*CreateLoginSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _LoginSessionService_WriteLoginSessionValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WriteLoginSessionValueRequest) if err := dec(in); err != nil { @@ -658,10 +534,6 @@ var _LoginSessionService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.LoginSessionService", HandlerType: (*LoginSessionServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "createLoginSession", - Handler: _LoginSessionService_CreateLoginSession_Handler, - }, { MethodName: "writeLoginSessionValue", Handler: _LoginSessionService_WriteLoginSessionValue_Handler, diff --git a/pkg/rpc/protos/service_login_session.proto b/pkg/rpc/protos/service_login_session.proto index 2ffede0..0b7b8a6 100644 --- a/pkg/rpc/protos/service_login_session.proto +++ b/pkg/rpc/protos/service_login_session.proto @@ -8,9 +8,6 @@ import "models/rpc_messages.proto"; // 登录SESSION服务 service LoginSessionService { - // 创建SESSION - rpc createLoginSession(CreateLoginSessionRequest) returns (RPCSuccess); - // 写入SESSION数据 rpc writeLoginSessionValue(WriteLoginSessionValueRequest) returns (RPCSuccess); @@ -21,13 +18,6 @@ service LoginSessionService { rpc findLoginSession(FindLoginSessionRequest) returns (FindLoginSessionResponse); } -// 创建SESSION -message CreateLoginSessionRequest { - string sid = 1; // SESSION ID - string ip = 2; // 登录IP - int64 expiresAt = 3; // 过期时间 -} - // 写入SESSION数据 message WriteLoginSessionValueRequest { string sid = 1;